3IMPACT C++ FUNCTIONS REFERENCE
(USE INDEX BELOW OR PRESS CTRL+F TO SEARCH THIS DOCUMENT FOR SPECIFIC INFORMATION)


QUICK-START TUTORIAL IS HERE
ONLINE COMMUNITY IS HERE
DOCUMENTATION HOME PAGE IS HERE


OVERVIEW
MAIN FUNCTIONS - DLL VERSION ONLY
 i3ImpactOpen()
 i3ImpactSettings()
 i3ImpactMain()
 i3ImpactInitBegin()
 i3ImpactInitEnd()
 i3ImpactRunBegin()
 i3ImpactRunEnd()
 i3ImpactRender()
 i3ImpactExitBegin()
 i3ImpactExitEnd()
 i3ImpactClose()
 i3ImpactIsRendering()
 i3ImpactIsActive()
 i3ImpactIsReady()
 i3ImpactIsExecuting()
 i3ImpactIsInitializing()
 i3ImpactIsSkippingRunPhase()
 i3ImpactIsSkippingRenderPhase()
 i3ImpactErrorFlag()
 i3ImpactIsRenderingSet()
 i3ImpactIsActiveSet()
 i3ImpactIsReadySet()
 i3ImpactIsExecutingSet()
 i3ImpactIsInitializingSet()
 i3ImpactIsSkippingRunPhaseSet()
 i3ImpactIsSkippingRenderPhaseSet()
 i3ImpactErrorFlagSet()
 i3ImpactPreRenderCallbackSet()
CAMERA
 iCameraCreate()
 iCameraDestroy()
 iCameraHide()
 iCameraShow()
 iCameraSet()
 iCameraFovSet()
 iCameraFov()
 iCameraClipDistanceSet()
 iCameraLookAt()
 iCameraEulerOrientationSet()
 iCameraOrientationSet()
 iCameraOrientation()
 iCameraLocationSet()
 iCameraLocation()
 iCameraAutoWipeSet()
 iCameraSpritesOnlySet()
 iCameraMirrorEnable()
 iCameraPreRenderCallbackEnable()
 iCameraVelocitySet()
 iCameraEffectCreate()
 iCameraEffectDestroy()
 iCameraEffectSet()
 iCameraEffectStack()
 iCameraEffectValueSet()
 iCameraEffectTextureSet()
LIGHT
 iLightDirectionalSet()
 iLightLocalLocationSet()
 iLightDirectionalColor()
 iLightLocalColorSet()
SKYBOX
 iSkyBoxCreate()
 iSkyBoxDestroy()
 iSkyBoxHide()
 iSkyBoxShow()
 iSkyBoxColorSet()
 iSkyBoxEnvMapCasterAdd()
 iSkyBoxEnvMapCasterRemove()
BODY
 iBodyCreate()
 iBodyCreateFromMemory()
 iBodySGCreate()
 iBodySGCreateFromMemory()
 iBodySphereCreate()
 iBodyDestroy()
 iBodyDisable()
 iBodyEnable()
 iBodyStatus()
 iBodyMeshCreate()
 iBodyMeshPartCreate()
 iBodyMeshCreateFromMemory()
 iBodyMeshPartCreateFromMemory()
 iBodySkinMeshCreate()
 iBodySkinMeshCreateFromMemory()
 iBodyMeshBumpCreate()
 iBodyMeshBumpCreateFromMemory()
 iBodyMassModelSet()
 iBodyMassSet()
 iBodySurfaceStickinessSet()
 iBodySurfaceDriveSet()
 iBodyEulerOrientationSet()
 iBodyOrientationSet()
 iBodyOrientationSeek()
 iBodyOrientation()
 iBodyYaw()
 iBodyPitch()
 iBodyRoll()
 iBodyEulerOrientationAdd()
 iBodyOrientationAdd()
 iBodyLocationSet()
 iBodyLocationCMSet()
 iBodyLocation()
 iBodyPreviousLocation()
 iBodyLocationCM()
 iBodyLocationAdd()
 iBodyCMOffset()
 iBodySpinSet()
 iBodySpin()
 iBodyVelocitySet()
 iBodyVelocity()
 iBodyKmh()
 iBodyPointVelocity()
 iBodyDampingSet()
 iBodyDamping2Set()
 iBodyDirectionalAngularDampingSet()
 iBodyDirectionalLinearDampingSet()
 iBodyTorqueApply()
 iBodyAngularAccelerationApply()
 iBodyForceApply()
 iBodyAccelerationApply()
 iBodyPhysicsReset()
 iBodySphereCount()
 iBodySphere()
 iBodySphereCenter()
 iBodySphereRadius()
 iBodyScan()
 iBodyEnteringMesh()
 iBodyExitingMesh()
BODYBODY
 iBodyBodyCreate()
 iBodyBodyDestroy()
 iBodyBodyEnable()
 iBodyBodyCollisionResponseEnable()
 iBodyBodyRestitutionSet()
 iBodyBodyFrictionSet()
 iBodyBodyFrictionModelSet()
 iBodyBodySplitFrictionSet()
 iBodyBodySubpartRestitutionSet()
 iBodyBodySubpartFrictionSet()
 iBodyBodySubpartFrictionModelSet()
 iBodyBodySubpartSplitFrictionSet()
 iBodyBodyFeedbackEnable()
 iBodyBodyFeedback()
JOINTS
 iJointBallCreate()
 iJointHingeCreate()
 iJointSliderCreate()
 iJointDestroy()
 iJointBallXStopsSet()
 iJointBallYStopsSet()
 iJointBallZStopsSet()
 iJointBallXAMotorSet()
 iJointBallYAMotorSet()
 iJointBallZAMotorSet()
 iJointBallOrientationSet()
 iJointBallLocation()
 iJointHingeStopsSet()
 iJointHingeAMotorSet()
 iJointSliderStopsSet()
 iJointSliderForceSet()
 iJointFeedbackEnable()
 iJointFeedback()
 iWheelCreate()
 iWheelDestroy()
 iWheelSteeringAngleSet()
 iWheelSpinSet()
 iWheelPowerSet()
 iWheelSuspensionSet()
REPLAY
 iReplayDataCreate()
 iReplayDataDestroy()
 iReplayDataRecord()
 iReplayDataPlay()
 iReplayDataRecordReset()
 iReplayDataPlayReset()
 iReplayDataPlayPosition()
 iReplayDataPlayPositionSet()
 iReplayDataWrite()
 iReplayDataRead()
 iReplayDataTime()
MESH
 iMeshCreate()
 iMeshPartCreate()
 iMeshCreateFromMemory()
 iMeshPartCreateFromMemory()
 iMeshBumpCreate()
 iMeshBumpCreateFromMemory()
 iMeshPartCount()
 iMeshPartCountFromMemory()
 iMeshDestroy()
 iMeshHide()
 iMeshShow()
 iMeshEulerOrientationSet()
 iMeshOrientationSet()
 iMeshOrientation()
 iMeshOrientationAdd()
 iMeshLocationSet()
 iMeshLocation()
 iMeshScaleSet()
 iMeshRenderPrioritySet()
 iMeshRenderModeSet()
 iMeshZBiasSet()
 iMeshSpecularSet()
 iMeshAlphaSet()
 iMeshEmissiveSet()
 iMeshFogSet()
 iMeshWireframeEnable()
 iMeshSecondaryTextureSet()
 iMeshSecondaryTextureSetFast()
 iMeshLocalLightsEnable()
 iMeshBumpAmbientColorSet()
 iMeshMirrorMake()
 iMeshVisible()
 iMeshPicked()
 iMeshRayCheck()
 iMeshBoundingSphereRayCheck()
 iMeshBoundingSphere()
 iMeshStretchToSegment()
 iMeshTextureSet()
 iMeshTextureReset()
 iMeshBumpTextureSet()
 iMeshBumpTextureReset()
 iMeshTextureSwap()
 iMeshBumpTextureSwap()
 iMeshTextureChange()
 iMeshAlphaTextureChange()
 iMeshTexturePath()
 iMeshTextureModeSet()
 iMeshTextureMipMapLodSet()
 iMeshTextureSharingSet()
 iMeshBuffersSharingSet()
 iMeshEnvMapReceiverAdd()
 iMeshEnvMapBlendSet()
 iMeshEnvMapGlassSet()
 iMeshEnvMapCasterAdd()
 iMeshEnvMapCasterRemove()
 iMeshTransfer()
MESH-BUFFERS
 iMeshVertexBufferDynamicMake()
 iMeshVertexBufferOpen()
 iMeshVertexBufferClose()
 iMeshVertexBufferSize()
 iMeshVertexBufferSizeSet()
 iMeshVertexBufferOriginal()
 iMeshFaceBufferDynamicMake()
 iMeshFaceBufferOpen()
 iMeshFaceBufferClose()
 iMeshFaceBufferSize()
 iMeshFaceBufferSizeSet()
 iMeshFaceBufferOriginal()
SKINMESH
 iSkinMeshCreate()
 iSkinMeshCreateFromMemory()
 iSkinMeshTexturesCount()
 iSkinMeshDestroy()
 iSkinMeshHide()
 iSkinMeshShow()
 iSkinMeshEulerOrientationSet()
 iSkinMeshOrientationSet()
 iSkinMeshOrientation()
 iSkinMeshOrientationAdd()
 iSkinMeshLocationSet()
 iSkinMeshLocation()
 iSkinMeshScaleSet()
 iSkinMeshPicked()
 iSkinMeshRayCheck()
 iSkinMeshAnimationSpeedSet()
 iSkinMeshAnimationTimeSet()
 iSkinMeshAnimationTime()
 iSkinMeshAnimationLength()
 iSkinMeshAnimationSetCount()
 iSkinMeshAnimationSet()
 iSkinMeshAnimationSetSet()
 iSkinMeshAnimationDataCompress()
 iSkinMeshRenderModeSet()
 iSkinMeshRenderPrioritySet()
 iSkinMeshTextureMipMapLodSet()
 iSkinMeshEnvMapCasterAdd()
 iSkinMeshEnvMapCasterRemove()
 iSkinMeshVisible()
 iSkinMeshBoundingSphereRayCheck()
 iSkinMeshBoundingSphere()
 iSkinMeshTransfer()
 iSkinMeshBonesCount()
 iSkinMeshBoneCreate()
 iSkinMeshBoneCreateByName()
 iSkinMeshBoneDestroy()
 iSkinMeshBoneChildFind()
 iSkinMeshBoneParentFind()
 iSkinMeshBoneOrientation()
 iSkinMeshBoneOrientationSet()
 iSkinMeshBoneLookAt()
 iSkinMeshBoneLocation()
 iSkinMeshBoneLocationSet()
 iSkinMeshBoneScaling()
 iSkinMeshBoneScalingSet()
 iSkinMeshBoneName()
 iSkinMeshEffectEnvTextureSet()
 iSkinMeshEffectCreate()
 iSkinMeshEffectDestroy()
 iSkinMeshEffectSet()
 iSkinMeshEffectValueSet()
 iSkinMeshEffectTextureSet()
 iSkinMeshEffectDefaultEnable()
SHADOW
 iMeshShadowCasterCreate()
 iMeshShadowCasterCreateFromMemory()
 iMeshBodyShadowCasterCreate()
 iMeshBodyShadowCasterCreateFromMemory()
 iMeshShadowCasterExtrusionSet()
 iMeshShadowCasterNormalsRecompute()
ENVIRONMENT-MAP
 iEnvMapCreate()
 iEnvMapCreateFromMemory()
 iEnvMapDestroy()
 iEnvMapFocusSet()
 iEnvMapUpdateRateSet()
SPRITE
 iSpriteCreate()
 iSpriteCreateFromMemory()
 iSpriteDestroy()
 iSpriteHide()
 iSpriteShow()
 iSpriteSet()
 iSpriteCameraSet()
 iSpriteOrientationSet()
 iSpriteLocationSet()
 iSpriteLocation()
 iSpriteScaleSet()
 iSpritePrioritySet()
 iSpriteRenderPrioritySet()
 iSpriteRenderModeSet()
 iSpriteColorSet()
 iSpriteTextureSet()
 iSpriteTextureReset()
 iSpriteTextureSwap()
 iSpriteTextureChange()
 iSpriteAlphaTextureChange()
 iSpriteMipFilterModeSet()
 iSpriteTextureModeSet()
 iSpritePicked()
 iSpriteRender()
PARTICLE
 iParticleCreate()
 iParticleCreateFromMemory()
 iParticleDestroy()
 iParticleHide()
 iParticleShow()
 iParticleRenderModeSet()
 iParticleTextureSet()
 iParticleTextureReset()
 iParticleLifeTimeSet()
 iParticleAirResistanceSet()
 iParticleGravitySet()
 iParticleColorSet()
 iParticleReset()
 iParticleEmitterCreate()
 iParticleEmitterDestroy()
 iParticleEmitterEmit()
 iParticleEmitterLocationSet()
 iParticleEmitterDirectionSet()
 iParticleEmitterSpeedSet()
 iParticleEmitterScaleSet()
 iParticleEnvMapCasterAdd()
 iParticleEnvMapCasterRemove()
TRAIL
 iTrailCreate()
 iTrailCreateFromMemory()
 iTrailDestroy()
 iTrailHide()
 iTrailShow()
 iTrailRenderModeSet()
 iTrailTextureSet()
 iTrailTextureReset()
 iTrailLifeTimeSet()
 iTrailColorSet()
 iTrailReset()
 iTrailEmitterCreate()
 iTrailEmitterDestroy()
 iTrailEmitterEmit()
 iTrailEmitterLocationSet()
 iTrailEmitterScaleSet()
 iTrailEmitterExpansionSpeedSet()
 iTrailEmitterCut()
 iTrailEmitterOrientationSet()
 iTrailEnvMapCasterAdd()
 iTrailEnvMapCasterRemove()
TEXTURES
 iTextureCreate()
 iTextureCreateFromMemory()
 iTextureDestroy()
 iTextureToNormalMap()
 iTextureMipLevelsSet()
 iTextureMipFilterSet()
INPUT-KEYBOARD
 iKeyDown()
 iKeyClick()
 iKeyUpWait()
 iTypedChar()
INPUT-MOUSE
 iMouseResolutionSet()
 iMouseWinModeSet()
 iMouseButtonDown()
 iMouseButtonClick()
 iMouseButtonUpWait()
 iMouseX()
 iMouseY()
 iMouseZ()
 iWindowsMouseHide()
 iMouseReset()
 iMouseZSet()
INPUT-JOYSTICK-GAMEPAD
 iJoyCount()
 iJoyName()
 iJoyButtonDown()
 iJoyButtonClick()
 iJoyButtonUpWait()
 iJoyAverageCenterWait()
 iJoyX()
 iJoyY()
 iJoyZ()
 iJoyXAverage()
 iJoyYAverage()
 iJoyZAverage()
 iJoyState()
 iJoyForceSet()
TEXTS
 iFontCreate()
 iFontCreateFromMemory()
 iFontDestroy()
 iFontCameraSet()
 iPrint()
 iPrintCentered()
 iPrintWidth()
 iPrintColorSet()
 iPrintsHide()
SPRINGS
 iSpringCreate()
 iSpringDestroy()
 iSpringDisable()
 iSpringEnable()
 iSpringBodySet()
 iSpringTargetBodySet()
 iSpringSet()
 iSpringDampingSet()
SOUND
 iAudioIsAvailable()
 iListenerCameraSet()
 iListenerDopplerSet()
 iSoundCreate()
 iSoundOggCreate()
 iSoundOggCreateFromMemory()
 iSoundDestroy()
 iSoundPlay()
 iSoundPlayNow()
 iSoundPlaying()
 iSoundStop()
 iSoundLocationSet()
 iSoundVelocitySet()
 iSoundFrequencySet()
 iSoundFrequency()
 iSoundVolumeSet()
NETWORK
 iNetServerStart()
 iNetClientStart()
 iNetStop()
 iNetClientDisconnect()
 iNetBodySyncCreate()
 iNetBodySyncDestroy()
 iNetFloatSyncCreate()
 iNetFloatSyncUpdate()
 iNetFloatSyncDestroy()
 iNetClientReset()
 iNetServerSendFrqSet()
 iNetClientSendFrqSet()
 iNetSessionTerminated()
 iNetClientSync()
 iNetPlayersChanged()
 iNetPlayersCount()
 iNetPlayerMachine()
 iNetLocalPlayerMachine()
 iNetPlayerId()
 iNetPlayerName()
 iNetDataSend()
 iNetData()
 iNetDataDiscard()
 iNetLag()
 iNetMinimumLag()
 iNetBPS()
 iNetBytesSent()
 iNetBytesReceived()
 iNetIgnoreContacts()
MATH
 iVectorBodyToWorldTransform()
 iVectorBodyToWorldRotate()
 iVectorMeshToWorldTransform()
 iVectorMeshToWorldRotate()
 iVectorSkinMeshToWorldTransform()
 iVectorSkinMeshToWorldRotate()
 iVectorWorldToBodyTransform()
 iVectorWorldToBodyRotate()
 iVectorWorldToMeshTransform()
 iVectorWorldToMeshRotate()
 iVectorWorldToSkinMeshTransform()
 iVectorWorldToSkinMeshRotate()
 iVectorModelToBodyTransform()
 iVectorBodyToModelTransform()
 iVectorRotate()
 iVectorEulerRotate()
 iVectorsAngleToQuaternion()
 iVectorsAngle()
 iVectorLength()
 iVectorLengthSq()
 iVectorLengthSet()
 iVectorDot()
 iVectorCross()
 iQuaternionFromAxisAngle()
 iQuaternionToAxisAngle()
 iQuaternionFromEulerAngles()
 iQuaternionToEulerAngles()
 iQuaternionInterpolate()
 iQuaternionSpline()
 iQuaternionLookAt()
 iQuaternionMultiply()
 iPlaneFromPointNormal()
 iPlaneFromPoints()
 iPlaneLineIntersection()
 iFloatTendTo()
 iFloatClamp()
 iIntClamp()
 iFloatAdd()
 iFloatAbs()
 iFloatRand()
 iIntRand()
 iSignRand()
 iFloatInterpolate()
DIALOG-BOXES
 iGDISurfaceShow()
 iGDISurfaceHide()
 iFileOpenDialog()
 iFileOpenDialogNameExtract()
 iFileSaveDialog()
 iFolderSelectDialog()
 iFileDialogSizeSet()
 iFileDialogPositionSet()
 iFileDialogViewModeSet()
 iMessageBox()
 iMessageBoxYesNo()
RENDERING-ENGINE
 iRenderingDevice()
 iWindow()
 iWindowTitleSet()
 iWindowCenter()
 iDisplayMode()
 iDisplayWidth()
 iDisplayHeight()
 iDisplayData(RECT)
 iRender()
 iScreenWipe()
 iFrameRate()
 iBackgroundColorSet()
 iFogColorSet()
 iShadowCasterCreateMode()
 iShadowColorSet()
 iShadowDisplacementSet()
 iGammaSet()
 iBoundingSphereFrustumCheckSet()
 iVertexShaderVersion()
 iPixelShaderVersion()
 iPixelShadersSupported()
 iEnvMapsSupported()
 iDynamicEnvMapsSupported()
 iMirrorPlaneSet()
 iMirrorShadowsSet()
 iRenderingEnable()
 iRenderingDisable()
 i3DPointVisible()
 i3DLocationToScreen()
 iScreenRay()
 iPickPoint()
 iScreenShot()
 iMovieSaveStart()
 iMovieSaveStop()
PROCESSING
 iExit()
 iEscEnable()
 iSettingsPanelSkip()
 iFrq()
 iFrqSet()
 iSimulationFrqSet()
 iPhysicsAccuracySet()
 iSystemTimer()
 iTic()
 iEdgeCollisionCheckSet()
 iBoundingSphereCollisionCheckSet()
 iReset()
 iCleanResetEnable()
 iProcessMessages()
FILES
 iDLLFile()
 iCommandLineFile()
 iGlobalPathMake()
 iChangeExtension()
 iFileExists()
 iFileImageSize()
 iFilePathOnly()
 iFileNameOnly()
 iFileExtOnly()
CONVERSION FUNCTIONS
 iXToPlyPolConvert()
 iXToSpgConvert()
 iXToSkyConvert()
MAXIMUM-NUMBER-OF-ALLOWED-OBJECTS


OVERVIEW


3Impact engine uses a left-handed coordinate system. X and Z axes define an horizontal
plane. When looking from the origin toward +Z, +Y points upward and +X to your right.

For clarity, we have named all functions adopting the following rules:
* function name starts with 'i'
* the first word (or words) after the 'i' is the object the function refers to. For
   example, in 'iCameraCreate', 'Camera' is the object of the function.
* the subsequent word (or words) is the action performed on the object. For
   example, in 'iCameraCreate', 'Create' is the action performed on the camera.
   If no action word is provided, it's very likely that the function will just return
   some information regarding the object, like for example iCameraLocation().

Some functions require quantities to be passed as parameters. Keep in mind as follows:
* time is in seconds.
* linear quantities are in meters.
   In particular, velocity is in meters-per-second, acceleration is in
   meters-per-(seconds^2).
* angular quantities are in degrees.
   In particular, spin is in degrees-per-minute, angular acceleration is in
   degrees-per-(seconds^2).

File paths are local. For example "sprites\\cursor.x" refers to a file named 'cursor.x'
stored inside a folder named 'sprites', which is inside the current folder.
However, you can specify absolute paths like "C:\\myfolder\\myfile.ext" if needed.
Paths like "..\\myfolder\\myfile.ext" are also valid.

Some function parameters are marked as 'Return data' in this reference. It means that the
parameter is a pointer to a structure (data memory block) that you are supposed to provide,
and that the associated memory block will be filled with return data when the function
returns after the call.

When making your own 3d models, keep in mind that:
* the world center in your modeler will be the so called 'source-model-center' when the 3d
   model is imported to 3Impact space. It is used as a reference by many functions, like for
   example iBodyLocationSet().
* the so called 'center-of-mass' is automatically assigned by the engine on body creation.
   It is another reference point used by some functions, like for example iBodyLocationCMSet().


MAIN FUNCTIONS - DLL VERSION ONLY


BOOL i3ImpactOpen(HWND,HWND)
   Initialize the game engine.
   Return TRUE if the engine was successfully initialized, FALSE otherwise.
   HWND = rendering window (windowed mode), or NULL to use default rendering window.
   HWND = rendering window (fullscreen mode), or NULL to use default fullscreen rendering window.

BOOL i3ImpactSettings(ISETTINGS*)
   Display startup configuration dialog.
   Return FALSE if the dialog was canceled by the user, TRUE otherwise.
   ISETTINGS* = pointer to a data structure defining default display settings.
                If this parameter is null, pre-defined default settings are used.
                Structure data members are as follows:
                DWORD dwAdapter = undefined behavior. Use zero.
                DWORD dwDevice = undefined behavior. Use zero.
                DWORD dwMode = display mode. For example, use 1024*768*32 to set
                               a 1024 x 768 pixels display mode. Note that this
                               setting is only used when bFullScreen is TRUE.
                DWORD MultiSampleType = undefined behavior. Use zero.
                BOOL bFullScreen = whether to set fullscreen mode (TRUE) or not (FALSE).
                BOOL bDoNotShow = whether to display the startup dialog (TRUE) or not (FALSE).
                                  If FALSE, the specified display settings are applied without
                                  allowing the user to change them.

i3ImpactMain()
   Initialize current frame processing and rendering

i3ImpactInitBegin()
   Initialize data structures and internal flags before calling
   user-defined initialization function, typically named Init().

i3ImpactInitEnd()
   Release data structures and set internal flags after calling
   user-defined initialization function, typically named Init().

i3ImpactRunBegin()
   Initialize data structures and internal flags before calling
   user-defined main loop function, typically named Run().

i3ImpactRunEnd()
   Release data structures and set internal flags after calling
   user-defined main loop function, typically named Run().

i3ImpactRender()
   Render the scene. Do not call this function from within your own
   Init() or Run() functions. Use iRender() instead.

i3ImpactExitBegin()
   Initialize data structures and internal flags before calling
   user-defined exit function, typically named Exit().

i3ImpactExitEnd()
   Release data structures and set internal flags after calling
   user-defined exit function, typically named Exit().

i3ImpactClose()
   Free all resources and quit the engine.

BOOL i3ImpactIsRendering()
   Return TRUE if the engine has been successfully initialized and is fully operational.
   This function may temporarily return FALSE under various circumstances. Make sure
   you never call engine's main functions while i3ImpactIsRendering() is FALSE.

BOOL i3ImpactIsActive()
   Return TRUE if the engine has been successfully initialized and is fully operational.
   This function may temporarily return FALSE while the rendering widow is moved or
   resized. Make sure you don't call i3ImpactRender() while i3ImpactIsActive() is FALSE.

BOOL i3ImpactIsReady()
   Return TRUE if the engine has been successfully initialized and is fully operational.
   This function may temporarily return FALSE while the rendering window is processing certain
   messages. Make sure you don't call i3ImpactRender() while i3ImpactIsReady() is FALSE.

BOOL i3ImpactIsExecuting()
   Return TRUE if the engine has been successfully initialized and is fully operational.
   This function will only return FALSE when the rendering window is closed.

BOOL i3ImpactIsInitializing()
   Return TRUE when the engine is in user-defined initialization phase.

BOOL i3ImpactIsSkippingRunPhase()
   Return TRUE if the engine can skip the user-defined main loop phase. This
   happens when processing speed is fast enough and some calls to the user's Run()
   function have to be skipped, to make sure that they aren't called more than 75
   times per second.

BOOL i3ImpactIsSkippingRenderPhase()
   Return TRUE if the engine cannot process rendering (refresh the display). This
   happens when overall processing/rendring speed isn't fast enough and some calls
   to i3ImpactRender() must be skipped to keep general loop frequency at 75 Hz.

BOOL i3ImpactErrorFlag()
   Return TRUE if the engine has detected an internal error and is about to exit.
   Note that the engine may take up to 3 processing loops to actually close and
   exit after an error is detected.

i3ImpactIsRenderingSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsActiveSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsReadySet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsExecutingSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsInitializingSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsSkippingRunPhaseSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactIsSkippingRenderPhaseSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactErrorFlagSet(BOOL)
   Force the internal flag to the specified TRUE or FALSE condition.

