Class allows the loading of actors (eg an animated monster) with many different file formats such as Quake II, Quake III, Halflife and Milkshape. Refer to the
file formats article for a complete list.
Animation files associated with actors can also be loaded (eg .aaf files for Quake and other .smd files for Half-Life). A simple method (TGLActor.switchtoanimation) allows switching of different animations (eg from walking to running).
A more formal explanation is that it provides a quick interface to animated meshes based on morphor skeleton frames. It is capable of performing frame interpolation and animation blending (via
TGLAnimationController components).
Important TGLActor properties and methods include:
procedure
switchtoanimation (animationName:String)
Change the animation of the actor to the animation in its animation list
currentframe integer
The current frame of the animation being displayed
nextframeindex integer
The frame after the current frame. If the current frame is the last frame then the next frame will be the first frame
animationmode TActorAnimationMode
Whether the animation is played once, looped or loops from backwards to forwards.
meshobjects TMeshObjectList
The list of vertices, normals and texcoords of the actor
procedure
structurechanged
Call this procedure if the texture or mesh has been changed otherwise any change wont appear
animations TActorAnimations
Provides a list of available actor animations such as running, jumping and standing idle.
interval integer
Number of milliseconds between frames. By default it is 100.
Demo:
CVS/Demos/meshes/actor∞
Unit:
GLVectorFileObjects∞
Descends from
TGLBaseMesh.