INSTANCE INTERFACE
VOID Destroy ()
Destroy the instance
no return value
VOID BuildStatic (XLONG frame)
Build a static frame of the instance.
frame : frame to build
no return value
VOID BuildAnim (XLONG frame1,XLONG
frame2,SINGLE interpolation,XLONG flags)
Build an interpolated frame of the instance.
frame1 : origin frame
frame2 : destination frame
interpolation : interpolation between frame1 and
frame2
flags : custom flags
- $$MD3_DONOTUPDATE : the
vertices will not be updated, only collision boxes.Usefull when
instance is no more visible but collisions
need to be tested.
no return value
VOID SetIdentity (SINGLE x,SINGLE
y,SINGLE z,CVector3 angles)
Set the absolute position of an instance.Usefull when it is a single
model objet or the base of a more
complex model.
x,y,z : position of the instance
angles : orientation of the
instance
no return value
VOID Link (tMD3instance instance,XLONG
tag,CVector3 angles)
Link an instance to the current instance.Usefull when building a
multipart object.
Example :
lower ==> identity
lower ==> link(upper) with tag_torso
upper ==> link(head) with tag_head
upper ==> link(weapon) with tag_weapon
instance : instance to be linked
tag : tag used to build link
angles : orientation of the linked instance
no return value
XLONG GetTagID (STRING tagname)
Get the tagID, needed to use Link function.
tagname : name of the tag ("tag_torso", "tag_weapon"
ect...)
return tagID if success, -1 if it fails
VOID SetViewVector (CVector3 origin ,CVector3 destination)
Set the additional vector of the instance, usefull to determine where
a weapon aims or where a character looks at.
origin : where the vector starts
destination : where the vector goes
no return value.
VOID BuildBox ()
Update collision box and additional vector of the instance.They will be
calculated in global space
using the model matrix.
no parameters
no return value
VOID ShowBox ()
Show collision box and additional vector of the instance using
OPENGL.It is recommanded to turn off
texturing and lightning to have a correct result.
XLONG GetSurfaceID (STRING surfacename)
Get surfaceID for the instance.
surfacename : name of the surface targeted
no return value
VOID SetSurfaceShader (XLONG
surfaceID,XLONG Shader)
Set the handle of the surface shader.
surfaceID : ID of the surface , given by GetSurfaceID
Shader : an XLONG identifing the texture used.The
library doesn't care about this handle.
You can use the method you want to identify texture
used.
no return value.
VOID SetSurfaceFlags (XLONG
surface,XLONG flags)
Set the rendering flags of the surface.
surface : targeted surface
flags : rendering flags (cumulative):
- $$MD3_SURFACE_FLAG_IGNORE
: the surface will be ignored by BuildRender() function
You can use custom flags to inform you
rendering function but bits from 0 to 7 are reserved.
no return value
VOID BuildRender ()
Push the instance to render.The BuildRender() function will send every
surface of the instance to the
callback defined with $$MD3_OPTION_PUSH_SURFACE.
no return value