i3ImpactPreRenderCallbackSet(TYPE_3impactDLLPreRender)
   Specify the custom function to be used as PreRender callback.
   See iCameraPreRenderCallbackEnable() function for details.
   TYPE_3impactDLLPreRender = pointer to a user-defined function which must be of
                              type 'void __stdcall', wanting one parameter of type CAMERA*
                              as input. For example:
                              void __stdcall PreRender(CAMERA* camera){//your code here}.


CAMERA


CAMERA* iCameraCreate(float,float,float,float)
   Add a point of view. A 3d project always needs at least one camera.
   Basically, a camera is a rendering window opened on the screen.
   Return camera object.
   float,float = location of top/left corner of camera window, on the screen.
                 The two coordinates must be between 0.0f and 1.0f, where 0.0f,0.0f
                 is top/left screen corner and 1.0f,1.0f is bottom/right screen corner.
   float,float = width and height of camera window.
                 Both parameters must be between >0.0f and 1.0f, where 1.0f means
                 full width/height.
   Note: see iCameraFovSet() for info about enabling orthogonal camera mode.
   Note: unlike all other objects, camera objects are shown (active) when they are created.

iCameraDestroy(CAMERA*)
   CAMERA* = camera object to destroy.
             Note that destroying camera objects is not necessary because the engine will
             do it automatically on exit.
   NOTE: you should not destroy a camera before also destroying any sprite or font using
   it as a rendering target. See iSpriteCreate() and iFontCreate() for details.
   If you need to disable rendering for a camera, call iCameraHide().

iCameraHide(CAMERA*)
   Disable the specified rendering window.
   CAMERA* = camera object
   NOTE: if disabling the camera leaves any part of the screen 'uncovered' by rendering,
   garbage may fill that part of the screen on some systems.

iCameraShow(CAMERA*)
   CAMERA* = camera object

iCameraSet(CAMERA*,float,float,float,float)
   Change specified camera window position and size, on the screen.
   CAMERA* = camera object.
   See iCameraCreate() for other parameters meaning.

iCameraFovSet(CAMERA*,float)
   CAMERA* = camera object
   float = field of view (FOV), in degrees. Default 60.0f.
           Fov is basically the zoom effect. The smaller the fov angle, the bigger
           the zoom effect.
   NOTE: specify a negative FOV value to switch the camera to orthogonal projection mode.
   Keep in mind that, in orthogonal projection mode, no perspective is applied and
   view width (zooming) is defined by the absolute value of FOV. For example, set
   FOV = -5.0f to set a 5.0f meter wide view.
   Also note that orthogonal projection cannot render the fixed background,
   therefore skyboxes should not be used or should be hidden.
   Finally make sure the camera is properly located. Objects too far or too
   close or behind the camera are not rendered! See iCameraClipDistanceSet().

float iCameraFov(CAMERA*)
   Return specified camera field of view, in degrees.
   CAMERA* = camera object

iCameraClipDistanceSet(CAMERA*,float)
   CAMERA* = camera object
   float = clip distance. Default 10000.0f.
           Objects farther than the clip distance will not be rendered.

iCameraLookAt(CAMERA*,D3DXVECTOR3*,float)
   CAMERA* = camera object
   D3DXVECTOR3* = 3d location, in meters.
                  The camera is smoothly orientated toward the specified 3d location.
                  NOTE: this function will not work properly if this vector is perfectly
                  vertical. If so, instead of calling this function, you should compute
                  the final orientation with iQuaternionLookAt() and then apply it to
                  the camera with iCameraOrientationSet().
   float = camera quickness factor, from 0.0f to 1.0f (instant orientation).

iCameraEulerOrientationSet(CAMERA*,float,float,float,char*)
   CAMERA* = camera object
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.

iCameraOrientationSet(CAMERA*,D3DXQUATERNION*)
   CAMERA* = camera object
   D3DXQUATERNION* = quaternion specifying an orientation.

iCameraOrientation(CAMERA*,D3DXQUATERNION*)
   CAMERA* = camera object
   D3DXQUATERNION* = orientation. Return data.

iCameraLocationSet(CAMERA*,D3DXVECTOR3*)
   CAMERA* = camera object
   D3DXVECTOR3* = 3d location

iCameraLocation(CAMERA*,D3DXVECTOR3*)
   CAMERA* = camera object
   D3DXVECTOR3* = 3d location. Return data.

iCameraAutoWipeSet(CAMERA*,int)
   Set automatic wipe mode of camera window before the rendering of every frame.
   CAMERA* = camera object
   int = wipe mode
         0 = wipe nothing
         1 = wipe graphics only
         2 = wipe depth-buffer only
         3 = wipe both graphics and depth-buffer (default)

iCameraSpritesOnlySet(CAMERA*,BOOL)
   CAMERA* = camera object
   BOOL = whether to exclude from rendering all objects except sprites and texts.
          TRUE enables sprite-text-only mode. Default is FALSE.
          
iCameraMirrorEnable(CAMERA*,BOOL)
   CAMERA* = camera object
   BOOL = whether to render the scene mirrored (TRUE) or not. Default is FALSE.
          
iCameraPreRenderCallbackEnable(CAMERA*,BOOL)
   Enable/disable the pre-rendering callback for the specified camera.
   Pre-rendering callback is typically used with multiple simultaneous cameras
   to allow your DLL code to change mesh location, orientation and rendering
   parameters before processing each single camera view.
   See the sample code named PreRenderCallback for a simple pre-rendering callback
   implementation.
   CAMERA* = camera object
   BOOL = whether to enable (TRUE) or disable (FALSE) the pre rendering callback
          Default is FALSE.
   NOTE: see i3ImpactPreRenderCallbackSet() if you want to use this functionality
   with the DLL version of 3Impact game engine.

iCameraVelocitySet(CAMERA*,D3DXVECTOR3*)
   CAMERA* = camera object
   D3DXVECTOR3* = camera velocity.
   NOTE: camera velocity is used only to compute Doppler effect. You don't have to
   update camera velocity by calling this function, if Doppler factor is 0.0f.
   See iListenerDopplerSet() for more.

DWORD iCameraEffectCreate(char*)
   Return a pointer to the compiled post-process pixel-shader effect to be used as parameter for
   functions like iCameraEffectSet() and iCameraEffectDestroy().
   char* = source shader effect file name (.fx/.fxo format).
           The specified effect determine the post-process rendering technique to use for the
           camera. If this parameter is NULL, a default post-process rendering technique is used.
   NOTE: the engine doesn't automatically destroy the effect created with this function.
         Make sure you call iCameraEffectDestroy() before terminating the application.

iCameraEffectDestroy(DWORD)
   Destroy the specified post-process effect. See iCameraEffectCreate() for details.
   DWORD = pointer to the shader effect

iCameraEffectSet(CAMERA*,DWORD)
   Assign the specified post-process effect to the specified camera.
   CAMERA* = camera object
   DWORD = pointer to the effect
           NOTE: set this parameter to NULL to remove any post-process effect from the camera

iCameraEffectStack(CAMERA*,DWORD,float)
   Add the specified post-process effect to the specified camera.
   All effects will be processed in the same order as they are added (stacked).
   CAMERA* = camera object
   DWORD = pointer to the effect
           NOTE: set this parameter to NULL to remove all post-process effects (clear the stack).
   float = scaling factor. If different than 1.0f, the render-target texture is resized after the pixel-shader is processed,
           before it is copied to the screen (or to the next render target, used as source by the next pixel-shader).
           If negative (and between -1.0f and 0.0f), the pixel-shader will only operate on smaller part of the source texture and render target.
           Please see the 'PostProcessingStacked' sample code for an example of usage.

iCameraEffectValueSet(CAMERA*,char*,VOID*,UINT)
   Set constant data for the post-process pixel-shader associated with the specified camera.
   CAMERA* = camera object
   char* = constant data name, as declared in the .fx file
   VOID* = pointer to the constant data buffer
   UINT = length of constant data buffer, in bytes

iCameraEffectTextureSet(CAMERA*,char*,TEXTURE*)
   Set a texture to be used by the post-process pixel-shader associated with the specified camera.
   CAMERA* = camera object
   char* = texture name, as declared in the .fx file
   TEXTURE* = free texture object. See iTextureCreate().


LIGHT


iLightDirectionalSet(D3DXVECTOR3*,D3DXVECTOR4*)
   D3DXVECTOR3* = light direction. Default is (0.0f,-1.0f,0.0f).
   D3DXVECTOR4* = pointer to a 4-vector structure specifying the light color.
                  The first 3 parameters are Red, Green and Blue components respectively.
                  The fourth parameter is the amount of minimal light. The minimal
                  light is the light reflected by the dark-side of the objects.
                  Zero minimal light causes dark-side of objects to be completely black.
                  1.0f minimal light causes them to be as bright as the illuminated side
                  of objects.
                  Default is (1.0f,1.0f,1.0f,0.3f).

iLightLocalLocationSet(int,D3DXVECTOR3*)
   int = light number (from 0 to 2).
         NOTE: only meshes enabled with iMeshLocalLightsEnable() will be affected by local lights.
   D3DXVECTOR3* = 3d location. Default is (0.0f,0.0f,0.0f).

iLightDirectionalColor(D3DXVECTOR4*)
   Return the current directional light color.

iLightLocalColorSet(int,D3DXVECTOR4*)
   Set local light properties.
   int = light number (from 0 to 2).
         NOTE: only meshes enabled with iMeshLocalLightsEnable() will be affected by local lights.
   D3DXVECTOR4* = pointer to a 4-vector structure specifying a the color of the light.
                  The first 3 parameters are Red, Green and Blue components respectively.
                  The fourth parameter is the rate of light intensity reduction. The bigger
                  the factor, the smaller the distance reached by the light.
                  Defaults are:
                  - light 0, (1.0f,0.0f,0.0f,1.0f)
                  - light 1, (0.0f,1.0f,0.0f,1.0f)
                  - light 2, (0.0f,0.0f,1.0f,1.0f)


SKYBOX


SKYBOX* iSkyBoxCreate(char*)
   Return skybox object.
   char* = source .sky file name. You can generate .sky files as follows:
           (1) in your modeler create a 2 meters wide cube.
           (2) center the model respect to world origin.
           (3) flip all faces inward so that they are visible from world origin.
           (4) you will need a special scene rendering software to generate so
               called 'skybox textures'. They are basically six different image
               files representing a scenery as seen from six 90-degrees-fov cameras
               placed at the origin and oriented respectively toward +X,-X,+Y,-Y,+Z,-Z.
           (5) Apply each texture to each cube face. +X texture to +X face, -X texture
               to -X face, +Y texture to +Y face, and so on.
           (6) save the model to six different .x files, so that each file contains only
               one face of the original cube.
               The file name of each model must be in the form 'name_XX.x', where XX can be
               'px' (positive X face), 'nx' (negative X face),
               'py' (positive Y face), 'ny' (negative Y face),
               'pz' (positive Z face), 'nz' (negative Z face).
           (7) run 3Impact Converter and select 'Generate skybox...' option.
           (8) select one of the 'name_XX.x' file and perform the conversion to generate
               a .sky file.
               NOTE: you can also use the iXToSkyConvert() function to do the conversion.
   NOTE: keep in mind that there is no need at all to make your own skybox model, unless
   you need to make a different skybox shape (i.e. sphere).
   You can actually just replace the textures we have made for the skybox01.sky file with
   your own .jpg textures. Each single texture can be any ^2 size (1, 2, 4, 8, 16, etc).
   The textures should be created by using a ray-tracing application (3d renderer). Each
   texture should be a 90 degree view (Field Of View = 90 degrees) toward the corresponding
   world axis direction. For example, skybox01_nx.jpg should be the picture obtained by
   rendering the scene with the camera looking toward -X world axis ('nx' means 'negative x').
   So skybox01_ny.jpg is the same but with the camera looking toward -Y world axis, and so on.
   NOTE: skyboxes are hidden when they are created. You can show them with iSkyBoxShow().

iSkyBoxDestroy(SKYBOX*)
   SKYBOX* = skybox object
             Note that destroying skybox objects is not necessary because the engine will
             do it automatically on exit.

iSkyBoxHide(SKYBOX*)
   SKYBOX* = skybox object

iSkyBoxShow(SKYBOX*)
   SKYBOX* = skybox object
   NOTE: you should never show more than one skybox at a time. Only one skybox is rendered.
   Any other 'shown' (visible) skybox is not rendered but still processed, thus wasting
   processing power.

iSkyBoxColorSet(SKYBOX*,float,float,float)
   SKYBOX* = skybox object
   float = red (0.0f to 1.0f)
   float = green (0.0f to 1.0f)
   float = blue (0.0f to 1.0f)

iSkyBoxEnvMapCasterAdd(SKYBOX*)
   SKYBOX* = skybox object to be added to the list of skyboxes that are reflected/refracted
             by dynamic environment surfaces. See iEnvMapUpdateRateSet() for more.

iSkyBoxEnvMapCasterRemove(SKYBOX*)
   SKYBOX* = skybox object to be removed from the list. See iSkyBoxEnvMapCasterAdd().


BODY


BODY* iBodyCreate(char*)
   Return polyhedron-based body object.
   char* = source .ply file name.
           The .ply is derived from polygonal geometry to be used as a reference when
           computing collision detection. Such a geometry is not rendered, however
           a texture mapped 3d model is typically associated to the body, in order
           to visualize it. There is no need for the invisible and the visible geometry to
           match, but you will typically model the invisible geometry so that it closely
           matches at least those parts of the visible mesh that are supposed to collide
           with other objects
           You can generate .ply (polyhedron-based, static body) files as follows:
           (1) in your modeler create a polygonal model with no textures.
           (2) if you plan to perform different restitution and friction effects, depending
               on what triangles of the model are involved in a collision, in your 3d modeler
               assign different materials to each part of the model. Each part will be seen
               as a sub-part (SUBPART*) by the engine.
           (3) save the model as an .x file with a name like 'name_R.x', where R is a
               value specifying a 'resolution' in meters. In order to speed up collision
               detection computation, the engine will 'split' the model to a number of parts,
               approximately the size of the specified resolution. As a general rule, resolution
               value should be about the size of an average sphere (dynamic bodies), among those
               involved in the collision. Examples of valid names are 'name_5.x', 'name_7.23.x'.
           (4) run 3Impact Converter and select 'Generate polyhedron-based body...' option.
           (5) select the source 'name_X.x' file and perform the conversion to generate
               a .ply file. note that a companion .pol file is generated along with it.
               NOTE: you can also use the iXToPlyPolConvert() function to do the conversion.
               In this case, you don't have to specify the grid resolution in the file name.
   NOTE: bodies are disabled when they are created. You can enable them with iBodyEnable().

BODY* iBodyCreateFromMemory(char*,int,char*,int)
   Return polyhedron-based body object.
   char* = pointer to the first byte of a .ply file previously loaded into memory.
   int = size of .ply file in memory, in bytes.
   char* = pointer to the first byte of a .pol file previously loaded into memory.
   int = size of .pol file in memory, in bytes.
   See also iBodyCreate().

BODY* iBodySGCreate(char*,float)
   Return sphere-group-based body object.
   char* = source .spg file name.
           The .spg file is derived from two meshes. The first one must be a group of
           polygonal spheres to be used as a reference when computing collision detection.
           The second must be a group of polygonal closed hulls to be used as a reference
           to compute mass distribution (mass properties) to properly process dynamics behavior.
           Both geometries are not rendered, however a texture mapped polygonal model is
           typically associated to the body, in order to visualize it.
           You can generate .spg (sphere-group-based, dynamic body) files as follows:
           (1) in your modeler create an object made of polygonal spheres only, with no textures.
               Note that processing time for collision detection is proportional to the number
               of spheres. The rule is trying to keep the number of spheres as small as possible.
               Also, note that the number of faces for this model must not exceed 65536.
           (2) save the model as an .x file with a name like 'name_.x'. An '_' (underscore)
               must precede the dot.
           (3) in your modeler create a polygonal object made of closed hulls, with no textures.
               Note that the number of vertices for this model must not exceed 10000.
           (4) save the model as an .x file with a name like 'name__.x'. Two '__' (underscores)
               must precede the dot. 'name' must be the same used for the previous .x file.
           (5) run 3Impact Converter and select 'Generate sphere-group-based body...' option.
           (6) select the source 'name_.x' file (the one with one single underscore) and
               perform the conversion to generate an .spg file.
               NOTE: you can also use the iXToSpgConvert() function to do the conversion.
   float = total mass. As a reference, total mass for one liter of water (1 kg or 2.2 pounds)
           is about 1.0f.
           Setting a total mass too small may cause unpredictable behaviors, including
           severe processing slowdown.
           NOTE: setting this value to -1.0f will create a static sphere-group-based body.
   NOTE: bodies are disabled when they are created. You can enable them with iBodyEnable().

BODY* iBodySGCreateFromMemory(char*,int,float)
   Return sphere-group-based body object.
   char* = pointer to the first byte of a .spg file previously loaded into memory.
   int = size of .spg file in memory, in bytes.
   float = total mass.
   See also iBodySGCreate().

BODY* iBodySphereCreate(float,D3DXVECTOR3*,float)
   Return sphere-group-based body object. It is a sphere group made of one
   single sphere with specified mass and radius.
   float = radius
   D3DXVECTOR3* = sphere center offset. It usually is &D3DXVECTOR3(0.0f,0.0f,0.0f)
   float = total mass. See iBodySGCreate()

iBodyDestroy(BODY*)
   BODY* = body object
           Note that destroying body objects is not necessary because the engine will
           do it automatically on exit.

iBodyDisable(BODY*)
   BODY* = body object
           Collision detection and dynamics is not processed for disabled bodies.

iBodyEnable(BODY*)
   BODY* = body object to re-enable. See iBodyDisable().

int iBodyStatus(BODY*)
   Return specified body status as follows:
   bit 0, TRUE for enabled, FALSE for disabled
   BODY* = body object
   
MESH* iBodyMeshCreate(char*,BODY*)
   Return mesh object.
   Bodies are 'solid' but invisible. Attaching meshes to them is usually necessary
   to show them. This function creates a mesh and attach it to the specified body.
   Multiple meshes can be created and attached to the same body by calling this
   function multiple times.
   char* = source .x file name.
           See iMeshCreate() to know how to generate proper .x files.
   BODY* = body to attach the mesh to.
           Destination body can be either polyhedron-based or sphere-group-based.
   NOTE: meshes are hidden when they are created. You can show them with iMeshShow().

MESH* iBodyMeshPartCreate(char*,int,BODY*)
   Identical to iBodyMeshCreate() except that it creates the mesh by only 'extracting'
   the geometry that is texture mapped with the specified texture ('int' parameter):
   See also iMeshPartCreate().

MESH* iBodyMeshCreateFromMemory(char*,int,char*,int,int,BODY*)
   See iMeshCreateFromMemory() for parameters meaning (except BODY*).

MESH* iBodyMeshPartCreateFromMemory(char*,int,char*,int,int,int,BODY*)
   Identical to iBodyMeshCreateFromMemory() except that it creates the mesh by only 'extracting'
   the geometry that is texture mapped with the specified texture (last 'int' parameter).
   See also iMeshPartCreate().

SKINMESH* iBodySkinMeshCreate(char*,char*,BODY*)
   Return skinmesh object.
   This function is like iBodyMeshCreate(), but it creates a skinmesh. See also iSkinMeshCreate().

SKINMESH* iBodySkinMeshCreateFromMemory(char*,int,char**,int*,char*,BODY*)
   See iSkinMeshCreateFromMemory() for parameters meaning.

MESH* iBodyMeshBumpCreate(char*,char*,BOOL,BODY*)
   Return mesh object.
   This function is like iBodyMeshCreate() but it creates a mesh with a
   bump-map assigned to it.
   char* = source .x file name. See iMeshCreate() for details.
   char* = source bump-map texture file name (bmp, dds, dib, jpg, png, tga).
           See iMeshBumpCreate().
   BOOL = whether to convert the image to a normal-map. See iMeshBumpCreate().
   BODY* = body to attach the mesh to. See iBodyMeshCreate().
   NOTE: meshes are hidden when they are created. You can show them with iMeshShow().

MESH* iBodyMeshBumpCreateFromMemory(char*,int,char*,int,int,char*,int,int,BOOL,BODY*)
   char* = pointer to .x file in memory.
   int = size of .x file in memory, in bytes.
   char* = pointer to texture file in memory.
   int = size of texture file in memory, in bytes.
   int = texture's unique identifier.
   char* = pointer to bumpmap image file in memory.
   int = size of bumpmap image file in memory, in bytes.
   int = bumpmap unique identifier.
   BOOL = whether to convert the source image. See iMeshBumpCreate().
   BODY* = body to attach the mesh to.
   See also iMeshBumpCreateFromMemory().

iBodyMassModelSet(BODY*,char*,float)
   Change the mass geometry for the specified body. This function also
   allows you to change a static, polyhedron-based body created with iBodyCreate()
   into a dynamic body.
   BODY* = body object. Can be either sphere-group based, originally created
           with iBodySGCreate() or static, created with iBodyCreate().
   char* = source .x file name, the 3d model to use as a reference to compute mass distribution.
           See iBodySGCreate() for more about mass model geometry.
   float = new total mass. If this parameter is bigger than zero, the specified body becomes dynamic.

iBodyMassSet(BODY*,float)
   Changes the total mass for the specified body.
   BODY* = body object.
   float = new total mass. Set this value to zero to make the specified body static.

iBodySurfaceStickinessSet(BODY*,float)
   BODY* = body object.
   float = stickiness factor. By default it is 0.001f, which produces a small force which
           keeps bodies together and prevents small-scale 'jittering' on continuous contacts,
           like resting on ground.

iBodySurfaceDriveSet(BODY*,float)
   BODY* = body object
   float = body surface drive, between 0.0f and 1.0f (but see note, below). Default is 0.0f.
           Bodies tend to overlap ('sink' one into the other) when strong forces are involved.
           Typical case, a very strong gravity pushing down a body resting on ground.
           This parameter allows you to add some 'drive' to the surfaces to counter-balance this effect.
           NOTE: because each body has it's own surface drive factor, the actual factor used on collisions
           is the biggest between the two surfaces involved.
           NOTE: if the factor is negative (between -1.0f, maximum drive, and 0.0f, no drive),
           a different, stronger algorithm is used to prevent body overlapping.

iBodyEulerOrientationSet(BODY*,float,float,float,char*,BOOL)
   BODY* = body object
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.
   BOOL = TRUE to reset memorized previous orientation too (recommended).
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

iBodyOrientationSet(BODY*,D3DXQUATERNION*,BOOL)
   BODY* = body object
   D3DXQUATERNION* = quaternion specifying an orientation.
   BOOL = TRUE to reset memorized previous orientation too (recommended).
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

float iBodyOrientationSeek(BODY*,D3DXQUATERNION*,float)
   If executed at every Run() loop, apply torque to the specified body to progressively
   orient it and match the specified orientation.
   Return the angle between current orientation and target orientation.
   BODY* = body object
   D3DXQUATERNION* = quaternion specifying an orientation.
   float = intensity, a factor defining the amount of torque to apply.
   NOTE: it is recommended that the body has some rotational damping (see
   for example iBodyDampingSet() function), to avoid a 'bouncing' effect
   about the target orientation.

D3DXQUATERNION* iBodyOrientation(BODY*,D3DXQUATERNION*)
   BODY* = body object
   D3DXQUATERNION* = orientation. Return data.
   NOTE: this function returns a pointer to the orientation quaternion provided as parameter,
   so that this function can be directly used as a parameter for another function.

float iBodyYaw(BODY*)
   Return specified body yaw (about Y axis).
   BODY* = body object

float iBodyPitch(BODY*)
   Return specified body pitch (about X axis).
   BODY* = body object

float iBodyRoll(BODY*)
   Return specified body roll (about Z axis).
   BODY* = body object

iBodyEulerOrientationAdd(BODY*,float,float,float,char*,BOOL)
   BODY* = body object
   floats, char* = degrees to add to current body orientation for every second.
                   See iBodyEulerOrientationSet() for more on these parameters.
                   Note that this function should be executed at every Run() loop
                   to work properly.
   BOOL = TRUE to reset memorized previous orientation (recommended).
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

iBodyOrientationAdd(BODY*,D3DXQUATERNION*,BOOL)
   BODY* = body object
   D3DXQUATERNION* = rotation to add to current body orientation for every second.
                     Note that this function should be executed at every Run() loop
                     to work properly.
   BOOL = TRUE to reset memorized previous orientation (recommended).
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

iBodyLocationSet(BODY*,D3DXVECTOR3*,BOOL)
   BODY* = body object
   D3DXVECTOR3* = 3d location
   BOOL = TRUE to reset memorized previous location too (recommended).
   NOTE: the center of the source model is used as a reference, not the center of mass
   computed by the engine. The object center is the world-center in your 3d modeler,
   when the object is exported to an .x file.
   NOTE: because rotations are always performed about the center of mass instead,
   setting the body orientation FIRST, and its location THEN, is recommended.
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

iBodyLocationCMSet(BODY*,D3DXVECTOR3*,BOOL)
   BODY* = body object
   D3DXVECTOR3* = 3d location
   BOOL = TRUE to reset memorized previous location too (recommended).
   NOTE: unlike iBodyLocationSet(), this function sets the location for the specified body
   using its center of mass as a reference. The center of mass is automatically computed by
   the engine.
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

D3DXVECTOR3* iBodyLocation(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = location vector. Return data.
                  The vector is filled with the absolute location of the source-model-center,
                  for the specified body. See also iBodyLocationSet().
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

D3DXVECTOR3* iBodyPreviousLocation(BODY*,D3DXVECTOR3*)
   Retrieve body location at previous Run() loop. See iBodyLocation() for more.

D3DXVECTOR3* iBodyLocationCM(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = location vector. Return data.
                  The vector is filled with the absolute location of center of mass for the
                  specified body. See also iBodyLocationCMSet().
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iBodyLocationAdd(BODY*,D3DXVECTOR3*,BOOL)
   BODY* = body object
   D3DXVECTOR3* = meters to add to current body location for every second.
                  Note that this function should be executed at every Run() loop
                  to work properly.
   BOOL = TRUE to reset memorized previous location (recommended).
   NOTE: if clean reset mode is enabled, any joint/wheel associated with the body
   must be destroyed before calling this function. See iCleanResetEnable() for more.

D3DXVECTOR3* iBodyCMOffset(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = offset vector. Return data.
                  The vector is filled with the center of mass offset for the
                  specified body, respect to its model-center.
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iBodySpinSet(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = spin vector.
                  The vector direction is the axis of rotation (absolute).
                  The length of the vector is the rotation speed (spin).

iBodySpin(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = spin vector. See also iBodySpinSet().

iBodyVelocitySet(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = velocity vector.

iBodyVelocity(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = velocity vector. Return data.

float iBodyKmh(BODY*)
   Return specified body speed, in kilometers per hour (KPH).
   BODY* = body object
   NOTE: you can compute miles per hour with MPH = KPH*0.6215

iBodyPointVelocity(BODY*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return the velocity of a body point.
   BODY* = body object
   D3DXVECTOR3* = body point to compute velocity for. Source-model-center relative coordinates.
   D3DXVECTOR3* = velocity vector. Return data.

iBodyDampingSet(BODY*,float,float,float,float)
   Damping is a technique used to limit the 'energy' of a body (extremely high speed,
   extremely fast spinning, etc), in order to minimize improper simulation behaviors.
   Damping tend to disrupt simulation realism, so it's all about finding the balance
   between damping amount and simulation realism.
   BODY* = body object
   float = speed beyond which linear damping is applied.
   float = linear damping factor (reduction-per-second, between 0.0f and 1.0f).
           It is like multiplying the current amount by the specified factor, every second.
   float = spin beyond which angular damping is applied.
   float = angular damping factor (reduction-per-second, between 0.0f and 1.0f).
           It is like multiplying the current amount by the specified factor, every second.
   NOTE: if speed or spin are bigger than specified limits, they are multiplied by damping
   factors. It means that if damping factor is 1.0f, no damping is applied. If it is 0.0f,
   velocity and spin are immediately set to zero (the body stops immediately traveling or
   spinning as soon as the speed/spin limit is reached). Typical damping factor is 0.25f.
   By default, bodies perform no damping.

iBodyDamping2Set(BODY*,float,float,float,float)
   Set secondary damping factors that are independent from main damping enabled
   with iBodyDampingSet(). Typical usage of secondary damping is preventing very
   high speeds/spins while leaving the main damping system available for normal
   speeds/spins control. See iBodyDampingSet() for parameter meaning.

iBodyDirectionalAngularDampingSet(BODY*,float,float,float,float)
   BODY* = body object
   float = spin (in meters-per-second) beyond which linear damping is applied.
   float = angular damping factor (reduction-per-second, between 0.0f and 1.0f), X axis.
   float = angular damping factor (reduction-per-second, between 0.0f and 1.0f), Y axis.
   float = angular damping factor (reduction-per-second, between 0.0f and 1.0f), Z axis.
   NOTE: directional means that you can set a different damping factor for each body-relative
   axis of rotation (local XYZ).
   NOTE: setting angular directional damping excludes normal angular damping and vice-versa.

iBodyDirectionalLinearDampingSet(BODY*,float,float,float,float)
   BODY* = body object
   float = speed (in meters-per-second) beyond which linear damping is applied.
   float = linear damping factor (reduction-per-second, between 0.0f and 1.0f), X axis.
   float = linear damping factor (reduction-per-second, between 0.0f and 1.0f), Y axis.
   float = linear damping factor (reduction-per-second, between 0.0f and 1.0f), Z axis.
   NOTE: 'directional-linear' means that you can set a different damping factor for
   each body-relative axis (local XYZ).
   NOTE: setting linear directional damping excludes normal linear damping and vice-versa.

iBodyTorqueApply(BODY*,D3DXVECTOR3*)
   Apply an angular force (torque) to the specified body.
   BODY* = body object
   D3DXVECTOR3* = torque.
                  Vector direction is the axis of rotation (absolute).
                  Length of the vector is angular force (torque) intensity.
   NOTE: resulting angular velocity depends on total body mass.
   So, using iBodyAngularAccelerationApply() can be easier.

iBodyAngularAccelerationApply(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = angular acceleration, in degrees-per-second^2.
                  Vector direction is the axis of rotation (absolute).
                  Length of the vector is angular acceleration intensity.

iBodyForceApply(BODY*,D3DXVECTOR3*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = force.
   D3DXVECTOR3* = point the force is applied to.
                  Point coordinates are body-center-of-mass relative. If NULL, the
                  center of mass is assumed.
   NOTE: resulting acceleration depends on total body mass. For example, if you apply
   one-meter-long force-vector to a still body with mass=5, for one second,
   the body will travel 1/5 meters (0.2f). If you apply the same force to a body with
   mass=1, it will travel 1.0f meter instead.
   So, using iBodyAccelerationApply() is easier, if application point
   is the body center of mass.

iBodyAccelerationApply(BODY*,D3DXVECTOR3*)
   BODY* = body object
   D3DXVECTOR3* = acceleration, in meters-per-second^2.
                  The length of the vector is acceleration intensity.

iBodyPhysicsReset(BODY*)
   Completely stop (remove energy from) a body.
   BODY* = body object.
   NOTE: because calling this function also disables the collision detection system
   for the current Run() loop, executing this function at every loop is not recommended.

int iBodySphereCount(BODY*)
   Return total number of sub-parts (spheres) forming the specified body.
   BODY* = body object (must be sphere-group-based)

SUBPART* iBodySphere(BODY*,int)
   Return sub-part (sphere) object.
   BODY* = body object (must be sphere-group-based)
   int = sub-part (sphere) index.
         Defines the sphere object to return as sub-part object.
         The first sphere in the group has index = 0,
         the second = 1, and so on.

iBodySphereCenter(SUBPART*,D3DXVECTOR3*)
   SUBPART* sub-part (sphere) object
   D3DXVECTOR3* = sphere center location. Return data.
                  Note that the location is body-center-of-mass relative.
                  You can convert it to source-model-center relative with
                  iVectorBodyToModelTransform() function.
                  You can convert it to absolute coordinates with
                  iVectorBodyToWorldTransform() function.

float iBodySphereRadius(SUBPART*)
   Return radius of specified sub-part (sphere)
   SUBPART* sub-part (sphere) object

int iBodyScan(BODY*,D3DXVECTOR3*,D3DXVECTOR3*,float,D3DXVECTOR3*,D3DXVECTOR3*)
   Return subpart hit by the scan, or -1 if nothing is hit by the scan.
   BODY* = body object to scan
   D3DXVECTOR3* = scan origin
   D3DXVECTOR3* = scan direction. The length of this vector will be the length of the
                  scanning capsule.
   float = scan radius (capsule radius)
   D3DXVECTOR3* = contact point (absolute coordinates). Return data.
   D3DXVECTOR3* = contact normal (absolute orientation, outward from body surface). Return data.
   NOTE: the scan is performed checking the specified capsule against the specified body, for
   intersections. Only the intersection closer to origin is considered, in case the
   capsule intersects the body at two or more points.
   NOTE: a scan traversing a large number of polygons or dynamic body's spheres is
   computationally expensive. Furthermore, a scan traversing more than 100 polygons
   will miss some intersections.
   IMPORTANT: intersections within 'scan radius' from the 'scan origin' are not detected!
   Make sure your scan starts 'radius' meters before the possible intersection area.

BOOL iBodyEnteringMesh(BODY*,D3DXVECTOR3*,MESH*)
   Return TRUE if the specified body is entering (passing through the surface of) the
   specified mesh, FALSE otherwise.
   BODY* = body object
   D3DXVECTOR3* = reference body point. It is an offset from the source-model-center.
                  The function will return TRUE when the specified body's point
                  crosses the surface of the specified mesh.
   MESH* = mesh object

BOOL iBodyExitingMesh(BODY*,D3DXVECTOR3*,MESH*)
   Return TRUE if the specified body is exiting (passing through the surface of) the
   specified mesh, FALSE otherwise.
   BODY* = body object
   D3DXVECTOR3* = reference body point. It is an offset from the source-model-center.
                  The function will return TRUE when the specified body's point
                  crosses the surface of the specified mesh.
   MESH* = mesh object


BODYBODY


BODYBODY* iBodyBodyCreate(BODY*,BODY*)
   Return bodybody (collision couple) object.
   BODY* = first body object of the collision couple to enable. Must be sphere-group-based.
   BODY* = second body object of the collision couple to enable. Can be either
           sphere-group-based or polyhedron-based.
   NOTE: by default, the engine doesn't perform any collision detection. The two
   BODY* parameters of this function tell the engine what body couple should
   be checked for collision.
   NOTE: collision between two polyhedron-based bodies is not supported.
   NOTE: the body with bigger mass should be the second parameter.

iBodyBodyDestroy(BODYBODY*)
   BODYBODY* = bodybody object
   Disable collision detection/response for the specified collision couple.
   The collision couple can be re-enabled with iBodyBodyCreate().
   Note that destroying bodybody objects is not necessary because the engine will
   do it automatically on exit.

iBodyBodyEnable(BODYBODY*,BOOL)
   BODYBODY* = bodybody object
   BOOL = whether to enable (TRUE, default) or disable (FALSE) the specified
          collision couple.
   Dynamically enabling/disabling collision detection for specific bodies is
   usually necessary if large numbers of collision couples have been created.
   Typically, you will only enable those collision couples (bodybody objects)
   that can potentially collide (for example, they trajectories are meeting),
   thus minimizing collision detection computation and saving a lot of CPU work.
   NOTE: unlike iBodyBodyDestroy(), this function preserves bodybody properties
   like restitution, friction, etc.

iBodyBodyCollisionResponseEnable(BODYBODY*,BOOL)
   BODYBODY* = bodybody object
   BOOL = whether to enable (TRUE, default) or disable (FALSE) collision
          response for the specified collision couple.
   By default, the engine applies the forces generated by body collisions
   to perform proper contact response dynamics.
   By passing FALSE to this function you can disable collision response while
   keeping the collision detection system working. It means that, for example,
   two colliding balls will simply pass one through the other, but collision
   info can still be retrieved with iBodyBodyFeedback().

iBodyBodyRestitutionSet(BODYBODY*,float)
   BODYBODY* = bodybody object
   float = restitution (between 0.0f and 1.0f inclusive, default is 0.5f)
           It is the bounciness of the two bodies when colliding. The smaller the
           factor, the lower the bounciness.
   NOTE: restitution is set the same for all sub-parts forming the two bodies.
   You can set specific restitution for each sub-part with iBodyBodySubpartRestitutionSet().

iBodyBodyFrictionSet(BODYBODY*,float)
   BODYBODY* = bodybody object
   float = friction (greater than 0.0f, default is 0.0f)
           Zero means that there is no friction. Set a very high value for
           no-slipping friction (max is 3.402823466e+38f).
           The effect of this parameter changes, depending on friction model
           used. See iBodyBodyFrictionModelSet() for more.
   NOTE: friction is set the same for all sub-parts forming the two bodies.
   You can set specific friction for each sub-part with iBodyBodySubpartFrictionSet().

iBodyBodyFrictionModelSet(BODYBODY*,int)
   BODYBODY* = bodybody object
   int = friction model (0 = Coulomb (default), 1 = friction pyramid).
         When Coulomb friction model is used, the friction parameter set with
         ...FrictionSet() instructions resembles real-world friction constant.
         You can use 10.0f as typical value, but may vary greatly depending on
         body masses.
         When friction pyramid model is used, it represents a different friction
         constant, typically around 1.0f.
   NOTE: friction model is set the same for all sub-parts forming the two bodies. You can
   set specific friction model for each sub-part with iBodyBodySubpartFrictionModelSet().

iBodyBodySplitFrictionSet(BODYBODY*,float,float,float,float)
   Friction simulation is a complex issue that may require fine tuning. For example,
   to perfectly simulate wheel friction behavior, you may need to set different
   friction parameters for rolling and side directions.   
   BODYBODY* = bodybody object
   float = side friction when sliding along the X local axis of the first
   body (collision couple).
   float = side slip factor. Intermediate friction allows a certain amount of slipping,
           but you may need to tune this parameter as well to achieve accurate slip
           effects, especially for wheels.
   float = rolling-direction friction. Same as above, but for body rolling-direction.
   float = rolling direction slip factor. Same as above, but for body rolling-direction.
   NOTE: split friction parameters are set the same for all sub-parts forming the two bodies.
   You can set specific parameters for each sub-part with iBodyBodySubpartSplitFrictionSet().

iBodyBodySubpartRestitutionSet(BODYBODY*,int,int,float)
   BODYBODY* = bodybody object
   int =   index of first body sub-part. The first body is the body specified as first
           parameter for the iBodyBodyCreate() function.
           The sub-part index must be 0 for the first sub-part, 1 for the second, and so on.
   int =   index of second body sub-part. The second body is the body specified as second
           parameter for the iBodyBodyCreate() function.
   NOTE: see iBodyBodyRestitutionSet() for remaining parameter.

iBodyBodySubpartFrictionSet(BODYBODY*,int,int,float)
   BODYBODY* = bodybody object
   int =   index of first body sub-part. See iBodyBodySubpartRestitutionSet().
   int =   index of second body sub-part. See iBodyBodySubpartRestitutionSet().
   NOTE: see iBodyBodyFrictionSet() for remaining parameter.

iBodyBodySubpartFrictionModelSet(BODYBODY*,int,int,int)
   BODYBODY* = bodybody object
   int =   index of first body sub-part. See iBodyBodySubpartRestitutionSet().
   int =   index of second body sub-part. See iBodyBodySubpartRestitutionSet().
   NOTE: see iBodyBodyFrictionModelSet() for remaining parameter.

iBodyBodySubpartSplitFrictionSet(BODYBODY*,int,int,float,float,float,float)
   BODYBODY* = bodybody object
   int =   index of first body sub-part. See iBodyBodySubpartRestitutionSet().
   int =   index of second body sub-part. See iBodyBodySubpartRestitutionSet().
   NOTE: see iBodyBodySplitFrictionSet() for remaining parameters.

iBodyBodyFeedbackEnable(BODYBODY*,int,int,BOOL)
   BODYBODY* = bodybody object
   int =   index of first body sub-part. The first body is the body specified as first
           parameter for the iBodyBodyCreate() function.
           The sub-part index must be 0 for the first sub-part, 1 for the second, and so on.
           If this parameter is -1, feedback is enabled/disabled for all subparts of
           the first body.
   int =   index of second body sub-part. The second body is the body specified as second
           parameter for the iBodyBodyCreate() function.
           If this parameter is -1, feedback is enabled/disabled for all subparts of
           the second body.
   BOOL = whether to enable (TRUE) or disable (FALSE) contact feedback for the
          specified subpart (or subparts). See iBodyBodyFeedback()
   
BOOL iBodyBodyFeedback(BODYBODY*,int,int,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return TRUE if any collision contact was detected between the specified
   subpart (or subparts) of the first body and the specified subpart (or subparts)
   of the second body.
   BODYBODY* = bodybody object
   int =   index of first body sub-part.
           If this parameter is -1, this function returns TRUE if contact is detected
           for at least one subpart of the first body.
   int =   index of second body sub-part.
           If this parameter is -1, this function returns TRUE if contact is detected
           for at least one subpart of the second body.
   D3DXVECTOR3* = if not null, contact location (absolute). Return data.
   D3DXVECTOR3* = if not null, contact normal (absolute orientation). Return data.
   D3DXVECTOR3* = if not null, force (absolute orientation). Return data.
                  It is the force applied to the first body of the couple,
                  as a result of the collision.
   D3DXVECTOR3* = if not null, torque (absolute orientation). Return data.
                  It is the torque applied to the first body of the couple,
                  as a result of the collision.
   D3DXVECTOR3* = if not null, force, same as above but for second body. Return data.
   D3DXVECTOR3* = if not null, torque, same as above but for second body. Return data.
   NOTE: contact feedback must be enabled with iBodyBodyFeedbackEnable(), for the
   specified subpart (or subparts), before you can use this function to retrieve
   contact information.
   NOTE: if iBodyBodyCollisionResponseEnable() is FALSE for the specified bodybody object,
   collision location, normal, forces and torques are not computed and cannot be retrieved.
   As a consequence, the six D3DXVECTOR3* parameters are unused and should be set to NULL.
   

JOINTS


JOINT* iJointBallCreate(BODY*,BODY*,D3DXVECTOR3*)
   Create a joint that links two objects together by a point. Return joint object.
   BODY* = first body object
   BODY* = second body object
   D3DXVECTOR3* = joint (world-relative) location.
   Note: before creating the joint you must properly place the two objects. The joint
   location specifies a world-relative point that is supposed to match the desired
   connection point (anchor) for the two bodies at the time this function is called.

JOINT* iJointHingeCreate(BODY*,BODY*,D3DXVECTOR3*,D3DXVECTOR3*)
   Create a joint that links two objects together by a 'hinge', that is an axis
   about which the two bodies can rotate. Return joint object.
   BODY* = first body object
   BODY* = second body object
   D3DXVECTOR3* = joint axis (world-relative) location.
   D3DXVECTOR3* = joint axis (world-relative) direction.
   See also iJointBallCreate().

JOINT* iJointSliderCreate(BODY*,BODY*,D3DXVECTOR3*)
   Create a joint that links two objects together by a 'slider', that is a line
   along which the two bodies can move. Return joint object.
   BODY* = first body object
   BODY* = second body object
   D3DXVECTOR3* = joint axis (world-relative) direction.
   See also iJointBallCreate().

iJointDestroy(JOINT*)
   JOINT* = joint object to destroy
   Note that destroying joint objects is not necessary because the engine will
   do it automatically on exit.

iJointBallXStopsSet(JOINT*,float,float,float,float)
iJointBallYStopsSet(JOINT*,float,float,float,float)
iJointBallZStopsSet(JOINT*,float,float,float,float)
   Set XYZ rotational limits for the specified ball-type joint.
   JOINT* = joint object (must be ball type).
   float = lower angular limit for rotation about X (or Y, or Z) axis, in degrees.
           Setting this parameter to -180.0f or less actually removes the limit.
   float = higher angular limit for rotation about X (or Y, or Z) axis, in degrees.
           Setting this parameter to 180.0f or more actually removes the limit.
   float = rotational stop strength. The bigger the factor, the stronger the stop.
           A strong stop will resist torques more than a weak stop.
           By default, stop strength is 40000.0f (very strong).
           NOTE: to achieve soft stops you should set both strength and hardness (next
           parameter) to lower values, like for example 5.0f and 0.01f respectively.
   float = rotational stop hardness. The bigger the factor, the harder the stop.
           A soft stop will 'absorb' torques in a spongy way.
           By default, stop hardness is 1500000.0f (very hard).
   NOTE: rotational axes are joint-relative. Joint orientation is null when it is
   created. That is, its local axes orientation match world axes orientation.
   However the joint is linked to the first connected body (first iJointBallCreate()
   parameter). It means that its orientation changes when the first body orientation
   changes. See also iJointBallOrientationSet().
   NOTE: angular limits are specified as Euler angles. The math about Euler angles
   doesn't allow for all angle combinations. In practice it means that you should
   never allow Z-axis limits to be -90.0f or less and 90.0f or more, unless X-axis
   limits or Y-axis limits (or both) are 0.0f-0.0f. Failing to do so may severely
   disrupt the simulation and even crash the program.
   NOTE: rotational limits are not supported if one of the two linked bodies is static.

iJointBallXAMotorSet(JOINT*,float,float,float)
iJointBallYAMotorSet(JOINT*,float,float,float)
iJointBallZAMotorSet(JOINT*,float,float,float)
   Apply 'torque' (angular motor) to specified ball-type joint, about its local
   X, Y or Z axis.
   JOINT* = joint object (must be ball type).
   float = target spin. It is the reference angular velocity the system will try to
           reach and keep. Basically, by applying the specified torque (next parameter),
           the system will try to achieve the specified spin.
   float = torque intensity, angular force applied to reach and keep target spin.
           Default is 0.0f (motor disabled).
   float = fudge factor. Due to a simulation limitation, when the joint is at stop, a
           torque moving away from the stop may cause an unrealistic jumping motion.
           You can minimize the effect by setting this parameter to a lower value.
           Default is 1.0f, no reduction.
   NOTE: you can use angular motors to simulate passive rotational friction. Simply,
   set the target spin to 0.0f and torque intensity to the desired friction factor.
   NOTE: angular motors are not supported if one of the two linked bodies is static.
   NOTE: enabled motors are slower to process, especially where joints form chains
   of two or more linked bodies, like ragdolls.

iJointBallOrientationSet(JOINT*,D3DXQUATERNION*)
   Ball joints have a default null orientation when they are created.
   You can set a different default orientation by calling this function at any time.
   JOINT* = joint object (must be ball type)
   D3DXQUATERNION* = new default orientation. This is world-relative, but
   see iJointBallXStopsSet() notes for important remarks.

iJointBallLocation(JOINT*,D3DXVECTOR3*)
   Return the current location of the specified ball joint.
   D3DXVECTOR3* = location vector. Return data.
                  The vector is filled with the absolute location of the joint's
                  anchor point. See also iJointBallCreate().

iJointHingeStopsSet(JOINT*,float,float,float,float)
   Set rotational limits for the specified hinge-type joint.
   See iJointBallXStopsSet() for function parameters meaning.

iJointHingeAMotorSet(JOINT*,float,float,float)
   Apply torque to specified hinge-type joint, about its local axis.
   See iJointBallXAMotorSet() for function parameters meaning.

iJointSliderStopsSet(JOINT*,float,float,float,float)
   Set position limits for the specified slider-type joint.
   See iJointBallXStopsSet() for function parameters meaning, keeping in
   mind that limit parameters are set in meters for this function.

iJointSliderForceSet(JOINT*,float,float,float)
   Apply force to specified slider-type joint, along its local axis.
   See iJointBallXAMotorSet() for function parameters meaning, keeping in
   mind that forces are linear for this function.

iJointFeedbackEnable(JOINT*,BOOL)
   JOINT* = joint object
   BOOL = whether to enable (TRUE) or disable (FALSE) feedback for the
          specified joint. See iJointFeedback()

iJointFeedback(JOINT*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return information about forces and torques applied to the linked
   bodies by the specified joint.
   JOINT* = joint object
   D3DXVECTOR3* = if not null, force (absolute orientation). Return data.
                  It is the force applied to the first body of the couple.
   D3DXVECTOR3* = if not null, torque (absolute orientation). Return data.
                  It is the torque applied to the first body of the couple.
   D3DXVECTOR3* = if not null, force, same as above but for second body. Return data.
   D3DXVECTOR3* = if not null, torque, same as above but for second body. Return data.
   NOTE: joint feedback must be enabled with iJointFeedbackEnable(), for the
   specified joint, before you can use this function to retrieve joint information.

WHEEL* iWheelCreate(BODY*,BODY*,D3DXVECTOR3*,D3DXQUATERNION*)
   Return wheel object.
   BODY* = main body object, for example the car body.
   BODY* = wheel body object. The wheel body is moved and re-oriented to the destination.
   D3DXVECTOR3* = main body location to attach the wheel to (source-model-center relative).
   D3DXQUATERNION* = if not NULL, it is the wheel orientation, respect to main body.
                     If NULL, the wheel is attached so that wheel orientation matches main
                     body orientation.
   NOTE: the wheel will roll about its X local axis, passing through source-model-center.
         The steering is about wheel's Y local axis. Suspension effect is performed along
         wheel's Y local axis.

iWheelDestroy(WHEEL*)
   WHEEL* = wheel object
   Note that destroying wheel objects is not necessary because the engine will
   do it automatically on exit.

iWheelSteeringAngleSet(WHEEL*,float)
   WHEEL* = wheel object
   float = steering angle (between -179.999f and 179.999f).
           If > 0.0f the wheel turns left. If < 0.0f it turns right.

iWheelSpinSet(WHEEL*,float)
   WHEEL* = wheel object
   float = target spin for specified wheel. The spin is not reached immediately.
           Instead, depending on wheel body mass, friction and wheel power, it
           is reached over time.

iWheelPowerSet(WHEEL*,float)
   WHEEL* = wheel object
   float = wheel power. Basically it is the intensity of the torque applied to reach an
           keep the spin specified with iWheelSpinSet()

iWheelSuspensionSet(WHEEL*,float,float)
   WHEEL* = wheel object
   float = spring factor. The higher the factor, the stronger the suspension. A strong
           suspension usually means less (smaller) oscillations.
   float = damping factor. The higher the factor, the more absorbing the suspension.


REPLAY


REPLAYDATA* iReplayDataCreate(int,float)
   Return replaydata object.
   int = number of floats to record.
         It is the length of the array of floats that will be saved whenever the
         iReplayDataRecord() function is called.
   float = maximum recording time.
   NOTE: the total amount of memory stored for the replay object is
         (first parameter) + ((second parameter)/iFrq()) * 300 bytes

iReplayDataDestroy(REPLAYDATA*)
   REPLAYDATA* = replaydata object
   Note that destroying replaydata objects is not necessary because the engine will
   do it automatically on exit.

BOOL iReplayDataRecord(REPLAYDATA*,float*)
   Return TRUE if the array of floats could be recorded successfully.
   Return FALSE if the maximum recording time was reached.
   REPLAYDATA* = replaydata object
   float* = pointer to an array of floats to record.
            It can be, for example, an array of values defining the current state of a body.
   See also iReplayDataCreate().

BOOL iReplayDataPlay(REPLAYDATA*,float*,BOOL)
   Return TRUE if the current state for the specified replaydata could be played successfully.
   Return FALSE if all states have been played.
   REPLAYDATA* = replaydata object
   float* = pointer to an array of floats which will be filled with the current played state.
            See also iReplayDataRecord().
   BOOL = set to TRUE to play the current state without advancing to the next
   See also iReplayDataCreate().

iReplayDataRecordReset(REPLAYDATA*)
   REPLAYDATA* = replaydata object
   Reset recording for specified replaydata object.
   Use this to initialize a recording session.

iReplayDataPlayReset(REPLAYDATA*)
   REPLAYDATA* = replaydata object
   Reset playing for specified replaydata object.
   Use this to initialize a playing session.

int iReplayDataPlayPosition(REPLAYDATA*)
   Return current play position for the specified replaydata stream. See also iReplayDataPlay().
   REPLAYDATA* = replaydata object

iReplayDataPlayPositionSet(REPLAYDATA*,int)
   Set current play position (state identifier) for the specified replaydata stream.
   See also iReplayDataPlay().
   REPLAYDATA* = replaydata object
   int = play position

iReplayDataWrite(REPLAYDATA*,HANDLE)
   REPLAYDATA* = replaydata object to save
   HANDLE = handle to a file already open for writing by Windows SDK CreateFile() function.

iReplayDataRead(REPLAYDATA*,HANDLE)
   REPLAYDATA* = replaydata object to load. See iReplayDataWrite().
   HANDLE = handle to a file already open for reading by Windows SDK CreateFile() function.

float iReplayDataTime(REPLAYDATA*)
   Return recorded time
   REPLAYDATA* = replaydata object


MESH


MESH* iMeshCreate(char*)
   Return mesh object.
   char* = source .x file name.
           The .x file should be a texture mapped 3d model.
           (1) in your modeler create any texture mapped object by using one single texture.
               All triangles in the model must be texture mapped and must use the same texture.
           (2) save the model as an .x (DirectX®) file.
   NOTE: meshes are hidden when they are created. You can show them with iMeshShow().

MESH* iMeshPartCreate(char*,int)
   Identical to iMeshCreate() except that it creates the mesh by only 'extracting'
   the geometry that is texture mapped with the specified texture ('int' additional parameter):
   int = texture index. Zero is the first texture. What mesh texture corresponds
         to a certain index depends on how the 3d model was designed in the source
         3d modeling application.
   NOTE: if no geometry is associated to the specified texture, the function returns NULL.
   In this case, the function will still parse the whole file and do some futile processing.
   NOTE: some modeling tools may export geometry mapped with an unique texture as two or more
   distinct parts. Because load time is proportional to the number of parts forming the model,
   trying to avoid this scenario is recommended.

MESH* iMeshCreateFromMemory(char*,int,char*,int,int)
   Return mesh object.
   char* = pointer to the first byte of an .x file previously loaded into memory.
           Typically it is a file extracted from a .pak file, or from a similar archive.
           See iMeshCreate() for details on .x file format.
   int = size of the .x file in memory, in bytes.
   char* = pointer to the first byte of an image file (bmp, dds, dib, jpg, png, tga)
           previously loaded into memory.
   int = size of texture image file in memory, in bytes.
   int = texture's unique identifier value.
         Usage identical to similar parameter of iTextureCreateFromMemory().

MESH* iMeshPartCreateFromMemory(char*,int,char*,int,int,int)
   Identical to iMeshCreateFromMemory() except that it creates the mesh by only 'extracting'
   the geometry that is texture mapped with the specified texture (the
   last 'int' parameter). See also iMeshPartCreate().

MESH* iMeshBumpCreate(char*,char*,BOOL)
   Return mesh object.
   char* = source .x file name. See iMeshCreate() for details.
   char* = source bump-map texture file name (bmp, dds, dib, jpg, png, tga).
           You can either provide a bump-map as a standard height-map (that is,
           typically a grey scale image where whiter pixels define more raised areas)
           or as a standard normal-map. Most paint programs and 3d modelers
           provide options, tools and plug-ins allowing creation of normal-maps.
           Recommended format for normal-maps is tangent-space.
           TIP: if bumped surface shading doesn't look good when rendered, try inverting the
           green channel of your normal maps before exporting them to image file format.
   BOOL = whether to convert the image from a standard height-map to a normal map (TRUE).
          or use the image as is (FALSE), assuming it is already a standard normal-map.
   NOTE: if the rendering device doesn't support hardware processed pixel shaders,
         this function will behave like iMeshCreate(), actually ignoring the bump-map file.
         See iPixelShadersSupported() for more.
   The newly created mesh is a normal mesh with a bump-map assigned to it. Such a mesh
   will be rendered by using per-pixel lighting. See also iMeshBumpAmbientColorSet().
   NOTE: meshes are hidden when they are created. You can show them with iMeshShow().

MESH* iMeshBumpCreateFromMemory(char*,int,char*,int,int,char*,int,int,BOOL)
   Return mesh object.
   char* = pointer to .x file in memory.
   int = size of .x file in memory, in bytes.
   char* = pointer to texture file in memory.
   int = size of texture file in memory, in bytes.
   int = texture's unique identifier.
   char* = pointer to bumpmap image file in memory.
   int = size of bumpmap image file in memory, in bytes.
   int = bumpmap unique identifier.
   BOOL = whether to convert the source image. See iMeshBumpCreate().
   NOTE: parameter usage is similar to iMeshCreateFromMemory() parameters.

int iMeshPartCount(char*,BOOL)
   Return the number of parts forming the specified mesh (DirectX® .x file format).
   See also iMeshPartCreate().
   char* = source .x file name.
   BOOL = set this value to TRUE to ignore parts that do not use a texture.
          NOTE: this option is computationally expensive and is intended
          for debug purposes only. All faces in your models must be texture
          mapped to avoid rendering artifacts on some systems.

int iMeshPartCountFromMemory(char*,int,BOOL)
   Identical to iMeshPartCount(), except that it reads files from memory.

iMeshDestroy(MESH*)
   MESH* = mesh object
           Note that destroying mesh objects is not necessary because the engine will
           do it automatically on exit.

iMeshHide(MESH*)
   MESH* = mesh object

iMeshShow(MESH*)
   MESH* = mesh object

iMeshEulerOrientationSet(MESH*,float,float,float,char*)
   Set mesh orientation by applying 3 subsequent rotations about specified world axes.
   MESH* = mesh object
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.

iMeshOrientationSet(MESH*,D3DXQUATERNION*)
   MESH* = mesh object
   D3DXQUATERNION* = quaternion specifying an orientation.

D3DXQUATERNION* iMeshOrientation(MESH*,D3DXQUATERNION*)
   MESH* = mesh object
   D3DXQUATERNION* = orientation. Return data.
   NOTE: this function returns a pointer to the orientation quaternion provided as parameter,
   so that this function can be directly used as a parameter for another function.

iMeshOrientationAdd(MESH*,D3DXVECTOR3*,float)
   MESH* = mesh object
   D3DXVECTOR3* = rotation axis.
   float = degrees to add to current mesh orientation for every second.
           Note that this function should be executed at every Run() loop
           to work as expected.

iMeshLocationSet(MESH*,D3DXVECTOR3*)
   MESH* = mesh object
   D3DXVECTOR3* = 3d location

D3DXVECTOR3* iMeshLocation(MESH*,D3DXVECTOR3*)
   MESH* = mesh object
   D3DXVECTOR3* = location vector. Return data.
                  The vector is filled with the absolute location of the mesh center.
                  See also iMeshLocationSet().
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iMeshScaleSet(MESH*,float,float,float)
   MESH* = mesh object
   float,float,float = x, y, z scaling factors. A scaling factor = 1.0f means no scaling.
   NOTE: this function will work for all MESH* types, including shadow casters.

iMeshRenderPrioritySet(MESH*,int)
   MESH* = mesh object
   int = rendering priority. Default is 0;
         Meshes with lower priority are rendered first. Negative values are allowed.
   You can use this function to dynamically set rendering priority for translucent
   meshes, thus reducing transparency problems.
   NOTE: mesh priority is checked against skinmesh priority too. If a regular mesh
   and a skinmesh have the same priority, the regular mesh is rendered first.
   NOTE: the more complex the priority structure (skinmesh priorities mixing with
   mesh priorities, large gaps between priority values, etc) the slower the
   rendering. For best performance, do not use different priority values for
   meshes/skinmeshes that can be rendered in any order.

iMeshRenderModeSet(MESH*,DWORD,DWORD,BOOL,BOOL)
   MESH* = mesh object
   DWORD = DirectX®'s D3DRENDERSTATE_SRCBLEND factor.
           It can be one of the following: D3DBLEND_ZERO, D3DBLEND_ONE, D3DBLEND_SRCCOLOR
           D3DBLEND_INVSRCCOLOR, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_DESTALPHA
           D3DBLEND_INVDESTALPHA, D3DBLEND_DESTCOLOR, D3DBLEND_INVDESTCOLOR,
           D3DBLEND_SRCALPHASAT, D3DBLEND_BOTHSRCALPHA, D3DBLEND_BOTHINVSRCALPHA
           Default is D3DBLEND_SRCALPHA.
   DWORD = DirectX®'s D3DRENDERSTATE_DESTBLEND factor.
           See previous parameter for possible values.
           Default is D3DBLEND_INVSRCALPHA.
   BOOL  = Whether to use z-buffer (TRUE, default) or not (FALSE).
   BOOL  = Whether to render after (TRUE) or before (FALSE, default) cast shadows.
   NOTE: the two blend factors determine how the pixels of the specified mesh (SRC) will
         blend with the existing display pixels (DST). The formula is
         RESULT-rgb = (SRCBLEND * SRC-rgb) + (DESTBLEND * DEST-rgb)
         where RESULT-rgb is the final color of the pixel, SRC-rgb is the color of the
         specified mesh's pixel, DEST-rgb is the color of the existing display pixel and
         SRCBLEND, DESTBLEND are the D3DRENDERSTATE_SRCBLEND and D3DRENDERSTATE_DESTBLEND
         parameters above.
   NOTE: default blend settings simply replace the existing pixel with the pixel from the
         specified mesh (assuming no transparent textures are used).
         Different values can be used to achieve advanced rendering effects. For example,
         you can achieve shadow mapping by rendering two instances of the same mesh (for
         example a room). The first mesh is texture mapped and rendered normally, The
         the second mesh (identical geometry) is texture mapped with a shadow map (i.e.
         darker where you want a shadow effect). The second mesh is rendered with the
         following settings:
         iMeshRenderModeSet(ShadowMapMesh,D3DBLEND_ZERO,D3DBLEND_SRCCOLOR,TRUE,FALSE)
         Note that you may have to also specify some z-bias for the second mesh, in order
         to avoid rendering artifacts. See iMeshZBiasSet() for more.
   NOTE: this function can also help minimize transparency-rendering problems.
         By default meshes are rendered so that the alpha component of each pixel in the
         texture determine the transparency of the surface.
         Because meshes are rendered in the same order as they were created, objects that are
         behind a transparent mesh are not rendered, if they were created after the transparent
         mesh. You can prevent most transparency problems by setting the rendering mode for all
         translucent meshes as follows:
         iMeshRenderModeSet(MeshHandle,D3DBLEND_SRCALPHA,D3DBLEND_INVSRCALPHA,FALSE,TRUE)
         Note that this method doesn't work well if any surface area of one or more meshes
         isn't transparent, or not transparent enough. You can improve the effect by
         dynamically setting the rendering priority for each mesh with iMeshRenderPrioritySet()
         and/or setting different DirectX®'s blending factors. For example, the following
         rendering modes tend to reduce transparency problems:
         iMeshRenderModeSet(MeshHandle,D3DBLEND_SRCCOLOR,D3DBLEND_INVSRCCOLOR,FALSE,TRUE)
         iMeshRenderModeSet(MeshHandle,D3DBLEND_SRCALPHA,D3DBLEND_ONE,FALSE,TRUE)

iMeshZBiasSet(MESH*,int)
   MESH* = mesh object
   int = z-bias, between -1000 and 1000. Default is 0.
         Meshes with higher bias will appear in front of meshes with lower bias, even
         if the two surfaces are at exactly the same distance from the camera.
   Adjusting z-bias allows you to avoid artifacts (typically flickering) when rendering
   two coplanar surfaces. For example, when rendering two instances of the
   same mesh with different textures (one regular, one transparent) to achieve multi-pass
   rendering techniques.

iMeshSpecularSet(MESH*,float,float)
   MESH* = mesh object
   float = specular factor, typically between 0.0f (dull surface) and 1.0f (shiny surface).
   float = specular power, typically between 0.0f (soft surface) and 100.0f (hard surface).
   NOTE: for bump-meshes, specular can only be on or off (both factor and power = 0.0f).

iMeshAlphaSet(MESH*,float)
   MESH* = mesh object
   float = alpha, from 0.0f (totally transparent, invisible) to 1.0f (completely opaque, default).
           Intermediate values set an intermediate degree of transparency.
   NOTE: invisible meshes are still rendered by the engine (use CPU/GPU power).
   You should disable invisible meshes with iMeshHide() to avoid wasting processing power.

iMeshEmissiveSet(MESH*,float,float,float,float)
   MESH* = mesh object
   float = red (0.0f to 1.0f)
   float = green (0.0f to 1.0f)
   float = blue (0.0f to 1.0f)
   float = alpha, from 0.0f (emissive mode disabled) to 1.0f (enabled, completely opaque).
           Intermediate values set an intermediate degree of transparency.
           NOTE: this setting will override any alpha property which was set by iMeshAlphaSet().
   NOTE: this function enables/disables emissive (unlit) rendering mode for the
   specified mesh (alpha>0). It also sets the base color for the emissive surface.
   Emissive surfaces aren't affected by lights and shading. They are typically used to
   render light-emitting surfaces, translucent beams, rays and energy fields.

iMeshFogSet(MESH*,float,float)
   MESH* = mesh object to set fog parameters for.
   float = fog-effect-start distance (camera relative). The distance at which
           mesh colors start to be affected by fog.
   float = fog-effect-end distance (camera relative). The distance at which
           mesh colors are completely changed to fog color.
   Fog is an effect that biases the colors of a mesh toward the current
   fog color (see iFogColorSet() function). It is used to simulate the
   visual effect produced by a global and uniform fog.
   NOTE: to disable fog effect, set the fog-effect-end parameter to -1.

iMeshWireframeEnable(MESH*,BOOL)
   MESH* = mesh object
   BOOL  = If TRUE, the mesh is rendered as a 'wire-frame'.

iMeshSecondaryTextureSet(MESH*,char*,D3DXVECTOR2*,float,float)
   MESH* = mesh object
   char* = texture filename (bmp, dds, dib, jpg, png, tga).
   D3DXVECTOR2* = offset from world center (XZ coordinates)
   float = tile size
   float = blend.
           It can range from 0.0f (only secondary texture is rendered),
           to 1.0f (only base texture is rendered).
           Intermediate values define intermediate blending.
           NOTE: blending is forced to 0.0f, 0.5f or 1.0f if the video card doesn't support
           hardware processed pixel-shaders.

iMeshSecondaryTextureSetFast(MESH*,D3DXVECTOR2*,float,float)
   Set secondary texture parameters without re-loading the texture.
   Calling this function is faster, thus allowing run-time secondary texture tweaking,
   like for example secondary texture translation and fading effects.
   Specified mesh should already have a secondary texture assigned when this function
   is called. See also iMeshSecondaryTextureSet().

iMeshLocalLightsEnable(MESH*,BOOL)
   MESH* = mesh object
   BOOL  = If TRUE, the mesh is affected by local lights.
   See also iLightLocalLocationSet() and iLightLocalColorSet().

iMeshBumpAmbientColorSet(MESH*,float,float,float)
   Meshes with a bump-map ignore global (ambient) light. As a consequence,
   surface parts that are in shadow (on the opposite side respect to the light)
   are completely black, by default.
   Still, with this function, you can set bump-mesh-specific ambient light.
   Note that adding ambient light to a mesh tends to alter its original colors.
   You should adjust the color parameters below to counter act this side effect.
   MESH* = mesh object.
           Must be a mesh created with iMeshBumpCreate() or iBodyMeshBumpCreate().
   float = red (0.0f to 1.0f)
   float = green (0.0f to 1.0f)
   float = blue (0.0f to 1.0f)
   Default is (0.0f,0.0f,0.0f)

iMeshMirrorMake(MESH*,BOOL)
   MESH* = mesh object
   BOOL  = If TRUE, the mesh is rendered as a mirror. That is, it is used as a reference
           when rendering reflected objects.
           Note that all polygons of the mesh should lie exactly on the mirror plane.
           The mirror plane is defined by iMirrorPlaneSet() function.
   NOTE: because the mirror mesh must be transparent, any actual (not reflected) object
   behind it will disrupt the rendering for all reflected objects. In order to prevent actual
   meshes to be seen through the mirror, you must create (iMeshCreate(), iBodyMeshCreate())
   the transparent mirror mesh BEFORE those actual meshes that may go behind the mirror.

BOOL iMeshVisible(CAMERA*,MESH*)
   Return TRUE if the specified mesh's bounding sphere is within the specified camera window.
   You will typically use this function to hide (iMeshHide) meshes that are completely outside
   the viewing frustum, thus improving frame-rate. Normally, the engine will process
   every polygon of the mesh to decide whether it is visible (to be rendered) or not.
   See also iBoundingSphereFrustumCheckSet().
   CAMERA* = camera object
   MESH* = mesh object

BOOL iMeshPicked(CAMERA*,MESH*)
   Return TRUE if the specified mesh is under the mouse pointer (inside the specified
   camera window). Return FALSE otherwise. See also iPickPoint().
   CAMERA* = camera object
   MESH* = mesh object. Hidden meshes cannot be picked.
   NOTE: this function uses the original face/vertex buffers of the mesh. Because these
   are not affected when you alter face/vertex buffers directly (see iMeshVertexBufferOpen()
   and related functions), the iMeshPicked()/iMeshRayCheck() functions may not work properly in this case.
   To avoid this problem, you must alter the original face/vertex buffers too, accordingly.
   See iMeshVertexBufferOriginal() and iMeshFaceBufferOriginal() for details.

BOOL iMeshRayCheck(MESH*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return TRUE if the specified ray segment intersects the specified mesh.
   See also iPickPoint().
   MESH* = mesh object
   D3DXVECTOR3* = 3d ray origin, absolute coordinates.
   D3DXVECTOR3* = 3d ray direction.
                  Note that the length of this vector is the length of the ray segment.
                  The ray must be long enough to reach the mesh in order to intersect it.
   See iMeshPicked() note for more.

BOOL iMeshBoundingSphereRayCheck(MESH*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return TRUE if the specified ray segment intersects the bounding sphere
   of the specified mesh. This function is a lot faster than iMeshRayCheck().
   See also iPickPoint().
   MESH* = mesh object
   D3DXVECTOR3* = 3d ray origin, absolute coordinates.
   D3DXVECTOR3* = 3d ray direction.

float iMeshBoundingSphere(MESH*,D3DXVECTOR3*)
   Return radius and center location of the bounding sphere for the specified mesh.
   Center coordinates are mesh-relative.
   MESH* = mesh object
   D3DXVECTOR3* = bounding sphere center. Return data.

iMeshStretchToSegment(MESH*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*,float)
   Orientate and stretch the specified mesh so that it matches the specified segment
   MESH* = mesh object to stretch.
           Note that the mesh will actually match the segment only if its size along
           Z axis extends from 0.0f to 1.0f.
   D3DXVECTOR3* = first segment point (absolute). Mesh center will go here.
   D3DXVECTOR3* = second segment point (absolute). Mesh's (0.0f,0.0f,1.0f) point will go here.
   D3DXVECTOR3* = normalized vector defining the UP direction. Usually (0.0f,1.0f,0.0f).
   float = scale. Mesh's X and Y dimensions are scaled by the given factor (1.0f = no scaling).

iMeshTextureSet(MESH*,TEXTURE*)
   Assign the specified free texture image to the specified mesh.
   Note that the original mesh texture is not removed from the system.
   MESH*  = mesh object
   TEXTURE* = free texture object. See iTextureCreate().

iMeshTextureReset(MESH*)
   Re-assign the original texture to the specified mesh. See iMeshTextureSet()
   Note that this function does nothing if the original texture is already
   assigned to the mesh.
   MESH*  = mesh object

iMeshBumpTextureSet(MESH*,TEXTURE*)
   Assign the specified free texture image to the specified mesh, to be
   used as bump-map.
   Note that the original bump-map texture is not removed from the system.
   MESH*  = mesh object
   TEXTURE* = free texture object. See iTextureCreate().

iMeshBumpTextureReset(MESH*)
   Re-assign the original bump-map texture to the specified mesh. See iMeshBumpTextureSet()
   Note that this function does nothing if the original bump-map texture is already
   assigned to the mesh.
   MESH*  = mesh object

iMeshTextureSwap(MESH*,TEXTURE*)
   Assign the specified free texture image to the specified mesh.
   Note that the original mesh texture is not removed from the system.
   Basically, mesh's and free-texture's images are swapped.
   MESH*  = mesh object
   TEXTURE* = free texture object. See iTextureCreate().

iMeshBumpTextureSwap(MESH*,TEXTURE*)
   Same as iMeshTextureSwap() but swaps the bump-map texture for the specified mesh.
   MESH*  = mesh object.
            Must be a mesh created with iMeshBumpCreate() or iBodyMeshBumpCreate().
   TEXTURE* = free texture object.
              Should be a proper normal-map. See iTextureToNormalMap().

iMeshTextureChange(MESH*,char*)
   MESH* = mesh object
   char* = new texture filename (bmp, dds, dib, jpg, png, tga).
   NOTE: changing a texture for a mesh will change it for all meshes that use the
   same texture, unless you disable texture sharing. See iMeshTextureSharingSet().
   NOTE: this function is computationally expensive. Using this function to perform
   texture animation is not recommended. See iMeshTextureSet() instead.

iMeshAlphaTextureChange(MESH*,char*)
   MESH* = mesh object
   char* = alpha texture filename (bmp, dds, dib, jpg, png, tga).
   By default, all meshes have an alpha texture. Even when the texture image file
   associated with them doesn't contain any alpha information, the engine
   provides a default, completely opaque, alpha map.
   This function replaces the default alpha texture map with the one derived
   from the specified image file.
   The source image file should be gray-scale, as only the blue color component of
   each pixel is used as source for the alpha value.
   NOTE: if two or more meshes use the same texture file, changing the alpha map for
   one of them will change it for all, as they all use the same texture in memory.
   You can prevent this by disabling texture sharing. See iMeshTextureSharingSet().

iMeshTexturePath(MESH*,char*)
   Retrieve the path to the texture file for the specified mesh object.
   MESH* = mesh object
   char* = string to receive the path. Return data.

iMeshTextureModeSet(MESH*,DWORD)
   MESH* = mesh object.
   DWORD = texture mapping mode. The following values are supported:
           D3DTADDRESS_WRAP, texture tiling. This is the default.
           D3DTADDRESS_MIRROR, texture tiling with mirroring.
           D3DTADDRESS_CLAMP, texture tiling disabled.
           D3DTADDRESS_BORDER, texture tiling disabled (border color is used
                               outside texture bounds).
           D3DTADDRESS_MIRRORONCE, texture tiling disabled, mirroring enabled.

iMeshTextureMipMapLodSet(MESH*,float)
   MESH* = mesh object to set texture's mipmap level of detail for.
   float = mipmap's level of detail. The bigger the factor, the more blurred the textures.
           Default value is zero. Negative values (sharper texture rendering) are allowed.
           NOTE: sharper texture rendering uses more video memory, which tends to affect
           rendering performance. Use the highest mipmap level of detail possible, to
           optimize performance and improve frame rate.

iMeshTextureSharingSet(BOOL)
   By default, in order to save video memory and improve rendering speed, the engine
   will not load again textures that have already been loaded from an identical image
   file. Instead, it will share the same memory among two or more identical textures
   whenever possible.
   BOOL = whether to share (TRUE, default) or not to share texture memory.
   NOTE: this setting is applied immediately and will only affect i...MeshCreate()
   functions that are executed after the call to this function. It means that you can
   enable texture sharing for some i...MeshCreate() calls and disable it for others.

iMeshBuffersSharingSet(BOOL)
   Enable/disable memory sharing for identical meshes. This function is similar to
   iMeshTextureSharingSet(), but it deals with mesh vertex/face buffers.

iMeshEnvMapReceiverAdd(MESH*,ENVMAP*)
   MESH* = mesh object that will reflect/refract the specified environment map.
   ENVMAP* = environment map object. See iEnvMapCreate().

iMeshEnvMapBlendSet(MESH*,float)
   MESH* = mesh object to set environment map blending factor for. See iMeshEnvMapReceiverAdd().
   float = degree of visibility for the environment texture, respect to the base texture.
           0.0f means that the base texture only will be visible. 1.0f means that the
           environment texture only is visible. Intermediate values will mix the two
           textures accordingly.
           NOTE: setting this parameter to 0.0f actually disables processing for
           environment map effects (reflection/refraction).

iMeshEnvMapGlassSet(MESH*,float)
   MESH* = mesh object to set glass refraction factor for.
   float = refraction factor. It is typically between 0.3f and 0.5f.
   NOTE: setting a non-zero refraction factor will enable glass rendering
   for the specified mesh, which basically uses the environment map
   (see iMeshEnvMapReceiverAdd() function) to perform the effect.
   It is a variation of the algorithm used to render environment map reflections.
   Glass rendering works best with dynamically updated environment maps.

iMeshEnvMapCasterAdd(MESH*)
   MESH* = mesh object to be added to the list of meshes that are reflected/refracted
           by dynamic environment surfaces. See iEnvMapUpdateRateSet() for more.

iMeshEnvMapCasterRemove(MESH*)
   MESH* = mesh object to be removed from to the list. See iMeshEnvMapCasterAdd().

iMeshTransfer(MESH*,BODY*)
   MESH* = mesh to transfer. Must be a mesh created by one of the following functions:
           iBodyMeshCreate()
           iMeshBodyShadowCasterCreate()
           iMeshCreate()
   BODY* = body object to receive the mesh.
   Note, you can either use this function to transfer a mesh from a body to another body or
   to attach a mesh created with iMeshCreate() to a body or to detach a mesh from any
   body (just set BODY* parameter to NULL).


MESH-BUFFERS


iMeshVertexBufferDynamicMake(MESH*,BOOL)
   Convert the vertex buffer for the specified mesh into a dynamic buffer, so that
   its content can be changed runtime. This is necessary before you can call
   iMeshVertexBufferOpen() and iMeshVertexBufferClose() functions.
   MESH* = mesh object
   BOOL = buffer access mode. Set this parameter to TRUE to convert to a read/write
          buffer. Set to FALSE for a write-only buffer.
   NOTE: dynamic buffer meshes can be slower to render on some systems. Read/write
   buffer meshes tend to be slower than write-only buffer meshes.

iMeshVertexBufferOpen(MESH*,MESHVERTEX**)
   Open the specified mesh vertex buffer, so that the vertices stored in it
   can be accessed. See MeshWarp sample code for details.
   MESH* = mesh object
   MESHVERTEX** = vertex buffer object. Return data.
                  This object is valid until the iMeshVertexBufferClose() function
                  is called. Trying to access a closed vertex buffer produces unpredictable
                  results, including bugs that can be very hard to find and fix.
   NOTE: reading from write-only buffers can be extremely time consuming.

iMeshVertexBufferClose(MESH*)
   Close the specified mesh vertex buffer.
   All vertex buffers must be closed before the current Run() loop terminates.
   MESH* = mesh object

int iMeshVertexBufferSize(MESH*)
   Return the number of vertices of the specified mesh.
   MESH* = mesh object

iMeshVertexBufferSizeSet(MESH*,int)
   Set the number of vertices for the specified mesh.
   MESH* = mesh object
   int = number of vertices.

iMeshVertexBufferOriginal(MESH*,MESHVERTEX**)
   Return original vertex buffer object.
   Original vertex buffer is saved to system memory. It is a copy of the actual
   mesh vertex buffer at the time it was created (iMeshCreate() and similar).
   You don't have to open/close original vertex buffers. Data can be accessed
   directly. Modifying original vertex buffers will not affect actual mesh
   vertex buffer and is not recommended.
   MESH* = mesh object
   MESHVERTEX** = vertex buffer object. Return data.

iMeshFaceBufferDynamicMake(MESH*,BOOL)
   Convert the face buffer for the specified mesh into a dynamic buffer, so that
   its content can be changed runtime. This is necessary before you can call
   iMeshFaceBufferOpen() and iMeshFaceBufferClose() functions.
   MESH* = mesh object
   BOOL = buffer access mode. Set this parameter to TRUE to convert to a read/write
          buffer. Set to FALSE for a write-only buffer.
   NOTE: dynamic buffer meshes can be slower to render on some systems. Read/write
   buffer meshes tend to be slower than write-only buffer meshes.

iMeshFaceBufferOpen(MESH*,MESHFACE**)
   Open the specified mesh face buffer, so that the triangles stored in it
   can be accessed. See MeshWarp sample code for details.
   MESH* = mesh object
   MESHFACE** = face buffer object. Return data.
                This object is valid until the iMeshFaceBufferClose() function
                is called. Trying to access a closed face buffer produces unpredictable
                results, including bugs that can be very hard to find and fix.
   NOTE: reading from write-only buffers can be extremely time consuming.

iMeshFaceBufferClose(MESH*)
   Close the specified mesh face buffer.
   All face buffers must be closed before the current Run() loop terminates.
   MESH* = mesh object

int iMeshFaceBufferSize(MESH*)
   Return the number of faces (triangles) forming the specified mesh.
   MESH* = mesh object

iMeshFaceBufferSizeSet(MESH*,int)
   Set the number of faces (triangles) forming the specified mesh.
   MESH* = mesh object
   int = number of faces.

iMeshFaceBufferOriginal(MESH*,MESHFACE**)
   Return original face buffer object.
   Original face buffer is saved to system memory. It is a copy of the actual
   mesh face buffer at the time it was created (iMeshCreate() and similar).
   You don't have to open/close original face buffers. Data can be accessed
   directly. Modifying original face buffers will not affect actual mesh
   face buffer and is not recommended.
   MESH* = mesh object
   MESHFACE** = face buffer object. Return data.


SKINMESH


SKINMESH* iSkinMeshCreate(char*,char*)
   Return skinmesh object.
   char* = source .x file name.
           The .x file must be a texture mapped model either static or including
           bone-based animation information.
           See also iSkinMeshAnimationSpeedSet() and iSkinMeshAnimationTimeSet().
   char* = source shader effect file name (.fx/.fxo format).
           The specified effect determine the rendering technique to use for the
           skinmesh. If this parameter is NULL, a default rendering technique is used.
   NOTE: skinmeshes are hidden when they are created. You can show them with iSkinMeshShow().

SKINMESH* iSkinMeshCreateFromMemory(char*,int,char**,int*,char*)
   char* = pointer to the first byte of an .x file previously loaded into memory.
   int = size of the .x file in memory, in bytes.
   char** = pointer to an array of pointers. Each pointer in the array must point to the
            first byte of an image file previously loaded into memory.
            The list of textures must match the number and the order of the textures
            specified in the source .x file (see above).
   int* = pointer to an array of integers, each representing the size, in bytes, of the
          related texture file in memory (see previous parameter).
   char* = source shader effect file name (.fx/.fxo format). See iSkinMeshCreate().

int iSkinMeshTexturesCount(SKINMESH*)
   Return the number of textures applied to the skinmesh 3d model.
   SKINMESH* = skinmesh object

iSkinMeshDestroy(SKINMESH*)
   SKINMESH* = skinmesh object
               Note that destroying skinmesh objects is not necessary because the engine
               will do it automatically on exit.

iSkinMeshHide(SKINMESH*)
   SKINMESH* = skinmesh object

iSkinMeshShow(SKINMESH*)
   SKINMESH* = skinmesh object

iSkinMeshEulerOrientationSet(SKINMESH*,float,float,float,char*)
   Set skinmesh orientation by applying 3 subsequent rotations about specified world axes.
   SKINMESH* = skinmesh object
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.

iSkinMeshOrientationSet(SKINMESH*,D3DXQUATERNION*)
   SKINMESH* = skinmesh object
   D3DXQUATERNION* = quaternion specifying an orientation.

D3DXQUATERNION* iSkinMeshOrientation(SKINMESH*,D3DXQUATERNION*)
   SKINMESH* = skinmesh object
   D3DXQUATERNION* = orientation. Return data.
   NOTE: this function returns a pointer to the orientation quaternion provided as parameter,
   so that this function can be directly used as a parameter for another function.

iSkinMeshOrientationAdd(SKINMESH*,D3DXVECTOR3*,float)
   SKINMESH* = skinmesh object
   D3DXVECTOR3* = rotation axis.
   float = degrees to add to current skinmesh orientation for every second.
           Note that this function should be executed at every Run() loop
           to work as expected.

iSkinMeshLocationSet(SKINMESH*,D3DXVECTOR3*)
   SKINMESH* = skinmesh object
   D3DXVECTOR3* = 3d location

D3DXVECTOR3* iSkinMeshLocation(SKINMESH*,D3DXVECTOR3*)
   SKINMESH* = skinmesh object
   D3DXVECTOR3* = location vector. Return data.
                  The vector is filled with the absolute location of the
                  skinmesh (source-model-center).
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iSkinMeshScaleSet(SKINMESH*,float,float,float)
   SKINMESH* = skinmesh object
   float,float,float = x, y, z scaling factors. A scaling factor = 1.0f means no scaling.

BOOL iSkinMeshPicked(CAMERA*,SKINMESH*)
   Return TRUE if the specified skinmesh is under the mouse pointer (inside the specified
   camera window). Return FALSE otherwise. See also iPickPoint().
   CAMERA* = camera object
   SKINMESH* = mesh object. Hidden skinmeshes cannot be picked.
   NOTE: this function uses the original, un-morphed face/vertex buffers of the skinmesh.
   Therefore, picking is only accurate when the animation time for the skinmesh is 0.
   See also iSkinMeshAnimationTimeSet().

BOOL iSkinMeshRayCheck(SKINMESH*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return TRUE if the specified ray segment intersects the specified skinmesh.
   See also iPickPoint().
   SKINMESH* = mesh object
   D3DXVECTOR3* = 3d ray origin, absolute coordinates.
   D3DXVECTOR3* = 3d ray direction.
                  Note that the length of this vector is the length of the ray segment.
                  The ray must be long enough to reach the mesh in order to intersect it.
   See iSkinMeshPicked() note for more.

iSkinMeshAnimationSpeedSet(SKINMESH*,float)
   Set the speed for the specified skinmesh animation.
   SKINMESH* = skinmesh object
   float = Animation speed, in animation-keys per second. Default is 0.0f.
           Speed can be negative, but, because the current time for an animation can not
           be negative, you must set the current time to some high-positive value to
           perform backward animation-playing. See iSkinMeshAnimationTimeSet() for more.
           NOTE: if the .x file doesn't include the AnimTicksPerSecond template, you will
           have to divide the speed factor by 4800, in order to achieve the intended
           animation speed.
   NOTE: a skinmesh with non-zero speed is slower to process. Hidden skinmeshes are still
   processed, if their speed is non-zero.

iSkinMeshAnimationTimeSet(SKINMESH*,float)
   Set the current time for the specified skinmesh animation.
   SKINMESH* = skinmesh object
   float = Animation time (must be >= 0.0f). Default value is 0.0f.
           See also iSkinMeshAnimationSpeedSet()
   NOTE: time is NOT in seconds. It is in animation-keys.
   NOTE: setting the time for a skinmesh with multiple
         animation sets may cause animation blending to fail.

float iSkinMeshAnimationTime(SKINMESH*)
   Return current time for the specified skinmesh animation.
   SKINMESH* = skinmesh object
   See also iSkinMeshAnimationTimeSet().

float iSkinMeshAnimationLength(SKINMESH*)
   Return (looping) length, in seconds, for the specified skinmesh animation.
   SKINMESH* = skinmesh object
   NOTE: not all bones in the animated skinmesh have necessarily the same animation
   period. That is, some bone animations may loop more frequently than others. This
   function will only return the longest looping animation in the skinmesh.

int iSkinMeshAnimationSetCount(SKINMESH*)
   Return the number of animation sets available for the specified skinmesh.
   SKINMESH* = skinmesh object

DWORD iSkinMeshAnimationSet(SKINMESH*,char*)
   Set the current animation set for the specified skinmesh.
   Return the identification number of the current animation set.
   SKINMESH* = skinmesh object
   char* = animation set name.

iSkinMeshAnimationSetSet(SKINMESH*,DWORD,float,BOOL,BOOL)
   Enable the animation set specified by the identification number.
   SKINMESH* = skinmesh object
   DWORD = animation set's identification number. Zero is the first animation
           set defined in the source .x file, 1 is the second and so on.
           If the specified animation set doesn't exist, no action is performed by this function.
   float = transition time. If the animation is currently playing, this value
           determines the time taken to smoothly blend from the current animation sequence
           to the new one. Note that this value is NOT in seconds. The actual transition
           time depends on the current animation speed. See iSkinMeshAnimationSpeedSet().
   BOOL =  if TRUE, the transition is smoothed by using spline interpolation. Otherwise
           it is linearly interpolated.
   BOOL =  if TRUE, the new animation sequence is reset, otherwise it is played from the
           position where it was left in a previous call to this function.
   NOTE: this function only applies to .x files that include multiple bone-based animation sets for the same model.
         If your 3d modeling tool cannot export multiple animation sets to an unique .x file you can save the same model to
         different .x files (in TEXT format), one file for each animation set (make sure the geometry is exacly the same for all!).
         You can then combine them to an unique .x file by either using the free MView utility (by Microsoft) or manually,
         by opening the .x file with a text editor and copying/pasting the AnimationSet blocks from all files to one of them.
         The AnimationSet blocks must be copied one after the other in the .x file and each block must have an unique name.

iSkinMeshAnimationDataCompress(SKINMESH*,float)
   Compress the animation data for the specified skinmesh to save memory and improve processing speed.
   SKINMESH* = skinmesh object
   float = compression ratio, between 0.0 (no compression) and 1.0 (maximum compression).
           NOTE: the higher the compression, the lower the animation quality.

iSkinMeshRenderModeSet(SKINMESH*,DWORD,DWORD,BOOL,BOOL)
   SKINMESH* = skinmesh object
   See iMeshRenderModeSet() for remaining parameters.

iSkinMeshRenderPrioritySet(SKINMESH*,int)
   Set rendering priority for the specified skinmesh.
   See also iMeshRenderPrioritySet().

iSkinMeshTextureMipMapLodSet(SKINMESH*,float)
   SKINMESH* = skinmesh object to set texture's mipmap level of detail for.
   float = mipmap's level of detail. The bigger the factor, the more blurred the textures.
           Default value is zero. Negative values (sharper texture rendering) are allowed.
           NOTE: sharper texture rendering may use more video memory, which tends to affect
           rendering performance.

iSkinMeshEnvMapCasterAdd(SKINMESH*)
   See iMeshEnvMapCasterAdd() for details.

iSkinMeshEnvMapCasterRemove(SKINMESH*)
   See iMeshEnvMapCasterRemove() for details.

BOOL iSkinMeshVisible(CAMERA*,SKINMESH*)
   Return TRUE if the specified skinmesh's bounding sphere is within the specified
   camera window.
   You will typically use this function to hide (iSkinMeshHide) meshes that are completely
   outside the viewing frustum, thus improving frame-rate. Normally, the engine will process
   every polygon of the skinmesh to decide whether it is visible (to be rendered) or not.
   See also iBoundingSphereFrustumCheckSet().
   CAMERA* = camera object
   SKINMESH* = skinmesh object

BOOL iSkinMeshBoundingSphereRayCheck(SKINMESH*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return TRUE if the specified ray segment intersects the bounding sphere
   of the specified skinmesh.
   See also iPickPoint().
   SKINMESH* = skinmesh object
   D3DXVECTOR3* = 3d ray origin, absolute coordinates.
   D3DXVECTOR3* = 3d ray direction.

float iSkinMeshBoundingSphere(SKINMESH*,D3DXVECTOR3*)
   Return radius and center location of the bounding sphere for the specified skinmesh.
   Center coordinates are skinmesh-relative.
   SKINMESH* = skinmesh object
   D3DXVECTOR3* = bounding sphere center. Return data.

iSkinMeshTransfer(SKINMESH*,BODY*)
   SKINMESH* = skinmesh to transfer. Must be a skinmesh created by one of the following
               functions:
               iBodySkinMeshCreate()
               iSkinMeshCreate()
   BODY* = body object to receive the skinmesh.
   See also iMeshTransfer() for notes.

int iSkinMeshBonesCount(SKINMESH*)
   Return the number of bones in the specified skinmesh.
   SKINMESH* = skinmesh object
   NOTE: depending on the software used to generate the .x skinned model, the returned
   value may or may not include null bones, therefore returned bone count tends to be
   bigger than the number of actual bones edited in the 3d modeling application.

SKINMESHBONE* iSkinMeshBoneCreate(SKINMESH*,int)
   Return skinmeshbone object.
   Bones already exist in the specified skinmesh model. The returned skinmeshbone object
   allows you to manipulate the specified bone in the specified skinmesh model.
   SKINMESH* = skinmesh object
   int = index of the bone to create the skinmeshbone object for. This value must
         be between 0 (first bone) and iSkinMeshBonesCount()-1.
         Each bone in the model is indexed by the software used to generate the .x
         skinned model. There is no easy way to predict what index will be assigned
         to a particular bone.

SKINMESHBONE* iSkinMeshBoneCreateByName(SKINMESH*,char*)
   Return skinmeshbone object.
   SKINMESH* = skinmesh object
   char* = name of the bone to create the skinmeshbone object for.
           Each bone in the model is named in the software used to generate the .x
           skinned model.
           NOTE: some exporters/converters may add characters and slightly
           change bone names in the final .x file.

iSkinMeshBoneDestroy(SKINMESHBONE*)
   SKINMESHBONE* = skinmeshbone object
   Note that destroying skinmeshbone objects is not necessary because the engine will
   do it automatically on exit.

SKINMESHBONE* iSkinMeshBoneChildFind(SKINMESHBONE*,int)
   Return child skinmeshbone object of the specified skinmeshbone object.
   Return NULL if the specified child could not be found.
   SKINMESHBONE* = skinmeshbone object to retrieve the child for.
   int = index of the child to retrieve. Zero is the first child, 1 is the
         second and so on. All found children are siblings.
   NOTE: this function does not create skinmeshbone objects. In order to
   be found, the specified child skinmeshbone must have been created already
   with iSkinMeshBoneCreate(). This function is typically used to understand
   how skinmeshbone objects relate to one another.

SKINMESHBONE* iSkinMeshBoneParentFind(SKINMESHBONE*)
   Return parent skinmeshbone object of the specified skinmeshbone object.
   Return NULL if the skinmeshbone object is the root bone.
   SKINMESHBONE* = skinmeshbone object to retrieve the parent for.
   NOTE: this function does not create skinmeshbone objects. See
   iSkinMeshBoneChildFind() for more.

D3DXQUATERNION* iSkinMeshBoneOrientation(SKINMESHBONE*,D3DXQUATERNION*,int)
   Return specified skinmeshbone orientation.
   SKINMESHBONE* = skinmeshbone object
   D3DXQUATERNION* = orientation. Return data.
   int = orientation type.
         0 = world-relative.
         1 = skinmesh-relative. The orientation is relative to the skinmesh that
             owns the bone associated with the specified skinmeshbone object.
         2 = parent-bone relative.
   NOTE: this function returns a pointer to the orientation quaternion provided as parameter,
   so that this function can be directly used as a parameter for another function.

iSkinMeshBoneOrientationSet(SKINMESHBONE*,D3DXQUATERNION*,int)
   Set specified skinmeshbone orientation.
   SKINMESHBONE* = skinmeshbone object
   D3DXQUATERNION* = quaternion specifying an orientation.
   int = orientation type.
         0 = world-relative.
         1 = skinmesh-relative. The orientation is relative to the skinmesh that
             owns the bone associated with the specified skinmeshbone object.
         2 = parent-bone relative.
         3 = same as 2 but without updating internal structures, which is
             much faster. To optimize performance, when setting parent-bone relative
             orientation for many bones, you should update internal structures only
             when the last bone is set.
   NOTE: this function will have no effect on skinmeshes that are attached to bodies (i.e., created with
         iBodySkinMeshCreate()) or if you call iSkinMeshLocationSet()/iSkinmeshOrientationSet() for
         the parent skinmesh after this function in the same Run() loop.

iSkinMeshBoneLookAt(SKINMESHBONE*,D3DXVECTOR3*,D3DXVECTOR3*)
   Set specified skinmeshbone orientation so that it (its Z+ local axis) points toward
   the specified world-relative 3d location.
   SKINMESHBONE* = skinmeshbone object
   D3DXVECTOR3* = world-relative 3d point to look at.
   D3DXVECTOR3* = up direction. It is a vector specifying what parent-bone-relative
                  direction has to be considered the 'up' direction. Unless the bone
                  is going to tilt (rotate about local Z axis) or point upward/downward
                  (be perfectly parallel to local Y axis) you can usually
                  set this parameter to &D3DXVECTOR3(0.0f,1.0f,0.0f).

D3DXVECTOR3* iSkinMeshBoneLocation(SKINMESHBONE*,D3DXVECTOR3*,int)
   Return specified skinmeshbone location.
   SKINMESHBONE* = skinmeshbone object
   D3DXVECTOR3* = location. Return data.
   int = location type.
         0 = world-relative.
         1 = skinmesh-relative. The location is relative to the skinmesh that
             owns the bone associated with the specified skinmeshbone object.
         2 = parent-bone relative.
   NOTE: this function returns a pointer to the location vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iSkinMeshBoneLocationSet(SKINMESHBONE*,D3DXVECTOR3*)
   Set specified skinmeshbone location.
   SKINMESHBONE* = skinmeshbone object
   D3DXVECTOR3* = vector specifying a location (parent-bone relative).

D3DXVECTOR3* iSkinMeshBoneScaling(SKINMESHBONE*,D3DXVECTOR3*)
   Return specified skinmeshbone scaling (bone-relative).
   SKINMESHBONE* = skinmeshbone object
   D3DXVECTOR3* = scaling. Return data.
   NOTE: this function returns a pointer to the scaling vector provided as parameter,
   so that this function can be directly used as a parameter for another function.

iSkinMeshBoneScalingSet(SKINMESHBONE*,D3DXVECTOR3*)
   Set specified skinmeshbone scaling.
   SKINMESHBONE* = skinmeshbone object
   D3DXVECTOR3* = vector specifying a scaling along bone local XYZ axes.

iSkinMeshBoneName(SKINMESHBONE*,char*)
   Retrieve the user-defined name assigned to the specified bone (skinmeshbone),
   and copy it to the specified string. Bone names are usually defined in the
   3d modeling application, but they may change slightly when exported to .x format.
   SKINMESHBONE* = skinmeshbone object
   char* = destination string. Return data.

iSkinMeshEffectEnvTextureSet(SKINMESH*,char*,ENVMAP*)
   Set an environmet map (cube) texture to be used by the rendering effect associated with the specified skinmesh.
   SKINMESH* = skinmesh object
   char* = cube texture name, as declared in the .fx file
   ENVMAP* = envmap object. See iEnvMapCreate().

DWORD iSkinMeshEffectCreate(char*)
   Return a pointer to the compiled shader effect to be used as parameter for
   functions like iSkinMeshEffectSet() and iSkinMeshEffectDestroy().
   char* = source shader effect file name (.fx/.fxo format).
           The specified effect determine the rendering technique to use for the
           skinmesh. If this parameter is NULL, a default rendering technique is used.
   NOTE: the engine doesn't automatically destroy the effect created with this function.
         Make sure you call iSkinMeshEffectDestroy() before terminating the application.

iSkinMeshEffectDestroy(DWORD)
   Destroy the specified shader effect. See iSkinMeshEffectCreate() for details.
   DWORD = pointer to the shader effect

iSkinMeshEffectSet(SKINMESH*,DWORD)
   Assign the specified shader effect to the specified skinmesh.
   SKINMESH* = skinmesh object
   DWORD = pointer to the shader effect

iSkinMeshEffectValueSet(SKINMESH*,char*,VOID*,UINT)
   Set constant data for the rendering effect associated with the specified skinmesh.
   SKINMESH* = skinmesh object
   char* = constant data name, as declared in the .fx file
   VOID* = pointer to the constant data buffer
   UINT = length of constant data buffer, in bytes

iSkinMeshEffectTextureSet(SKINMESH*,char*,TEXTURE*)
   Set a texture to be used by the rendering effect associated with the specified skinmesh.
   SKINMESH* = skinmesh object
   char* = texture name, as declared in the .fx file
   TEXTURE* = free texture object. See iTextureCreate().

iSkinMeshEffectDefaultEnable(SKINMESH*,BOOL,BOOL,BOOL)
   Enable disable default constant data for the rendering effect associated with the specified skinmesh.
   SKINMESH* = skinmesh object
   BOOL = enable (TRUE) or disable (FALSE) the default matrices   
   BOOL = enable (TRUE) or disable (FALSE) the default materials   
   BOOL = enable (TRUE) or disable (FALSE) the default texture
   NOTE: you should pass custom constant data to be used in place of those that are disabled.   


SHADOW


MESH* iMeshShadowCasterCreate(char*,float)
   Return mesh object.
   char* = source .x file name.
           The 3d model to be used as a shadow caster must be a group of polygonal
           closed hulls. Shadow caster geometry is not rendered (it is invisible), but its
           volume is used as a reference to dynamically produce a shadow-volume.
           If a normal mesh is inside a shadow-volume, its surface (the part of it inside the
           shadow-volume) is rendered darker, to perform the cast-shadow effect.
           (1) in your modeler create a polygonal object made of closed hulls, with no textures.
           (2) save the model as an .x (DirectX®) file.
   float = Extrusion. Length of shadow projection, in meters. The longer the projection, the
           slower the rendering. You should keep this value as low as possible, but covering
           all scenery parts that are going to receive cast shadow from the mesh.
           NOTE: set this value to 0.0f to make this shadow caster STATIC (see below).
   NOTE: meshes are hidden when they are created. You can show them with iMeshShow().
   There are two ways of rendering a shadow-caster mesh:
   - Static.  The mesh is rendered as is. Basically, its volume is the shadow-volume.
              The source model must be completely closed. That is, all edges of all triangles
              forming it must be attached to edges of another triangle (no 'holes' on
              the mesh surface).
   - Dynamic. The mesh is elongated away from light. Resulting volume is the shadow-volume.
              Dynamic meshes are slower to render. So, if your shadow casting mesh is not
              moving and the light is not moving either, make it static is preferred.

MESH* iMeshShadowCasterCreateFromMemory(char*,int,float)
   Return mesh object.
   char* = pointer to the first byte of an .x file previously loaded into memory.
           See iMeshShadowCasterCreate() for details on .x file format.
   int = size of the .x file in memory, in bytes.
   float = Extrusion. See iMeshShadowCasterCreate().

MESH* iMeshBodyShadowCasterCreate(char*,BODY*,float)
   Return mesh object.
   char* = source .x file name.
   BODY* = body to attach the shadow caster mesh to
   float = Extrusion. Length of shadow projection, in meters.
   See also iMeshShadowCasterCreate().

MESH* iMeshBodyShadowCasterCreateFromMemory(char*,int,BODY*,float)
   See iMeshShadowCasterCreateFromMemory() for parameters meaning (except BODY*).

iMeshShadowCasterExtrusionSet(MESH*,float)
   MESH* = mesh object
   float = Extrusion. See iMeshShadowCasterCreate() for details.

iMeshShadowCasterNormalsRecompute(MESH*)
   Recompute normals for the specified shadow caster mesh.
   You will typically call this function after the vertex buffer for the specified
   mesh has been altered, in order to ensure an artifact-free shadow effect.
   MESH* = mesh object
           The mesh vertex buffer must be dynamic and read/write. See
           iMeshVertexBufferDynamicMake() for more.


ENVIRONMENT-MAP


ENVMAP* iEnvMapCreate(char*)
   Return environment-map object.
   char* = cube texture filename.
           The file must be a cube texture in .dds format. See Microsoft® DXTex Tool for
           details.
           Do not use mipmapped textures for dynamic environment maps. They don't show up
           and waste memory.
   NOTE: envmap reflections/refractions are not rendered if the rendering device doesn't
         support cube textures. See also iEnvMapsSupported().

ENVMAP* iEnvMapCreateFromMemory(char*,int)
   char* = pointer to the first byte of a cube texture in .dds format
           previously loaded into memory.
   int = size of cube texture image file in memory, in bytes.

iEnvMapDestroy(ENVMAP*)
   ENVMAP* = environment map object
           Note that destroying environment map objects is not necessary because the
           engine will do it automatically on exit.

iEnvMapFocusSet(ENVMAP*,D3DXVECTOR3*)
   ENVMAP* = environment map object
   D3DXVECTOR3* = viewpoint location for the specified environment map,
                 when rendering reflected and refracted meshes.

iEnvMapUpdateRateSet(ENVMAP*,float)
   ENVMAP* = environment map object
   float = update frequency.
           Set this parameter to 0.0f to make the envmap static (default).
           Set it to any positive value below 6.0f/iFrq() to make the envmap dynamic.
           Only dynamic envmaps actually reflect/refract the environment surrounding the focus.
           Static envmaps only reflect/refract the original cube texture loaded by
           iEnvMapCreate().
           Dynamic envmaps can be very slow to render. You should tune this parameter
           so that they are updated as rarely as possible.
   NOTE: dynamic envmaps are not rendered (reflections/refractions are not updated) if
         the rendering device doesn't provide so called render-to-texture functionality.
         See also iDynamicEnvMapsSupported().


SPRITE


SPRITE* iSpriteCreate(char*,CAMERA*)
   Return sprite object
   char* = source .x file name.
           In your 3d modeler, the source model should be a polygonal texture-mapped
           'flat' model, with all the triangles forming it lying on the XY plane and
           facing toward -Z world axis,
           (1) in your modeler, on the XY plane, create a flat texture mapped object by
               using one single texture.
           (2) all triangles in the model must be texture mapped, must use the same texture
               and must face toward -Z world axis.
           (3) scale the object keeping in mind that, when rendered, a 32 unit wide by 24
               unit tall sprite will be as big as the screen.
           (4) save the model as an .x (DirectX®) file.
   CAMERA* = camera window to render the sprite into or NULL to render into all windows.
   NOTE: sprites are hidden when they are created. You can show them with iSpriteShow().

SPRITE* iSpriteCreateFromMemory(char*,int,char*,int,int,CAMERA*)
   Return sprite object
   char* = pointer to the first byte of an .x file previously loaded into memory.
           See iSpriteCreate() for details on .x file format.
   int = size of the .x file in memory, in bytes.
   char* = pointer to the first byte of an image file (bmp, dds, dib, jpg, png, tga)
           previously loaded into memory.
   int = size of the texture image file in memory, in bytes.
   int = texture's unique identifier value.
         Usage identical to similar parameter of iTextureCreateFromMemory().
   CAMERA* = camera window to render the sprite into or NULL to render into all windows.

iSpriteDestroy(SPRITE*)
   SPRITE* = sprite object
             Note that destroying sprite objects is not necessary because the engine will
             do it automatically on exit.

iSpriteHide(SPRITE*)
   SPRITE* = sprite object

iSpriteShow(SPRITE*)
   SPRITE* = sprite object

iSpriteSet(SPRITE*,D3DXVECTOR2*,float,D3DXVECTOR2*)
   SPRITE* = sprite object
   D3DXVECTOR2* = screen location
   float = orientation angle about Z axis (tilt).
   D3DXVECTOR2* = scaling. 1.0f,1.0f means no scaling (original size)

iSpriteCameraSet(SPRITE*,CAMERA*)
   SPRITE* = sprite object
   CAMERA* = camera window to render the sprite into or NULL to render into all windows.

iSpriteOrientationSet(SPRITE*,float)
   SPRITE* = sprite object
   float = orientation angle about Z axis (tilt).

iSpriteLocationSet(SPRITE*,D3DXVECTOR2*)
   SPRITE* = sprite object
   D3DXVECTOR2* = screen location. Source-model-center is used as a reference.
                  For sprites, the screen covers an area of 32x24 meters.
                  0,0 location is the center of the screen. So, visible area goes from
                  -16.0f (left screen border) to
                   16.0f (right screen border) horizontally, and
                  -12.0f (screen bottom) to
                   12.0f (screen top) vertically

iSpriteLocation(SPRITE*,D3DXVECTOR2*)
   SPRITE* = sprite object
   D3DXVECTOR2* = location vector. Return data.

iSpriteScaleSet(SPRITE*,D3DXVECTOR2*)
   SPRITE* = sprite object
   D3DXVECTOR2* = scaling. 1.0f,1.0f means no scaling (original size)

iSpritePrioritySet(SPRITE*,int)
   SPRITE* = sprite object
   int = 0 render under texts, 1 render over texts, 2 render as background

iSpriteRenderPrioritySet(SPRITE*,int)
   SPRITE* = sprite object
   int = rendering priority. Default is 0;
         Sprites with lower priority are rendered first (behind sprites with
         a higher priority). Negative values are allowed.

iSpriteRenderModeSet(SPRITE*,DWORD,DWORD)
   SPRITE* = sprite object.
   DWORD = DirectX®'s D3DRENDERSTATE_SRCBLEND factor.
           It can be one of the following: D3DBLEND_ZERO, D3DBLEND_ONE, D3DBLEND_SRCCOLOR
           D3DBLEND_INVSRCCOLOR, D3DBLEND_SRCALPHA, D3DBLEND_INVSRCALPHA, D3DBLEND_DESTALPHA
           D3DBLEND_INVDESTALPHA, D3DBLEND_DESTCOLOR, D3DBLEND_INVDESTCOLOR,
           D3DBLEND_SRCALPHASAT, D3DBLEND_BOTHSRCALPHA, D3DBLEND_BOTHINVSRCALPHA
           Default is D3DBLEND_SRCALPHA.
   DWORD = DirectX®'s D3DRENDERSTATE_DESTBLEND factor.
           See previous parameter for possible values.
           Default is D3DBLEND_INVSRCALPHA.
   Examples of blend mode combinations are:
   iSpriteRenderModeSet(Sprite,D3DBLEND_SRCCOLOR,D3DBLEND_INVSRCCOLOR)
   iSpriteRenderModeSet(Sprite,D3DBLEND_SRCALPHA,D3DBLEND_ONE)
   Feel free to experiment with the various DirectX®'s blending factors.

iSpriteColorSet(SPRITE*,float,float,float,float)
   SPRITE* = sprite object
   float = red (0.0f to 1.0f)
   float = green (0.0f to 1.0f)
   float = blue (0.0f to 1.0f)
   float = alpha (0.0f to 1.0f)
   Default is (1.0f,1.0f,1.0f,1.0f)

iSpriteTextureSet(SPRITE*,TEXTURE*)
   Assign the specified free texture image to the specified sprite.
   Note that the original sprite texture is not removed from the system.
   SPRITE*  = sprite object
   TEXTURE* = free texture object. See iTextureCreate().

iSpriteTextureReset(SPRITE*)
   Re-assign the original texture to the specified sprite. See iSpriteTextureSet()
   Note that this function does nothing if the original texture is already
   assigned to the sprite.
   SPRITE*  = sprite object

iSpriteTextureSwap(SPRITE*,TEXTURE*)
   Assign the specified free texture image to the specified sprite.
   Note that the original sprite texture is not removed from the system.
   Basically, sprite's and free-texture's images are swapped.
   SPRITE*  = sprite object
   TEXTURE* = free texture object. See iTextureCreate().

iSpriteTextureChange(SPRITE*,char*)
   SPRITE* = sprite object.
   char* = texture filename (bmp, dds, dib, jpg, png, tga).
   See iMeshTextureChange() for more.

iSpriteAlphaTextureChange(SPRITE*,char*)
   SPRITE* = sprite object.
   char* = alpha texture filename (bmp, dds, dib, jpg, png, tga).
   See iMeshAlphaTextureChange() for more.

iSpriteMipFilterModeSet(SPRITE*,DWORD)
   SPRITE* = sprite object.
   DWORD = mip-filtering mode. The following values are supported:
           D3DTEXF_NONE, mipmapping disabled.
           D3DTEXF_POINT, nearest-point filtering.
           D3DTEXF_LINEAR, bilinear interpolation filtering. This is the default.
           D3DTEXF_ANISOTROPIC, anisotropic texture filtering.
           D3DTEXF_FLATCUBIC, flat-cubic filtering
           D3DTEXF_GAUSSIANCUBIC, Gaussian-cubic filtering

iSpriteTextureModeSet(SPRITE*,DWORD)
   SPRITE* = sprite object.
   DWORD = texture mapping mode. The following values are supported:
           D3DTADDRESS_WRAP, texture tiling. This is the default.
           D3DTADDRESS_MIRROR, texture tiling with mirroring.
           D3DTADDRESS_CLAMP, texture tiling disabled.
           D3DTADDRESS_BORDER, texture tiling disabled (border color is used
                               outside texture bounds).
           D3DTADDRESS_MIRRORONCE, texture tiling disabled, mirroring enabled.

BOOL iSpritePicked(SPRITE*)
   Return TRUE if the specified sprite is under the mouse pointer.
   Hidden sprites cannot be picked.
   SPRITE* = sprite object

iSpriteRender(SPRITE*,BOOL)
   SPRITE* = sprite object to immediately render to screen.
   BOOL = whether to wipe the window before rendering the sprite.
          NOTE: not wiping the screen may produce artifacts that are not
          guaranteed to be identical on all systems.
          NOTE: this function was designed for single sprite rendering.
          To implement for example a multi-sprite loading progress-bar,
          use iRender() function instead.


PARTICLE


PARTICLE* iParticleCreate(char*,int)
   Return particle object.
   char* = source picture file to create particle system from.
           It is typically an image with transparency (alpha) information (dds, tga, png).
   int   = maximum number of particles that can be generated simultaneously by this object.
           The number of particles visible at any time depends on how many particles are
           emitted per second and their life time.
           See iParticleEmitterCreate() and iParticleLifeTimeSet().
   NOTE: particles are hidden when they are created. You can show them with iParticleShow().

PARTICLE* iParticleCreateFromMemory(char*,int,int,int)
   Return particle object.
   char* = pointer to the first byte of an image file (bmp, dds, dib, jpg, png, tga)
           previously loaded into memory.
   int = size of texture image file in memory, in bytes.
   int = texture's unique identifier value.
   int = maximum number of particles.
   See also iParticleCreate().

iParticleDestroy(PARTICLE*)
   PARTICLE* = particle object
   Note that destroying particle objects is not necessary because the engine will
   do it automatically on exit.

iParticleHide(PARTICLE*)
   PARTICLE* = particle system object

iParticleShow(PARTICLE*)
   PARTICLE* = particle system object

iParticleRenderModeSet(PARTICLE*,int)
   PARTICLE* = particle system object
   int   = render-mode, as follows:
           0=normal (default)
           1=burn-out. Translucent surface color will burn to white when two or more
             particles overlap.
           2=original colors. The original colors of the source pictures are added in
             to enhance the effect.
           3=original colors (burn-out).

iParticleTextureSet(PARTICLE*,TEXTURE*)
   Assign the specified free texture image to the specified particle.
   Note that the original particle texture is not removed from the system.
   PARTICLE*  = particle object
   TEXTURE* = free texture object. See iTextureCreate().

iParticleTextureReset(PARTICLE*)
   Re-assign the original texture to the specified particle. See iParticleTextureSet()
   Note that this function does nothing if the original texture is already
   assigned to the particle.
   PARTICLE*  = particle object

iParticleLifeTimeSet(PARTICLE*,float)
   PARTICLE* = particle system object
   float = particle life-time

iParticleAirResistanceSet(PARTICLE*,float)
   PARTICLE* = particle system object
   float = particle air-resistance. Negative values perform higher air resistance.
           Positive values cause the particles to accelerate.
           By default it is -1.0f (moderate air resistance).
           NOTE: zero (no air resistance) is not recommended as a value.
           Values too close to zero cause unsmooth particle motion.

iParticleGravitySet(PARTICLE*,D3DXVECTOR3*)
   PARTICLE* = particle system object
   D3DXVECTOR3* = gravity vector.

iParticleColorSet(PARTICLE*,D3DXVECTOR3*,D3DXVECTOR3*)
   PARTICLE* = particle system object
   D3DXVECTOR3* = 3-value vector specifying the initial R,G,B color (values
                  between 0.0f and 1.0f).
   D3DXVECTOR3* = 3-value vector specifying the final R,G,B color (values
                  between 0.0f and 1.0f).

iParticleReset(PARTICLE*)
   PARTICLE* = particle system object to reset
   NOTE: resetting means removing particles from the scene. It is not the same as
   hiding them with iParticleHide() which only makes them invisible, but still emitted.

EMITTER* iParticleEmitterCreate(PARTICLE*)
   Return emitter object for the specified particle system.
   PARTICLE* = particle system object to be used as a generator

iParticleEmitterDestroy(EMITTER*)
   EMITTER*  = emitter object
   Note that destroying emitter objects is not necessary because the engine will
   do it automatically when their particle system object is destroyed.
   It also means that trying to destroy an emitter after its particle system has
   been destroyed will return an error message.

iParticleEmitterEmit(EMITTER*,float,float)
   EMITTER*  = emitter object
   float     = number of particles to emit per second.
               Note that the emitter can't emit an unlimited number of particles. The
               total number of particles that can be rendered is specified by iParticleCreate()
   float     = initial alpha intensity for emitted particles, between 0.0f and 1.0f inclusive.
               Basically, it is the initial visibility factor.
   NOTE: this function should be executed at every Run() loop in order to work properly

iParticleEmitterLocationSet(EMITTER*,D3DXVECTOR3*)
   EMITTER*  = emitter object
   D3DXVECTOR3* = emitter location

iParticleEmitterDirectionSet(EMITTER*,D3DXVECTOR3*,D3DXVECTOR3*)
   EMITTER*  = emitter object
   D3DXVECTOR3* = emitter minimum direction
   D3DXVECTOR3* = emitter maximum direction.
   NOTE: each particle is emitted to a different random direction, between the specified
   minimum and maximum directions (absolute orientation).
   For example, if min direction vector = (-1.0f,0.5f,-0.25f) and
   max direction vector = (1.0f,0.9f,0.0f), the emitter will randomize the direction
   vector so that its X component is between -1.0f and 1.0f, its Y component is between
   0.5f and 0.9f and its Z component is between -0.25f and 0.0f.
   NOTE: if emitter speed is zero (see iParticleEmitterSpeedSet() function), then
   the length of the randomized direction vector determines the velocity of the particle.
  
iParticleEmitterSpeedSet(EMITTER*,float,float)
   EMITTER*  = emitter object
   float = minimum speed for emitted particles
   float = maximum speed for emitted particles.
   NOTE: each particle is emitted at a different random speed, between the specified
   minimum and maximum velocities.
   See also iParticleEmitterDirectionSet() function.

iParticleEmitterScaleSet(EMITTER*,D3DXVECTOR2*,D3DXVECTOR2*)
   EMITTER*  = emitter object
   D3DXVECTOR2* = initial particle size.
   D3DXVECTOR2* = final particle size.

iParticleEnvMapCasterAdd(PARTICLE*)
   PARTICLE* = particle object to be added to the list of particles that are
               reflected/refracted by dynamic environment surfaces.
               See iEnvMapUpdateRateSet() for more.
   NOTE: because particles are flat objects automatically oriented to always face
   the point of view, they may generate artifacts in the reflected environment image.
   This happens because reflected image is built from 6 renderings of the scene taken
   from six different points of view. In each rendering the particle is oriented
   differently, and this can make seams between joined renderings evident.

iParticleEnvMapCasterRemove(PARTICLE*)
   PARTICLE* = particle object to be removed from the list. See iParticleEnvMapCasterAdd().


TRAIL


TRAIL* iTrailCreate(char*,int)
   Return trail object.
   char* = source picture file to create trail system from
           It is typically an image with transparency (alpha) information (dds, tga, png).
   int   = maximum number of trail segments that can be generated simultaneously by this object.
           The number of trail segments visible at any time depends on how many trail segments
           are emitted per second and their life time.
           See iTrailEmitterCreate() and iTrailLifeTimeSet().
   NOTE: trails are hidden when they are created. You can show them with iTrailShow().

TRAIL* iTrailCreateFromMemory(char*,int,int,int)
   Return trail object.
   char* = pointer to the first byte of an image file (bmp, dds, dib, jpg, png, tga)
           previously loaded into memory.
   int = size of texture image file in memory, in bytes.
   int = texture's unique identifier value.
   int = maximum number of trail segments.
   See also iTrailCreate().

iTrailDestroy(TRAIL*)
   TRAIL* = trail object
            Note that destroying trail objects is not necessary because the engine will
            do it automatically on exit.

iTrailHide(TRAIL*)
   TRAIL* = trail system object

iTrailShow(TRAIL*)
   TRAIL* = trail system object

iTrailRenderModeSet(TRAIL*,int)
   TRAIL* = trail system object
   int   = render-mode, as follows:
           0=normal
           1=burn-out. Translucent surface color will burn to white when two or more
             trail segments overlap.
           2=original colors. The original colors of the source pictures are added in
             to enhance the effect.
           3=original colors (burn-out).

iTrailTextureSet(TRAIL*,TEXTURE*)
   Assign the specified free texture image to the specified trail.
   Note that the original trail texture is not removed from the system.
   TRAIL*  = trail object
   TEXTURE* = free texture object. See iTextureCreate().

iTrailTextureReset(TRAIL*)
   Re-assign the original texture to the specified trail. See iTrailTextureSet()
   Note that this function does nothing if the original texture is already
   assigned to the trail.
   TRAIL*  = trail object

iTrailLifeTimeSet(TRAIL*,float)
   TRAIL* = trail system object
   float = particle life-time

iTrailColorSet(TRAIL*,D3DXVECTOR3*,D3DXVECTOR3*)
   TRAIL* = trail system object
   D3DXVECTOR3* = 3-value vector specifying the initial R,G,B color (values
                  between 0.0f and 1.0f).
   D3DXVECTOR3* = 3-value vector specifying the final R,G,B color (values
                  between 0.0f and 1.0f).
   NOTE: darker colors will be rendered as more translucent, if render
   mode is set to burn-out. See iTrailRenderModeSet() for details.

iTrailReset(TRAIL*)
   TRAIL* = trail system object to reset
   NOTE: resetting means removing trail segments from the scene. It is not the same as
   hiding them with iTrailHide() which only makes them invisible, but still there.

TRAILEMITTER* iTrailEmitterCreate(TRAIL*)
   Return emitter object for the specified trail system.
   TRAIL* = trail system object to be used as a generator

iTrailEmitterDestroy(TRAILEMITTER*)
   TRAILEMITTER*  = emitter object
   Note that destroying emitter objects is not necessary because the engine will
   do it automatically when their trails system object is destroyed.
   It also means that trying to destroy an emitter after its trail system has
   been destroyed will return an error message.

iTrailEmitterEmit(TRAILEMITTER*,float,float)
   TRAILEMITTER*  = emitter object
   float     = number of trail segments to emit per second.
               Note that the emitter can't emit an unlimited number of trail segments. The
               total number of trail segments that can be rendered is specified by iTrailCreate()
   float     = initial alpha intensity for emitted trail segments, between 0.0f and 1.0f incl.
               Basically, it is the initial visibility factor.
   NOTE: this function should be executed at every Run() loop in order to work properly

iTrailEmitterLocationSet(TRAILEMITTER*,D3DXVECTOR3*)
   TRAILEMITTER*  = emitter object
   D3DXVECTOR3* = emitter location

iTrailEmitterScaleSet(TRAILEMITTER*,float)
   TRAILEMITTER* = emitter object
   float = size.

iTrailEmitterExpansionSpeedSet(TRAILEMITTER*,float)
   TRAILEMITTER* = emitter object
   float = expansion speed, in meters per second.

iTrailEmitterCut(TRAILEMITTER*)
   TRAILEMITTER* = emitter object to stop emission from.
   NOTE: cutting trails may fail if iTrailEmitterEmit() is executed for
   the same emitter during the same Run() loop.

iTrailEmitterOrientationSet(TRAILEMITTER*,D3DXQUATERNION*)
   TRAILEMITTER* = emitter object
   D3DXQUATERNION* = emitter orientation
                     Trails are made of connected quadrangles. At each emission, a new
                     quadrangle is appended to the previous quadrangle.
                     When the emitter orientation is null, the ending side of the
                     newly emitted quadrangle is parallel to the world X axis.

iTrailEnvMapCasterAdd(TRAIL*)
   TRAIL* = trail object to be added to the list of trails that are reflected/refracted by
            dynamic environment surfaces. See iEnvMapUpdateRateSet() for more.

iTrailEnvMapCasterRemove(TRAIL*)
   TRAIL* = trail object to be removed from the list. See iTrailEnvMapCasterAdd().


TEXTURES


TEXTURE* iTextureCreate(char*)
   Return free texture object.
   char* = source image file name (bmp, dds, dib, jpg, png, tga).
   This function creates a free texture in memory. Free textures are used to
   quickly change the texture assigned to meshes and sprites, thus allowing
   fast texture animation. See also iMeshTextureSet() and iSpriteTextureSet().
   Creating again and again the same texture (from the same source file) will not
   waste memory. The engine will re-use the data already in memory, if possible.

TEXTURE* iTextureCreateFromMemory(char*,int,int)
   char* = pointer to the first byte of an image file (bmp, dds, dib, jpg, png, tga)
           previously loaded into memory.
   int = size of texture image file in memory, in bytes.
   int = texture's unique identifier value. If this value is identical to the identifier of
         a texture previously created, the system will 're-use' image data from the existing
         texture. In this case, texture's memory file pointer (parameter above) can be NULL.
         Sharing identical texture data optimizes video memory usage, speeding up both
         rendering and resource loading.
         NOTE: this parameter is global. For example, a sprite and a mesh can share the
         same texture.

iTextureDestroy(TEXTURE*)
   TEXTURE* = free texture object
   Note that destroying texture objects is not necessary because the engine will
   do it automatically on exit.

iTextureToNormalMap(TEXTURE*)
   Convert the specified texture from a standard height-map to a standard normal-map.
   TEXTURE* = free texture object

iTextureMipLevelsSet(int)
   int = number of mipmap levels to be created for loaded textures
         By default this value is zero, which means that the maximum possible
         number of mipmap levels are created.
         Setting the value to 1 will generate no mipmap levels, that is,
         the original texture is always used for rendering, no matter
         how far a texture mapped object is from the camera.
   Textures are loaded when a texture mapped object (mesh, sprite, skybox, etc)
   is created with a i...Create() function.
   NOTE: the setting affects only the textures that are loaded after this
   function is called.

iTextureMipFilterSet(int)
   int = mipmap creation algorithm.
         When creating the mipmap levels, the source texture is progressively 'half-ed'
         in size. This function sets the algorithm to be used to compute each resulting
         shrunk image. By default it is D3DX_FILTER_LINEAR.
         Possible values are D3DX_FILTER_NONE, D3DX_FILTER_POINT, D3DX_FILTER_LINEAR,
         D3DX_FILTER_TRIANGLE, D3DX_FILTER_BOX, D3DX_FILTER_MIRROR_U,
         D3DX_FILTER_MIRROR_V, D3DX_FILTER_MIRROR_W, D3DX_FILTER_MIRROR,
         D3DX_FILTER_DITHER.
         Note that these settings are directly taken from Microsoft® DirectX®. For more
         information please seek the Web for one of them.
   NOTE: the setting affects only the textures that are loaded after this
   function is called. See also iTextureMipLevelsSet().


INPUT-KEYBOARD


BOOL iKeyDown(int)
   Return TRUE if the specified key is pressed
   int = key codes (like DIK_A, DIK_B, etc) are listed in DirectX® documentation and
         on the Web. Seek for 'Keyboard Device Constants'.
         Set this value to -1 to check if any key is pressed
   NOTE: not all keyboards allow for more than two simultaneous key presses to
         be detected, unless one of them is [Ctrl] or [Alt].

BOOL iKeyClick(int)
   Return TRUE if the specified key is pressed.
   int = same as iKeyDown(). Note that -1 functionality is not supported though.
   NOTE: this function will return TRUE only once. It will no longer return TRUE until the
   key is released and pressed again.
   NOTE: you cannot call iKeyClick() more than once per Run() loop for the same DIK code.
   If you do so, the second call will always return FALSE.
   Also, iKeyClick() will always return FALSE if it is called after iTypedChar(TRUE),
   in the same Run() loop.

iKeyUpWait(int)
   Stop execution (Run() loop) until the specified key is NOT pressed
   int = same as iKeyDown()
         Set this parameter to -1 to wait for all keys up

unsigned char iTypedChar(BOOL)
   Return the character (ASCII code) generated by the current keystroke. Return zero if
   no key is pressed or there is no printable character associated with the pressed key.
   International, standard 256-code ASCII based keyboards are supported.
   BOOL = if TRUE, this function will return the character only once. It will then return
          zero until the key is released. If FALSE, it will keep returning the character
          until the key is released.
   NOTE: returned value is of type 'unsigned char', which ranges from 0x00 to 0xff (0-255).


INPUT-MOUSE


iMouseResolutionSet(int)
   int = mouse screen-width resolution (number of pixels covered by the virtual mouse screen).
   NOTE: for example, if you specify 640, the mouse moves as fast as if it is over a 640x480
   pixel screen. If it is 1024, it is as if it is over a 1024x768 screen, and so on.
   So, the bigger the resolution the SMALLER the mouse speed. Default is 320.

iMouseWinModeSet(BOOL)
   Enable/disable Windows mode for all mouse functions. When in Windows mode
   mouse coordinates match those of the Windows mouse pointer. When in normal
   mode, the engine and Windows use two different methods to keep track of
   mouse coordinates and they usually don't match.
   BOOL = TRUE to enable Windows mode, FALSE to disable (default).
   NOTE: this function has no effect when the engine is in full-screen mode.

BOOL iMouseButtonDown(int)
   Return TRUE if the specified mouse button is pressed
   int = mouse button codes can be 0=left, 1=right, 2=middle

BOOL iMouseButtonClick(int)
   Return TRUE if the specified mouse button is pressed
   int = mouse button codes can be 0=left, 1=right, 2=middle
   NOTE: this function will return TRUE only once. It will no longer return TRUE until the
   button is released and pressed again.
   NOTE: you cannot call iMouseButtonClick() more than once per Run() loop for the same button.
   If you do so, the second call will always return FALSE.

iMouseButtonUpWait(int)
   Stop execution (Run() loop) until the specified button is NOT pressed
   int = mouse button codes can be 0=left, 1=right, 2=middle
         Set this parameter to -1 to wait for all buttons up

float iMouseX()
   Return mouse horizontal position, where 0.0f = left margin and a value
   close to 1.0f = right margin.
   Note that the output can be very close to 1.0f, but always less than 1.0f.
   If necessary, you can compute the typical sprite/print screen coordinates as follows:
   x = iMouseX()*32.0f-16.0f;
   y = 12.0f-iMouseY()*24.0f;

float iMouseY()
   Return mouse vertical position, where 0.0f = top margin and a value
   close to 1.0f = bottom margin.
   Note that the output can be very close to 1.0f, but always less than 1.0f.
   See iMouseX() for more.

float iMouseZ(BOOL)
   Return mouse wheel position.
   BOOL = whether to return relative wheel position changes since last call to this
          function (TRUE), or the absolute wheel position since last call to
          iMouseZSet() function (FALSE).

iWindowsMouseHide(BOOL)
   Hide (TRUE) or show (FALSE, default) Windows mouse pointer when the application
   runs windowed.

iMouseReset(D3DXVECTOR2*)
   D3DXVECTOR2* = location to reset the mouse to.
                  NOTE: X and Y must be between 0.0f and 1.0f.
                  (0.0f,0.0f) is the upper/left corner of the screen and
                  (1.0f,1.0f) is the bottom/right

iMouseZSet(float)
   Set mouse wheel position
   float = new mouse wheel position


INPUT-JOYSTICK-GAMEPAD


int iJoyCount()
   Return the number of installed joysticks/gamepads

char* iJoyName(int)
   Return the pointer to the string of specified joystick name
   int = joystick number

BOOL iJoyButtonDown(int,int)
   Return TRUE if the specified joystick button is pressed
   int = joystick number
   int = joystick button number (0-127)

BOOL iJoyButtonClick(int,int)
   Return TRUE if the specified joystick button is pressed
   int = joystick number
   int = joystick button number (0-127)
   NOTE: this function will return TRUE only once. It will no longer return TRUE until
   the button is released and pressed again.
   NOTE: you cannot call iJoyButtonClick() more than once per Run() loop for the same button.
   If you do so, the second call will always return FALSE.

iJoyButtonUpWait(int,int)
   Stop execution (Run() loop) until the specified button is NOT pressed
   int = joystick number
   int = joystick button number (0-127)
         Set this parameter to -1 to wait for all buttons (of all joysticks) up

iJoyAverageCenterWait(int,float)
   int = joystick number
   float = average computation period. See iJoyXAverage() for details.

float iJoyX(int)
   Return position of X axis for the specified joystick.
   Returned value is between -1.0f and 1.0f.
   int = joystick number
   NOTE: never assume that the returned value is stable. For example, even if the joystick is
   relaxed (centered), for some devices, the returned value may not be always zero.
   See iJoyXAverage()

float iJoyY(int)
   Return position of Y axis for the specified joystick. See iJoyX() for more.

float iJoyZ(int)
   Return position of Z axis for the specified joystick. See iJoyX() for more.

float iJoyXAverage(int,float)
   Return average position of X axis for the specified joystick.
   int = joystick number
   float = average computation period, in seconds. Basically, an average value is returned
           after summing up direct values from the hardware for the specified period.

float iJoyYAverage(int,float)
   Return average position of Y axis for the specified joystick. iJoyXAverage() for more

float iJoyZAverage(int,float)
   Return average position of Z axis for the specified joystick. iJoyXAverage() for more

iJoyState(int,DIJOYSTATE2*)
   Return a pointer to the DirectInput's DIJOYSTATE2 structure for the specified joystick.
   int = joystick number
   DIJOYSTATE2* = pointer to a DIJOYSTATE2 structure that will be filled with all the
                  available information about the current state of axes and buttons,
                  as they are provided by DirectInput.
                  In your DLL code, you will typically define the structure variable with
                  something like 'DIJOYSTATE2 js;'
                  You will then pass the structure pointer to the function with something
                  like ' iJoyState(joy,&js)'
                  You will finally access structure data with something like 'xaxis = js.lX;'
   NOTE: consider this an advanced function. Unlike other iJoy...() functions, this one will
   return direct, untransformed joystick data. For more information about DIJOYSTATE2
   structure, please search the web or DirectX documentation for DIJOYSTATE2.

BOOL iJoyForceSet(int,D3DXVECTOR3*)
   Set the force vector for the specified joystick.
   Return FALSE if the joystick doesn't support force feedback functionality
   int = joystick number
   D3DXVECTOR3* = force vector.
                  The actual effect produced by the XYZ values in the vector depends on the device.
   NOTE: the first call to this function must happen in the Init() function of your application.
         This call will only initialize the force feedback device, without setting any force.
         Subsequent calls must happen in the Run() function of your application.


TEXTS


FONT* iFontCreate(char*,CAMERA*)
   Return font object.
   char* = source .wid file name.
           A font (character set) is derived from a list of sprites. Each sprite is
           rendered as a specific character. You can generate your own font as follows:
           (1) in your modeler, create the characters of the set as flat objects by using
               the same texture for all of them.
               The procedure is the same used to create source .x files for sprites. See
               iSpriteCreate() for details.
           (2) save each character as a separate file, with a name like 'name_XX.x' where
               XX is the ASCII code of the character, in hexadecimal. For example, the .x
               file for the Z character will be 'name_5a.x'.
           (3) only the characters (sprites) that are actually to be used have to be
               created.
           (4) in order to properly render the character into words, the engine must know
               the width of each character (sprite) of the set. To provide this information
               you must edit a .wid file in ASCII format. You can open the file in
               C:\Program Files\3impact\3ImpactWork\default_res\fontwhite\font.wid
               by using your compiler (or any ASCII text editor) and use it as a reference.
               NOTE: you must specify the width of all 256 characters of the set, including
               those that will not be used.
           (5) Save your .wid file to the same folder where you have saved the .x files
               of your character set, naming it accordingly (for example, 'name.wid').
   CAMERA* = camera window to render the text into or NULL to render into all windows.

FONT* iFontCreateFromMemory(char*,int,char**,int*,char*,int,int,CAMERA*)
   Return font object.
   char* = pointer to the first byte of a .wid file previously loaded into memory.
           See iFontCreate() for details on .wid file format.
   int = size of the .wid file in memory, in bytes.
   char** = pointer to an array of 256 pointers. Each pointer in the array must point to the
            first byte of an .x file previously loaded into memory, or it must be set to NULL.
            Each .x file must represent a character of the set.
   int* = pointer to an array of 256 integers, each representing the size, in bytes, of the
          related .x file in memory (see previous parameter).
   char* = pointer to the first byte of the character set's texture file in memory.
           The file must be an image file (typically dds, png, tga) previously
           loaded into memory.
   int = size of texture image file in memory, in bytes.
   int = texture's unique identifier value.
         Usage identical to similar parameter of iTextureCreateFromMemory().
   CAMERA* = camera window to render the text into or NULL to render into all windows.

iFontDestroy(FONT*)
   FONT* = font object
           Note that destroying font objects is not necessary because the engine will
           do it automatically on exit.

iFontCameraSet(SPRITE*,CAMERA*)
   FONT* = font object
   CAMERA* = camera window to render the text into or NULL to render into all windows.

iPrint(char*,D3DXVECTOR2*,D3DXVECTOR2*,float,FONT*)
   char* = string to print.
   D3DXVECTOR2* = screen-location
                  Coordinates specify a screen location using
                  the same convention used for iSpriteLocationSet().
   D3DXVECTOR2* = text X and Y scaling, where 1.0f,1.0f means no scaling (original size)
   float = spacing. Horizontal distance between characters.
   FONT* = font object.
   Note that this function should be executed at every Run() loop to work properly.

iPrintCentered(char*,D3DXVECTOR2*,D3DXVECTOR2*,float,FONT*,float)
   The same as iPrint(), but the text is centered respect to specified x coordinate.
   Also, if the last parameter (float) is bigger than zero, it will shrink the whole text
   to the specified width, if necessary.

float iPrintWidth(char*,D3DXVECTOR2*,float,FONT*)
   Return the screen width which the specified string would have, if printed
   by iPrint() or iPrintCentered(), by using the specified parameters.
   char* = string to print.
   D3DXVECTOR2* = text scaling.
   float = spacing.
   FONT* = font object.

iPrintColorSet(float,float,float,float)
   Set the base color and transparency (alpha) for any text printed by
   iPrint() or iPrintCentered(), after this function call.
   float = red (0.0f to 1.0f)
   float = green (0.0f to 1.0f)
   float = blue (0.0f to 1.0f)
   float = alpha (0.0f to 1.0f)
   Default is (1.0f,1.0f,1.0f,1.0f)

iPrintsHide()
   iPrint-like instructions doesn't actually print the text to the screen immediately.
   Instead they 'show' appropriate sprites that will be rendered after the Run() loop is
   completed.
   In order to ensure that no text is visible after you hide all 3d objects and all sprites,
   for example to switch to a different program section, any texts that may have been
   printed (shown) in the current Run() loop execution, can be 'hidden' along with 3d
   objects and sprites by calling this function.


SPRINGS


SPRING* iSpringCreate(BODY*,D3DXVECTOR3*,BODY*,D3DXVECTOR3*)
   Return spring object.
   BODY* = body object, to attach the new spring to
   D3DXVECTOR3* = location to attach the spring to (source-model-center relative)
   BODY* = target body object. If not NULL, the target (next parameter) is relative to
           this body.
   D3DXVECTOR3* = spring target.
                  The spring will tend to keep the body object and the target together.
                  Note: the target can be absolute location (when previous parameter
                  is NULL) or target body (source-model-center) relative (when previous
                  parameter is a valid body object).
   NOTE: springs are disabled when they are created. You can enable them with iSpringEnable().

iSpringDestroy(SPRING*)
   SPRING* = spring object to destroy
   Note that destroying spring objects is not necessary because the engine will
   do it automatically on exit.

iSpringDisable(SPRING*)
   SPRING* = spring object

iSpringEnable(SPRING*)
   SPRING* = spring object

iSpringBodySet(SPRING*,BODY*,D3DXVECTOR3*)
   SPRING* = spring object
   BODY* = body object, to attach the existing spring to
           NOTE: if the spring is attached to a different body,
           it will be moved to this body.
   D3DXVECTOR3* = spring location (body's source-model-center relative)

iSpringTargetBodySet(SPRING*,BODY*,D3DXVECTOR3*)
   SPRING* = spring object
   BODY* = target body object. See iSpringCreate() for details.
   D3DXVECTOR3* = See iSpringCreate() for details.

iSpringSet(SPRING*,float)
   SPRING* = spring object
   float = spring factor. Must be > 0.0f. Default is 0.75f.
           The bigger the factor, the stronger (more bouncy) the spring.
           See also iSpringCreate().

iSpringDampingSet(SPRING*,float)
   SPRING* = spring object
   float = damping factor. Default is 0.05f.
           Typically, this value is between 0.0f and 1.0f.
           The bigger the factor, the harder (less bouncy) the spring.
           See also iSpringCreate().


SOUND


BOOL iAudioIsAvailable()
   Return TRUE if a sound card (and sound card driver) is installed

iListenerCameraSet(CAMERA*)
   CAMERA* = camera object to use as 3d sounds listener
             By default, the first camera created is made the listener.

iListenerDopplerSet(float)
   float = Doppler factor. 0.0f for no Doppler effect. 1.0f for real Doppler effect.
           To perform accentuated Doppler effect set this value between 1.0f and 10.0f.

SOUND* iSoundCreate(char*,BOOL)
   Return sound object.
   char* = filename in .wav, Pulse Code Modulation (PCM) format. Warning, non PCM wav files
           could work on some sound cards but fail on other cards. Only PCM format is
           guaranteed to work on any sound card.
   BOOL =  If this value is FALSE, a 2d sound is created. 2d sounds are faster to process.
           NOTE: if the sound is 3d (TRUE) the source .wav PCM file must be mono (non-stereo).

SOUND* iSoundOggCreate(char*,BOOL,int)
   Return sound object.
   char* = filename in .ogg (VorbisOgg) format.
   BOOL =  If this value is FALSE, a 2d sound is created. 2d sounds are faster to process.
           NOTE: if the sound is 3d (TRUE) the source .ogg file must be mono (non-stereo).
   int  =  loading buffer size. While loading an .ogg file, the engine will need temporary
           memory storage for decompressing. This storage is released when loading is complete.
           In general, you can set this parameter to 0, thus letting the engine choose
           the size of the temporary buffer automatically (15 times the size of source file).
           Should the sound be cropped (not entirely played), you can set the loading buffer
           manually by specifying a buffer size, in bytes.

SOUND* iSoundOggCreateFromMemory(char*,int,BOOL,int)
   char* = pointer to the first byte of a .ogg file previously loaded into memory.
   int = size of .ogg file in memory, in bytes.
   BOOL =  if FALSE, create a 2d sound.
   int  =  loading buffer size.
   See also iSoundOggCreate().

iSoundDestroy(SOUND*)
   SOUND* = sound object
   Note that destroying sound objects is not necessary because the engine will
   do it automatically on exit.

iSoundPlay(SOUND*,BOOL)
   SOUND* = sound object to play. See iSoundCreate() and iSoundOggCreate().
   BOOL   = set this to TRUE to play the sound continuously (looping), or
            set it to FALSE to play it only once

iSoundPlayNow(SOUND*,BOOL)
   The same as iSoundPlay(), but the playing is started immediately, and not
   when the Run() loop is terminated.

iSoundPlaying(SOUND*)
   Return TRUE if the specified sound is playing
   SOUND* = sound object

iSoundStop(SOUND*,int)
   SOUND* = sound object to stop, or NULL to stop all sounds
   int = sample location to reset the sound to. For example, setting it to zero
         will reset the sound to the beginning.
         Setting this parameter to -1 will keep current sample location, so it
         will restart from where it was stopped, if iSoundPlay() is called.

iSoundLocationSet(SOUND*,D3DXVECTOR3*)
   SOUND* = sound object
            It must be a 3d sound. See iSoundCreate() and iSoundOggCreate() for more.
   D3DXVECTOR3* = 3d sound location

iSoundVelocitySet(SOUND*,D3DXVECTOR3*)
   SOUND* = sound object
   D3DXVECTOR3* = 3d sound velocity.
   NOTE: sound velocity is used only to compute Doppler effect. You don't have to
   update sound source velocity by calling this function, if Doppler factor is 0.0f.
   See iListenerDopplerSet() for more.

iSoundFrequencySet(SOUND*,int)
   SOUND* = sound object
   int = frequency, in Hz.
         Default is original sound frequency.

int iSoundFrequency(SOUND*)
   Return specified sound frequency
   SOUND* = sound object

iSoundVolumeSet(SOUND*,float)
   SOUND* = sound object
   float = volume
           - If the sound is 2d, this value must be between 0.0f and 1.0f.
             By default sound volume is 1.0f, when a 2d sound is created.
           - If the sound is 3d, this value must be bigger than 0.0f. It is the distance
             beyond which the sound volume starts decreasing.
             By default sound volume is 1.0f meters, when a 3d sound is created.


NETWORK


BOOL iNetServerStart(char*,char*,int,DWORD,int)
   Start the network system as server for the local machine.
   Return false if the system could not be started for some reason.
   char* = session name. Connecting users will see this name in the list of network
           games to join, when the client network system is launched on their local
           machine. See iNetClientStart() for more.
   char* = player name. The name identifying the server.
   int = port number.
         The system port to use for network input/output data. For example, 25857 (or 0x6501).
   DWORD = game identifier. This value is used to generate a globally unique identifier
           for the game application. For example 0xf9414234 and 0x0bc18a55 are valid ids.
           The id must be identical both for iNetServerStart() and iNetClientStart() calls.
   int = network buffer size, in bytes.
         This function allocates memory to be used as temporary buffer for data
         exchanges. 10000 bytes is usually enough for bodysync and floatsync traffic.
         However, if you are going to send/receive big messages by calling iNetDataSend()
         and iNetData(), you must specify an adequate value.
   NOTE: you cannot call this function if iNetClientStart() has already been called for
   the local machine.
   NOTE: after calling this function, you must stop the network system before exiting
   the game by calling iNetStop()

BOOL iNetClientStart(char*,char*,DWORD,int,char*,int,int,SPRITE*)
   Start the network system as client for the local machine.
   Return false if the system could not be started for some reason.
   This functions allows you to either open a standard connection dialog box
   or directly connect to a defined remote server.
   char* = server IP address. For example "64.64.64.64", or "64.64.64.64:8080"
           if a port number is also required.
   char* = player name. The name identifying the local client machine.
   DWORD = game identifier. See iNetServerStart() for details.
   int = network buffer size, in bytes. See iNetServerStart() for details.
   char* = optional dialog box title, or "" for no title.
   int = remote game sequential number. If greater or equal to zero, the optional
         dialog box is not shown. The specified sequential number indicates the game
         to select from the list of available games on the remote server. The first
         game in the list is 0, the second is 1 and so on.
         NOTE: when hidden, the dialog box is still processed normally. Actually,
         the system will simulate user actions, by automatically pressing the
         'Search' button, selecting one game from the list and pressing 'Join'.
         For debug purposes, you can show the dialog while automatically processed
         by setting the SPRITE* parameter below to NULL.
   int = game searching timeout, in seconds (auto connect mode only).
   SPRITE* = sprite to render while connecting, or NULL.
             In auto-connect mode, this parameter should always be a valid sprite.
   NOTE: you cannot call this function if iNetServerStart() has already been called for
   the local machine.
   NOTE: after calling this function, you must stop the network system before exiting
   the game by calling iNetStop()

iNetStop()
   Stop the network system for the local machine, also releasing all memory resources
   allocated by calls to iNetServerStart() or iNetClientStart().

iNetClientDisconnect(DWORD)
   Disconnect the specified client machine.
   DWORD = machine's player ID. See iNetPlayerId() for details.
   NOTE: calling this function on the client machine has no effect.

BODYSYNC* iNetBodySyncCreate(BODY*,float)
   Return bodysync object.
   BODY* = body object to be kept synchronized on all connected machines.
           - On the server machine, the specified body is normally processed. That is
             it physics behavior is simulated locally like a normal, non-multiplayer
             game running on a unconnected computer.
           - On all client machines, the specified body is normally processed, but it
             is forced to the same location, orientation, velocity and spin it has
             on the connected server machine. Synchronization is performed at regular
             intervals, as specified by the frequency parameter (see below).
   float = body synchronization frequency. The server will send 48 bytes to all
           connected clients every [frequency] seconds. For example, if this parameter
           is 0.5f seconds, the 48 synchronization bytes are sent twice per second.

iNetBodySyncDestroy(BODYSYNC*)
   BODYSYNC* = bodysync object.
   Note that destroying bodysync objects is not necessary because the engine will
   do it automatically on exit.

FLOATSYNC* iNetFloatSyncCreate(float*,float,float,float)
   Return floatsync object.
   float* = pointer to the float variable to be kept synchronized on all connected machines.
            For example, if you want to keep identical for all connected machines the
            content of a variable named 'JoyXAxis', this parameter would be '&JoyXAxis'.
            Note: The specified variable should never be updated by normal C++ expressions
            or normal function calls. Instead, it should only be updated by calling
            iNetFloatSyncUpdate().
   float = synchronization frequency. The server will exchange 12 bytes with all
           connected clients every [frequency] seconds. For example, if this parameter
           is 0.1f seconds, the 12 synchronization bytes needed to keep the float variable
           identical on all machines are exchanged 10 times per second.
   float = minimum synchronization frequency. Synchronization data are only exchanged when
           the float variable content changes. However, forced exchanges happen at regular
           intervals, as specified by this parameter.
   float = Float variable variation threshold. The variable contents is not considered as
           'changed' unless the variation is bigger than the specified threshold.
           For example, if this parameter is 0.25f, the 'JoyXAxis' is not updated on all
           machines until it is changed by +/- 0.25f.
           Setting a 0.0f threshold will trigger updates for variations of any amount.

BOOL iNetFloatSyncUpdate(FLOATSYNC*,float)
   Assign the specified value to the float variable bound to the specified floatsync object.
   FLOATSYNC* = floatsync object.
                The float variable bound to this floatsync object is updated on all
                connected machines. Note that the actual variable is not updated
                immediately. Instead, it is updated at regular intervals, as specified
                by frequency parameters passed to iNetFloatSyncCreate(), and only
                if it has changed more than the specified threshold.
                - If this function is called on the server machine, when all conditions are
                  met (frequency, threshold), the actual local variable is updated directly,
                  and synchronization data are sent to all connected client machines.
                - If this function is called on a client machine, when all conditions are
                  met (frequency, threshold), synchronization data are sent to the server,
                  where the actual local variable is then physically updated. The server
                  immediately forwards synchronization data to all client machines, where
                  local variables are physically updated.
   float = new value to assign to the float variable bound to the specified floatsync.

iNetFloatSyncDestroy(FLOATSYNC*)
   FLOATSYNC* = floatsync object.
   Note that destroying floatsync objects is not necessary because the engine will
   do it automatically on exit.

iNetClientReset()
   Start or restart synchronization for all existing bodysyncs and floatsyncs defined.
   Calling this function on all client machines, at least once in your game (i.e.,
   when synchronized simulation starts) is strongly recommended.
   NOTE: the system may automatically call this function if the connection becomes unstable
   or poor, to try to keep the simulation synchronized on all machines.
   NOTE: synchronization will only affect the simulation running on the local client machine.
   Calling this function on the server machine has no effect.

iNetServerSendFrqSet(float)
   Set maximum send frequency for the server.
   float = frequency. By default this value is 0.0f (maximum frequency possible).
   Bodysync and floatsync objects accumulate synchronization data to a buffer at regular
   intervals, as specified by frequency parameters for iNetBodySyncCreate() and
   iNetFloatSyncCreate() functions.
   By default, the server will send the buffered data 75 times per second (once every Run() loop).
   With this function you can force the server to send the buffered data at lower frequency.
   Doing so will not change the average amount of bytes sent per second, but it will tend to
   send, less frequently, bigger packets.
   NOTE: this function, if used, must be called both on the server and all client machines.
   Actually, client versions of the software must know the server send frequency in order to
   properly synchronize. So, the frequency specified must be identical for all machines.

iNetClientSendFrqSet(float)
   Set maximum send frequency for the client.
   float = frequency. By default this value is 0.0f (maximum frequency possible).
   Calling iNetFloatSyncUpdate() on a client machine, causes floatsync objects to
   accumulate synchronization data to a buffer at regular intervals, as specified by
   frequency parameters for iNetFloatSyncCreate().
   By default, the client will send the buffered data 75 times per second (once every Run() loop).
   With this function you can force the client to send the buffered data at lower frequency.
   Doing so will not change the average amount of bytes sent per second, but it will tend to
   send, less frequently, bigger packets.

BOOL iNetSessionTerminated()
   Return TRUE if the connection with the server has been lost. The local machine
   should then call iNetStop() to stop the network system and free resources.
   If called on the server machine, this function will return TRUE if the network
   system was stopped.

float iNetClientSync()
   Return client/server simulation delay, in seconds.
   Client and server simulations are 'perfectly' synchronized when returned value is 0.0f.
   Negative values mean that the client is late on the server.
   Positive values mean that the server is late on the client.
   The network system will automatically adjust client's simulation speed to try to keep the
   delay as close to 0.0f as possible.
   NOTE: calling iNetClientReset() will reset the delay to zero.
   NOTE: even when simulation delay is 0.0f, client and server aren't actually synchronized,
   in the real world. Client and server simulations can never be perfectly simultaneous,
   due to physical network lag. See iNetMinimumLag() for more.

BOOL iNetPlayersChanged()
   Return TRUE if one or more client machines joined or left the session.

int iNetPlayersCount()
   Return the current number of connected machines, including the server.

int iNetPlayerMachine(DWORD)
   Return the sequential number assigned by the network system to the machine associated
   with the specified player.
   DWORD = player's unique identifier.

int iNetLocalPlayerMachine()
   Return the sequential number assigned by the network system to the local machine.

BOOL iNetPlayerId(int,DWORD*)
   Retrieve the player's unique ID assigned by the network system to the specified machine
   and places it to the specified DWORD variable.
   Return FALSE if the information couldn't be retrieved for some reason.
   int = machine to retrieve the player's ID for.
         It must be a value between 0 and iNetPlayersCount()-1. Server's ID is always 0x00000000.
   DWORD* = pointer to a DWORD variable that will be filled with the player's ID. Return data.
            The ID is required to send messages exclusively to specific players,
            or to retrieve statistics data about specific machines.
            For details, see iNetDataSend() and network connection statistics functions
            like iNetLag(), iNetBytesSent() and similar.

BOOL iNetPlayerName(DWORD,char*)
   Retrieve the user-defined name assigned to the specified player and copy it to the
   specified string.
   See player name parameter for iNetServerStart() and iNetClientStart() for details.
   Return FALSE if the information couldn't be retrieved for some reason.
   DWORD = player's unique identifier to retrieve the name for.
           See also iNetPlayerId() and iNetData().
   char* = retrieved player name. Return data.
           To ensure that the name will fit, the destination string should be at least
           256 characters long.

iNetDataSend(char*,int,DWORD,DWORD,BOOL)
   Send the specified character (byte) array to other connected machines.
   char* = pointer to the array of bytes to be sent.
           NOTE: the array is a generic array of bytes, not necessarily a zero terminated
           string. The number of bytes to send must always be specified (see next parameter).
   int = number of bytes to send.
         NOTE: the actual number of bytes that will be sent is the specified value + 4.
   DWORD = message identifier. Must not be either 0x00000000 (zero) or bigger than 0x0fffffff.
           Each message you send by calling this function must be uniquely identified.
           The ID will allow receiving machines to distinguish incoming messages.
           Examples of valid IDs are 0x00000001, 0x083a2703, 0x0abb588d, etc.
   DWORD = destination player's ID.
           Should be a valid player's ID, as returned by iNetPlayerId().
           Only the specified player will receive the message.
           Set this value to 0x00000000 to send the message to all players.
           NOTE: if this function is called on a client machine, this parameter
           is ignored. Client machines can only send messages to the server.
   BOOL = whether to send the data message as guaranteed (TRUE) or not (FALSE).
          Guaranteed messages are ensured to arrive to the destination, even if the connection
          is subject to lags and data loss, but they add overhead to the send process.
   NOTE: data are sent as a single packet, but the system may split it to smaller packets
   in order to optimize performance. If the connection is poor, keep in mind that
   the message could be dropped and never reach the destination.
   However, if the message is guaranteed, the system will keep sending it until it arrives
   to the destination. Unfortunately, it means that the network system may keep trying
   sending the message for a very long time, if the connection is poor and the message is
   long. Actually, a long message is resent entirely, if one single byte is lost. Sending
   long guaranteed messages isn't recommended, especially if the connection is poor.

int iNetData(void*,DWORD*,DWORD*)
   Receive a message from other connected machines. See iNetDataSend().
   Return the number of bytes received (message length), or zero if no messages were
   received (that is, the received message buffer is empty).
   void* = pointer to a char* variable that will be filled with the address of the received
           array of bytes (the message). Return data.
           Set this parameter to NULL if you don't need to retrieve this information.
   DWORD* = pointer to a DWORD variable that will be filled with the received message ID.
            Return data.
            Set this parameter to NULL if you don't need to retrieve this information.
   DWORD* = pointer to a DWORD variable that will be filled with the ID of the machine which
            sent the message (source player's ID). Return data.
            Set this parameter to NULL if you don't need to retrieve this information.
   NOTE: received messages accumulate (queue) into a buffer. This function doesn't remove the
   message from the buffer. In order to read the next received message by calling this function
   again, you must first call iNetDataDiscard() to remove the current one from the buffer.

int iNetDataDiscard()
   Remove the oldest message from the received message queue. See iNetData() for more.

float iNetLag(DWORD)
   Return the specified machine lag (ping), in seconds.
   DWORD = machine ID to retrieve the lag for.
           Should be a valid player's ID, as returned by iNetPlayerId().
           NOTE: if this function is called on a client machine, this parameter
           is ignored, and the local machine lag is returned.

float iNetMinimumLag()
   Return local machine minimum lag, in seconds.
   Unlike the lag returned by iNetLag(), which is the actual lag affecting the physical
   network system, the minimum lag is the shortest delay possible between server's
   simulation and the client's simulation.
   Optimal performance is achieved when minimum delay is identical to iNetLag() delay.
   NOTE: minimum lag is updated when iNetClientReset() is called.

int iNetBPS(DWORD)
   Return the average number of bytes per second exchanged by the specified machine
   with the network of connected machines.
   DWORD = machine ID to retrieve the information for.
           Should be a valid player's ID, as returned by iNetPlayerId().
           NOTE: if this function is called on a client machine, this parameter
           is ignored, and the information is retrieved for the local machine.

int iNetBytesSent(DWORD)
   Return the total number of bytes sent by the specified machine.
   DWORD = see iNetBPS() for details on this parameter.

int iNetBytesReceived(DWORD)
   Return the total number of bytes received by the specified machine.
   DWORD = see iNetBPS() for details on this parameter.

iNetIgnoreContacts(BOOL)
   By default, upon sending and receiving bodysync data, the network system forces the
   physics engine to remove all collisions, in order to improve client/server synchronization.
   However, doing so, may cause resting objects not to be perfectly still.
   You can disable this mechanism by setting this function parameter to FALSE.
   BOOL = whether to ignore contacts (TRUE, default) or process them normally (FALSE).


MATH


iVectorBodyToWorldTransform(D3DXVECTOR3*,D3DXVECTOR3*,BODY*,int)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to transform
   BODY* = body object
   int = mode: 0 = use current body orientation/location
               1 = use previous-frame body orientation/location
   NOTE: this function transforms a vector from local coordinates, source-model-center
   relative, to absolute coordinates.

iVectorBodyToWorldRotate(D3DXVECTOR3*,D3DXVECTOR3*,BODY*,int)
   Same as iVectorBodyToWorldTransform() but only transform vector orientation.

iVectorMeshToWorldTransform(D3DXVECTOR3*,D3DXVECTOR3*,MESH*)
   Same as iVectorBodyToWorldTransform() but uses a mesh as a reference instead of a body

iVectorMeshToWorldRotate(D3DXVECTOR3*,D3DXVECTOR3*,MESH*)
   Same as iVectorBodyToWorldRotate() but uses a mesh as a reference instead of a body

iVectorSkinMeshToWorldTransform(D3DXVECTOR3*,D3DXVECTOR3*,SKINMESH*)
   Same as iVectorBodyToWorldTransform() but uses a skinmesh as a reference instead of a body

iVectorSkinMeshToWorldRotate(D3DXVECTOR3*,D3DXVECTOR3*,SKINMESH*)
   Same as iVectorBodyToWorldRotate() but uses a skinmesh as a reference instead of a body

iVectorWorldToBodyTransform(D3DXVECTOR3*,D3DXVECTOR3*,BODY*)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to transform
   BODY* = body object
   NOTE: this function transforms a vector from absolute coordinates to local coordinates,
   source-model-center relative.

iVectorWorldToBodyRotate(D3DXVECTOR3*,D3DXVECTOR3*,BODY*)
   Same as iVectorWorldToBodyTransform() but only transform vector orientation.

iVectorWorldToMeshTransform(D3DXVECTOR3*,D3DXVECTOR3*,MESH*)
   Same as iVectorWorldToBodyTransform() but uses a mesh as a reference instead of a body

iVectorWorldToMeshRotate(D3DXVECTOR3*,D3DXVECTOR3*,MESH*)
   Same as iVectorWorldToBodyRotate() but uses a mesh as a reference instead of a body

iVectorWorldToSkinMeshTransform(D3DXVECTOR3*,D3DXVECTOR3*,SKINMESH*)
   Same as iVectorWorldToBodyTransform() but uses a skinmesh as a reference instead of a body

iVectorWorldToSkinMeshRotate(D3DXVECTOR3*,D3DXVECTOR3*,SKINMESH*)
   Same as iVectorWorldToBodyRotate() but uses a skinmesh as a reference instead of a body

iVectorModelToBodyTransform(D3DXVECTOR3*,D3DXVECTOR3*,BODY*)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to transform
   BODY* = body object
   Convert source-model-center relative coordinates to body-center-of-mass relative
   coordinates.

iVectorBodyToModelTransform(D3DXVECTOR3*,D3DXVECTOR3*,BODY*)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to transform
   BODY* = body object
   Convert body-center-of-mass relative coordinates to source-model-center
   relative coordinates.

iVectorRotate(D3DXVECTOR3*,D3DXVECTOR3*,D3DXQUATERNION*)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to rotate
   D3DXQUATERNION* = quaternion representing the rotation to apply

iVectorEulerRotate(D3DXVECTOR3*,D3DXVECTOR3*,float,float,float,char*)
   D3DXVECTOR3* = transformed coordinates (vector). Return data.
   D3DXVECTOR3* = coordinates (vector) to rotate
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.

iVectorsAngleToQuaternion(D3DXQUATERNION*,D3DXVECTOR3*,D3DXVECTOR3*,float)
   D3DXQUATERNION* = quaternion representing the rotation required to re-orientate v2
                     and make it parallel to v1. Return data.
   D3DXVECTOR3* = vector 1 (v1)
   D3DXVECTOR3* = vector 2 (v2)
   float = transformation factor. 0.0f is no transformation, 1.0f is complete transformation.
           intermediate values give intermediate transformations.

float iVectorsAngle(D3DXVECTOR3*,D3DXVECTOR3*)
   Return the angle formed by the two given vectors.
   Returned value is always between 0.0f and 180.0f.

float iVectorLength(D3DXVECTOR3*)
   Return the length of the specified vector.
   D3DXVECTOR3* = source vector

float iVectorLengthSq(D3DXVECTOR3*)
   Return the squared length of the specified vector.
   D3DXVECTOR3* = source vector

iVectorLengthSet(D3DXVECTOR3*,D3DXVECTOR3*,float)
   Force the length of a vector to the specified value, without changing its direction
   D3DXVECTOR3* = transformed vector. Return data.
   D3DXVECTOR3* = source vector
   float = desired length. Set this value to 1.0f to 'normalize' a vector.

float iVectorDot(D3DXVECTOR3*,D3DXVECTOR3*)
   Return the dot product of the specified 3d vectors.
   D3DXVECTOR3* = first source vector
   D3DXVECTOR3* = second source vector

iVectorCross(D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return the cross product of the specified 3d vectors.
   D3DXVECTOR3* = resulting vector. Return data.
   D3DXVECTOR3* = first source vector
   D3DXVECTOR3* = second source vector

iQuaternionFromAxisAngle(D3DXQUATERNION*,D3DXVECTOR3*,float)
   D3DXQUATERNION* = resulting quaternion. Return data.
   D3DXVECTOR3* = orientation axis.
   float = orientation angle.
   NOTE: input orientation is expressed by an axis (the vector) and an angle of
   rotation about that axis (float).

iQuaternionToAxisAngle(D3DXQUATERNION*,D3DXVECTOR3*,float*)
   D3DXQUATERNION* = source quaternion.
   D3DXVECTOR3* = orientation axis. Return data.
   float* = orientation angle, between 0.0f and 360.0f. Return data.
   NOTE: output orientation is expressed by an axis (the vector) and an angle of
   rotation about that axis (float*).

iQuaternionFromEulerAngles(D3DXQUATERNION*,float,float,float,char*)
   D3DXQUATERNION* = resulting quaternion. Return data.
   float = first rotation. See character string below.
   float = second rotation.
   float = third rotation.
   char* = 3-character string specifying the axes and the order in which to apply
           the rotations.
           For example, "xyz" (apply first rotation about X axis, then second rotation about
           Y axis and then third rotation about Z axis), "xzx" and "xzy" are valid strings.

iQuaternionToEulerAngles(D3DXQUATERNION*,float*,float*,float*)
   D3DXQUATERNION* = source quaternion.
   float* = orientation angle about world X axis. Return data.
   float* = orientation angle about world Y axis. Return data.
   float* = orientation angle about world Z axis. Return data.
   NOTE: the three angles are computed so that they will define the original
   orientation only if applied in the "xyz" order.

iQuaternionInterpolate(D3DXQUATERNION*,D3DXQUATERNION*,D3DXQUATERNION*,float)
   Compute an intermediate orientation from two given orientations, by a given factor.
   D3DXQUATERNION* = resulting orientation. Return data.
   D3DXQUATERNION* = source orientation q1
   D3DXQUATERNION* = source orientation q2
   float = if it is 0.0f, q1 is returned. If it is 1.0f, q2 is returned. Intermediate
           values return intermediate orientations.

iQuaternionSpline(D3DXQUATERNION*,D3DXQUATERNION*,D3DXQUATERNION*,D3DXQUATERNION*,D3DXQUATERNION*,float)
   Compute an intermediate orientation from two given orientations, by a given factor.
   Unlike iQuaternionInterpolate(), a 'preceeding' and a 'following' quaternions are also used
   as a reference to find the interpolated orientation so that it is guaranteed to be a smooth
   transition on the 'path' defined by the four reference orientations.
   D3DXQUATERNION* = resulting orientation. Return data.
   D3DXQUATERNION* = source preceeding
   D3DXQUATERNION* = source orientation q1
   D3DXQUATERNION* = source orientation q2
   D3DXQUATERNION* = source following orientation
   float = if it is 0.0f, q1 is returned. If it is 1.0f, q2 is returned. Intermediate
           values return intermediate orientations.
   NOTE: unpredictible results are given when q1 and q2 form an angles bigger than 90 degrees.

iQuaternionLookAt(D3DXQUATERNION*,D3DXVECTOR3*,D3DXVECTOR3*)
   D3DXQUATERNION* = resulting quaternion. Return data.
                     It is the rotation required to orientate the Z+ vector
                     D3DXVECTOR3(0.0f,0.0f,1.0f) to the specified direction.
   D3DXVECTOR3* = direction
   D3DXVECTOR3* = up direction. If NULL, (0.0f,1.0f,0.0f) is assumed.
   NOTE: this function will not work properly if 'direction' and 'up'
   vectors are parallel.

iQuaternionMultiply(D3DXQUATERNION*,D3DXQUATERNION*,D3DXQUATERNION*)
   Return the orientation resulting from concatenating two given quaternion
   orientations (rotations).
   D3DXQUATERNION* = resulting orientation. Return data.
   D3DXQUATERNION* = source orientation q2
   D3DXQUATERNION* = source orientation q1
   Imagine an unoriented object. That is, an object with its local Z+ axis parallel to
   world's Z+ axis. Imagine applying to it the q2 orientation (rotating it by q2) and
   then applying to it the q1 orientation. The resulting orientation is
   returned in the quaternion specified as first parameter.

iPlaneFromPointNormal(D3DXPLANE*,D3DXVECTOR3*,D3DXVECTOR3*);
   Compute a plane from a 3d point and a direction vector (normal).
   D3DXPLANE* = resulting plane. Return data.
   D3DXVECTOR3* = reference 3d point
   D3DXVECTOR3* = reference direction (plane normal).

iPlaneFromPoints(D3DXPLANE*,D3DXVECTOR3*,D3DXVECTOR3*,D3DXVECTOR3*);
   Compute a plane from 3 given 3d points.
   D3DXPLANE* = resulting plane. Return data.
   D3DXVECTOR3* = first 3d point
   D3DXVECTOR3* = second 3d point
   D3DXVECTOR3* = third 3d point

BOOL iPlaneLineIntersection(D3DXVECTOR3*,D3DXPLANE*,D3DXVECTOR3*,D3DXVECTOR3*);
   Compute the intersection point between the specified plane and
   the specified line segment. Return FALSE if the plane and the segment
   do not intersect.
   D3DXVECTOR3* = resulting point. Return data.
   D3DXPLANE* = plane
   D3DXVECTOR3* = first segment point
   D3DXVECTOR3* = second segment point

iFloatTendTo(float*,float,float)
   float* = pointer to a float variable to adjust, so that it tends to a certain value
   float = target value (value to tend to). Note, the value is never reached actually.
   float = approximate time taken to reach the specified destination number
   NOTE: this function should be executed at every Run() loop in order to work properly

iFloatClamp(float*,float,float)
   float* = pointer to a float variable to clamp within specified min/max range
   float = minimum inclusive
   float = maximum inclusive

iIntClamp(int*,int,int)
   Same as iFloatClamp() but uses integers.

iFloatAdd(float*,float)
   float* = pointer to a float variable to increase by the specified amount, per second.
   float = increment.
   NOTE: for example, if increment is 10.0f, the float variable is increased by 10.0f
   per every second. So, after 5 seconds it is increased by 50.0f.

float iFloatAbs(float)
   Return absolute value of specified float.

float iFloatRand(float,float)
   Return a random float between the two specified values.

int iIntRand(int,int)
   Same as iFloatRand() but uses integers.

float iSignRand()
   Return -1.0f or 1.0f (random)

float iFloatInterpolate(float,float,float,float,float,BOOL)
   Given an input value (interpolation factor), return its interpolated version between
   dstmin and dstmax, after comparing it against srcmin and srcmax.
   Basically: result = dstmin + (dstmax-dstmin)*((input-srcmin)/(srcmax-srcmin))
   float = input
   float = source minimum (srcmin)
   float = source maximum (srcmax)
   float = destination minimum (dstmin)
   float = destination maximum (dstmax)
   BOOL  = TRUE to clamp the returned value within destination min. and destination max.


DIALOG-BOXES


iGDISurfaceShow()
   Show GDI screen surface. This is necessary before opening any Windows-based
   dialog box (MessageBox() etc.).
   IMPORTANT: after the dialog is processed, you must call iGDISurfaceHide() to hide back
   the surface.
   NOTE: calling this function before calling the iFileOpenDialog(), iFileSaveDialog(),
   iMessageBox() and iMessageBoxYesNo() functions is not necessary.

iGDISurfaceHide()
   Hide GDI screen surface. See iGDISurfaceShow().

BOOL iFileOpenDialog(char*,char*,char*,BOOL)
   Open the Windows file open dialog box allowing the user to browse the file system and
   select a file. Returns TRUE if a file was selected, FALSE if the dialog was canceled.
   char* = dialog box title.
   char* = string defining all file types that can be browsed.
           For example "Text files (*.txt)\0*.txt\0Exe files (*.exe)\0*.exe\0\0"
           will allow two file types to be browsed (.txt and .exe).
           For each extension, you must specify a description (for example
           "Text files (*.txt)") and a filter (for example "*.txt"). They must be
           separated by the \0 character (null).
           The string must end with \0\0
           NOTE: you can allow all file type browsing by setting the following
           string: "All files (*.*)\0*.*\0\0"
   char* = initial file path. When the function returns, it will be filled with the file
           path chosen by the user. Warning, the string must be big enough!
           NOTE: the string must include the file name, with extension, or a generic
           file name like "c:\\foobar\\*.txt". The extension must be the same as
           the first filter specified in the first string passed to this function (see above).
   BOOL = whether to enable (TRUE) or disable (FALSE) multiple file selection mode.
          If this option is enabled, the file-path string (see previous parameter)
          lists all chosen file names. You can extract each of them
          with iFileOpenDialogNameExtract() function.

BOOL iFileOpenDialogNameExtract(char*,char*,int)
   Return TRUE if a file name was successfully extracted, FALSE if the index is bigger
   or equal to the total number of listed file names.
   char* = extracted file name. Return data.
   char* = file path string returned by iFileOpenDialog().
   int = index of file name to extract, where 0 is the first file chosen, 1 the second, etc.
   NOTE: extracts the specified file name from the file path string returned by
   iFileOpenDialog() when multiple file selection is enabled. See iFileOpenDialog().

BOOL iFileSaveDialog(char*,char*,char*,BOOL)
   Open the Windows file save-as dialog box allowing the user to browse the file system
   and type a filename to save. Returns TRUE if a file was selected, FALSE if the
   dialog was canceled or an error occurred.
   If the last BOOL parameter is TRUE the user is warned if he/she types a file name that
   already exists.
   See iFileOpenDialog() for other parameters meaning.

BOOL iFolderSelectDialog(char*,char*)
   char* = dialog box title.
   char* = initial folder path. When the function returns, it will be filled with the folder
           path chosen by the user. Warning, the string must be big enough!

iFileDialogSizeSet(int,int)
   Set file dialog size, in pixel
   int = width
   int = height
   NOTE: the setting affects all file dialogs opened by calls to iFileOpenDialog() or
   iFileSaveDialog() that follow the execution of this function.

iFileDialogPositionSet(int,int)
   Set file dialog position, in pixel, from top/left corner of the screen.
   int = left
   int = top
   NOTE: the setting affects all file dialogs opened by calls to iFileOpenDialog() or
   iFileSaveDialog() that follow the execution of this function.

iFileDialogViewModeSet(int)
   Set file dialog view mode
   int = view mode, where
   0 = Icon, 1 = List, 2 = Details (default), 3 = Thumbnails, 4 = Tiles
   NOTE: the setting affects all file dialogs opened by calls to iFileOpenDialog() or
   iFileSaveDialog() that follow the execution of this function.

iMessageBox(char*)
   Open a Windows standard message box.
   char* = message

BOOL iMessageBoxYesNo(char*,int)
   Open a Windows standard Yes/No message box. Return TRUE if user clicks Yes button.
   char* = message
   int = mode. Mode=0 sets the Yes button as default. Mode=1 sets the No button as default.


RENDERING-ENGINE


DWORD iRenderingDevice()
   Return a pointer to the DirectX rendering device (LPDIRECT3DDEVICE9).

HWND iWindow()
   Return current rendering window handle.

iWindowTitleSet(char*)
   Set the title for the program window, displayed when running in windowed mode.

iWindowCenter(HWND,HWND)
   HWND = window to center
   HWND = reference window

int iDisplayMode()
   Return 0 if the engine is running in a window. If the engine is running fullscreen,
   the product of screen width, height and bit depth is returned instead. For example,
   if the engine is running in 640x480x16 mode, the value returned will be 4915200.

int iDisplayWidth()
   Return screen width, in pixels.

int iDisplayHeight()
   Return screen height, in pixels.

iDisplayData(char*,RECT*)
   Return the specified part of the display as a sequence of bytes.
   Each pixel is defined by 3 bytes (Blue,Green,Red).
   char* = data buffer. When the function returns, it will be filled with the
           image data. Warning, the buffer must be at least (width*height*3) bytes long.
   RECT* = pointer to a RECT structure specifying the portion of screen to return.
           NOTE: the rectangle must be entirely within the screen and its width and
           height must be multiples of 8.

iRender()
   Render the scene immediately. This function is typically used to render
   sprites between calls to object creation functions (e.g. iMeshCreate())
   to implement loading-in-progress bars.
   It is only guaranteed to properly render sprites and texts. Enabling non-sprite
   renderable objects (meshes, particles, etc) before calling this function
   is not recommended.
   NOTE: the iPrintsHide() function can be used to reset the print buffer
   which is built by calls to iPrint() and iPrintCentered() functions.

iScreenWipe(int,int,int)
   int,int,int = r,g,b color to wipe the screen to

float iFrameRate(BOOL)
   Return current frame-rate (frames rendered per second).
   BOOL = whether to return average frame-rate (TRUE) or instant frame-rate (FALSE).
   NOTE: instant frame-rate is actually the time needed to process the last
   rendered frame, typically used for debug purposes. To obtain the real instant
   frame-rate, clamp the returned value within 0 and 75.

iBackgroundColorSet(int,int,int)
   int, int, int = r,g,b color components (0-255)
   NOTE: sets the background color to use when no sky boxes are defined

iFogColorSet(int,int,int)
   int, int, int = r,g,b color components (0-255). See also iMeshFogSet()

iShadowCasterCreateMode(BOOL)
   Set the creation mode for shadow casters.
   BOOL = if TRUE (default) the engine assumes that the source model is a perfect closed-hull.
          If FALSE, the engine assumes that all faces in the source model have a back-face,
          an additional triangle, sharing the same vertices, but with a reversed surface normal.

iShadowColorSet(D3DXVECTOR3*)
   D3DXVECTOR3* = shadow color. R,g,b values range from 0.0f to 1.0f
                  Default is &D3DXVECTOR3(0.75f,0.75f,0.75f)

iShadowDisplacementSet(float)
   Volumetric shadows are rendered slightly displaced respect to normal meshes.
   This is needed to prevent rendering artifacts caused by finite z-buffering math.
   When camera's FOV is small or negative (orthographic view) shadow displacement
   bias can be visible. This function allows you to tweak the displacement to minimize
   the problem.
   float = displacement, in meters. Default is 0.001f.

iGammaSet(float,float,float,float,float,float)
   float,float,float = Red, Green, Blue bias factor (> 0.0f). Default brightness for each
                       rgb component is multiplied by the specified value. So, for example,
                       specifying 2.0f for all the three components will double the display
                       brightness. Default value is 1.0f (no bias).
   float,float,float = Red, Green, Blue offset factor (between -1.0f and 1.0f). The specified
                       value is added to the default brightness for each rgb component.
                       Default value is 0.0f (no offset).
   NOTE: this function has no effect when called in windowed mode.
   NOTE: this function is computationally expensive and should not be called at every Run() loop.

iBoundingSphereFrustumCheckSet(BOOL)
   BOOL = FALSE to disable, TRUE to enable. Default is FALSE.
   NOTE: enables/disables quick exclusion of meshes and skinmeshes rendering if
   their bounding spheres aren't visible (inside viewing frustum).
   This feature can dramatically improve frame-rate, or it can worsen it a little.
   In general, if there are many meshes/skinmeshes in the scene, but only few of
   them are visible simultaneously, it will improve it.

int iVertexShaderVersion(BOOL)
   Return the vertex shader version supported by the hardware.
   BOOL = FALSE to return the major version (e.g., return 2 if vs version is 2.0),
          TRUE to return the minor version (e.g., return 0 if vs version is 2.0)

int iPixelShaderVersion(BOOL)
   Return the pixel shader version supported by the hardware.
   BOOL = FALSE to return the major version (e.g., return 2 if ps version is 2.0),
          TRUE to return the minor version (e.g., return 0 if ps version is 2.0)

BOOL iPixelShadersSupported()
   Return TRUE if the rendering device supports hardware processed pixel shaders.
   Pixel shaders allow for advanced rendering effects like per-pixel lighting,
   bump mapping and bumped environment mapping.

BOOL iEnvMapsSupported()
   Return TRUE if the rendering device supports cubic environment mapping.

BOOL iDynamicEnvMapsSupported()
   Return TRUE if the rendering device provides render to texture functionality,
   which allows for updating of the reflected/refracted environment, when dynamic
   environment mapping is enabled for a mesh.

iMirrorPlaneSet(D3DXVECTOR3*,D3DXVECTOR3*)
   D3DXVECTOR3* = plane location.
   D3DXVECTOR3* = plane normal (plane orientation).
   NOTE: set the plane to be used as a reference for mirror rendering. See iMeshMirrorMake().

iMirrorShadowsSet(BOOL)
   BOOL = FALSE to disable, TRUE to enable. Default is FALSE.
   NOTE: enables/disables shadow casting for objects reflected in the mirror.

iRenderingEnable()
   Re-enable rendering (see iRenderingDisable()).

iRenderingDisable()
   Disable rendering. Basically, the simulation is performed at the maximum
   speed possible because the engine doesn't have to display the scene.

BOOL i3DPointVisible(CAMERA*,D3DXVECTOR3*)
   Return TRUE if the specified 3d point is within the specified camera window.
   CAMERA* = camera object
   D3DXVECTOR3* = 3d point location

i3DLocationToScreen(D3DXVECTOR2*,D3DXVECTOR3*,CAMERA*)
   D3DXVECTOR2* = screen location. Return data.
                  Resulting coordinates specify a screen location using
                  the same convention used for iSpriteLocationSet().
                  NOTE: if the source 3d location is outside the viewing
                  frustum returned 2d coordinates will be outside the screen.
                  NOTE: if the source 3d location behind the camera,
                  returned 2d coordinates will be both 1000000000.0f.
   D3DXVECTOR3* = source 3d location to convert to screen coordinates.
   CAMERA* = camera object to be used as a reference.

iScreenRay(CAMERA*,D3DXVECTOR2*,D3DXVECTOR3*,D3DXVECTOR3*)
   Return a 3d vector with origin at the specified camera location and pointing toward
   the 3d location indicated by the specified screen coordinates.
   CAMERA* = camera object to be used as a reference.
   D3DXVECTOR2* = screen coordinates defining a 3d point at infinite distance
                  from the camera, in the virtual space.
                  Coordinates specify a screen location using
                  the same convention used for iSpriteLocationSet().
   D3DXVECTOR3* = 3d ray origin, absolute coordinates. Return data.
   D3DXVECTOR3* = 3d ray direction. Return data.
                  Note that the length of this vector is random. You will typically
                  need a defined length for your computation. You can set the length
                  of a vector with iVectorLengthSet()

iPickPoint(D3DXVECTOR3*)
   Return the last intersection point computed by iMeshPicked(), iMeshRayCheck()
   iMeshBoundingSphereRayCheck(), iSkinMeshBoundingSphereRayCheck() functions.
   D3DXVECTOR3* = intersection point. Return data.
                  Coordinates are source-model-center relative.

iScreenShot(char*)
   Save a screenshot of the current rendering window to a .bmp image
   NOTE: if the engine is in windowed mode, the whole Windows desktop is captured.
   char* = file path of .bmp file to save

iMovieSaveStart(char*,int)
   Start a system which automatically saves rendered frames to disk as .bmp image files.
   char* = render path to which a list of screenshots is saved. Destination folder must exist.
           Must be a full path, including part of the base file name. For example,
           to generate a list of files named frame0000.bmp, frame0001.bmp, etc, in
           the c:\tempmovie folder, use 'c:\\tempmovie\\frame'
   int = saving rate. For example, if it is 4 one frame will be saved every four rendered.
         That is, as frame-rate is 75fps, 18.75 frames per second will be saved,
         Note that the simulation will be rendered slower on your screen, but, for the engine,
         the time will flow normally.
   NOTE: this is an initialization function. You don't have to call it every game loop.
   See also iMovieSaveStop().

iMovieSaveStop()
   Stop saving rendered frames. See iMovieSaveStart().


PROCESSING


iExit()
   Terminate engine execution and exit to Windows.
   The effect is identical to pressing Alt+F4 or closing the window, when running
   in windowed mode.
   Note that the execution is not stopped when iExit() is called. Instead, the
   current Run() loop is completed, the screen can be refreshed, the Exit() callback
   is called and finally the engine is stopped.
   NOTE: if this function is called in the Init() callback, the Run() callback is
   not executed.

iEscEnable(BOOL)
   BOOL = whether to enable (TRUE) or disable (FALSE) the [Esc] key, which allows to
          stop the engine processing at any time and exit back to Windows.
          By default the [Esc] key is enabled.
          Warning, if the [Esc] key is disabled, the only way to terminate a program
          is to call the iExit() function.

iSettingsPanelSkip(BOOL)
   BOOL = whether to show (FALSE) or skip (TRUE) the display settings panel at
          startup.
   By default the settings panel is shown. The user can choose not to show it again,
   but then the only way to show it back is by deleting the 'settings.bin' file.
   However, with this function, you can force the panel to be shown again at the next run.
   You will typically use it to implement an user option and provide an user-friendly
   way to restore the settings panel.

float iFrq()
   Return current Run() loop frequency, in seconds

float iFrqSet(float)
   Set Run() loop frequency, in seconds.
   float = loop frequency. Default frequency is 0.013333333f (1.0f/75.0f, 75 times per econd).
           Decrease the value to increase the times the Run() loop is executed per second.
   NOTE: simulation speed increases when this factor increases and vice-versa, unless the same
         frequency is set for the simulation by calling iSimulationFrqSet().
   NOTE: loop frequency also sets the maximum framerate. The engine will never refresh the
         rendering window faster than the specified frequency. Framerate can never be faster
         than Run() loop frequency.

iSimulationFrqSet(float)
   Set simulation frequency, thus affecting simulation speed.
   float = simulation frequency. Normal speed is 0.013333333f (1.0f/75.0f).
           Decrease the value to slow down the simulation. Increase it to
           speed it up.
   Note: Run() loop frequency is not affected by simulation speed changes.

iPhysicsAccuracySet(float)
   Set simulation accuracy.
   float = simulation accuracy.
           Set this value to non-zero to enable reduced accuracy (typical value 20.0f).
           The lower the value, the lower the accuracy and the faster the
           processing. Reduced accuracy will dramatically improve processing
           speed where many joints are defined and many collisions are performed.
           Set this to zero to set maximum supported accuracy (default).

float iSystemTimer()
   Return total seconds elapsed since the engine start

int iTic()
   Return total number of Run() loops processed

iEdgeCollisionCheckSet(BOOL)
   Enable/disable accurate collision checking between sphere-group bodies with edges
   and vertices of polyhedron-based bodies.
   BOOL = TRUE to enable, FALSE to disable (default).
   NOTE: edge collisions help improve realism for 'extreme' collisions, like for example
   high-speed bounces against sharp edges, but they tend to worsen the frame-rate under
   normal conditions and may affect the behavior for sliding bodies.

iBoundingSphereCollisionCheckSet(BOOL)
   BOOL = FALSE to disable, TRUE to enable. Default is FALSE.
   NOTE: enables/disables quick exclusion of colliding couples if their bounding spheres
   aren't colliding. It is applied for sphere-group <=> sphere-group collisions only.
   This feature can dramatically improve frame-rate, or it can dramatically
   worsen it. In general, if involved sphere groups are made of many spheres each, it will
   improve it.

iReset(BOOL,BOOL)
   Destroy all created objects (meshes, bodies, sprites, etc).
   BOOL = whether to run the Exit() callback before resetting (TRUE) or not (FALSE).
   BOOL = whether to run the Init() callback after resetting (TRUE) or not (FALSE).
   NOTE: resetting will not restore any engine settings to its default.
   It will just destroy all created objects.

iCleanResetEnable(BOOL)
   Enable/disable automatic reset for bodies that are set by using initialization
   functions like iBodyLocationSet(), iBodyOrientationSet() and similar.
   Clean reset minimizes the risk of collision detection errors and potential crashes
   when a body is placed 'inside' another body or moved away while colliding with
   other bodies.
   BOOL = TRUE to enable, FALSE to disable (default).
   NOTE: see also iBodyLocationSet() ands similar functions for notes.

iProcessMessages()
   Process Windows system messages.
   During long operations, like long for() loops or a long sequence of i...Create() functions,
   calling this function will unlock the system (the main program window can be moved, etc)


FILES


iDLLFile(char*)
   Return the full path to the current user-created .dll file
   char* = string to receive the path. Return data.
   NOTE: this function is not available in the DLL version of the engine.

iCommandLineFile(char*)
   Return the file path provided to the engine executable as a command line parameter.
   char* = string to receive the path. Return data.

iGlobalPathMake(char*,char*)
   Transform a local file path to a global file path
   char* = destination string
   char* = source file path

iChangeExtension(char*,char*,char*)
   Change the extension of the given filename
   char* = destination string
   char* = source filename
   char* = extension to change to, for example ".bin"

BOOL iFileExists(char*)
   Return TRUE if the specified file exists
   char* = filename

BOOL iFileImageSize(char*,int*,int*)
   Retrieve width and height of the specified inage file, in pixels.
   Return TRUE if the call is successful.
   char* = filename
   int* = image with. Return data.
   int* = image height. Return data.

iFilePathOnly(char*,char*)
   char* = destination string, will be source filename without name of file. For
           example, if source filename is 'c:\foobar\myfile.doc', destination string
           will be 'c:\foobar\'.
   char* = source filename

iFileNameOnly(char*,char*)
   char* = destination string, will be source filename without neither path nor
           extension. For example, if source filename is 'c:\foobar\myfile.doc',
           destination string will be 'myfile'.
   char* = source filename

iFileExtOnly(char*,char*)
   char* = destination string, will be source filename extension only. For example,
           if source filename is 'c:\foobar\myfile.doc', destination string
           will be '.doc'.
   char* = source filename


CONVERSION FUNCTIONS


iXToPlyPolConvert(char*,char*,float)
   Generate .ply and .pol files from an .x file. See iBodyCreate() for more.
   char* = path to the source .x file.
   char* = path to the destination .ply file to create. Note that a companion .pol
           file will be also created in the same folder, with the same base-name.
           NOTE: any existing .ply and .pol files with the same name are deleted
           before the conversion begins, so you can determine if the conversion was
           successful by checking if the .ply file exists (see iFileExists() function).
   float = grid resolution.
   NOTE: see the sample code named 3ImpactConverter for an example of usage.

iXToSpgConvert(char*,char*)
   Generate a .spg file from an .x file. See iBodySGCreate() for more.
   char* = path to the source .x file.
   char* = path to the destination .spg file to create.
   NOTE: see the sample code named 3ImpactConverter for an example of usage.

iXToSkyConvert(char*,char*)
   Generate a .sky file from a set of .x files. See iSkyBoxCreate() for more.
   char* = path to the source .x file. The file name must end with one of the
           following: _px.x, _nx.x, _py.x, _ny.x, _pz.x, _nz.x.
           For example: skybox_py.x
   char* = path to the destination .sky file to create.
   NOTE: see the sample code named 3ImpactConverter for an example of usage.


MAXIMUM-NUMBER-OF-ALLOWED-OBJECTS


By default, the engine limits the number of objects you can create. However, if a file
named 'arrays.ini' is found in the same folder as the engine's .exe file (e.g. 3impact.exe),
the limits are overridden as specified in the file. When writing your own array file,
copy and paste the following default file and use it as basis:

16      //max allowed cameras
500     //max allowed skyboxes
1000    //max allowed bodies
1000    //max allowed meshes
500     //max allowed skinmeshes
1000    //max allowed skinmeshbones
1000    //max allowed bodiesbodies
1000    //max allowed sprites
500     //max allowed particles
500     //max allowed trails
100     //max allowed fonts
50      //max allowed envmaps
100     //max allowed wheels
500     //max allowed springs
100     //max allowed replaydata
128     //max allowed bodysyncs
100     //max allowed bodysyncdata
32768   //max allowed floatsyncs
2000    //max allowed floatsyncdata
1000    //max allowed free textures