Commit d41aeab7 authored by bitplane's avatar bitplane

Moved some stuff out of IAnimatedMesh and back into CAnimatedMeshHalfLife where it should live



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3574 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9024527e
...@@ -54,97 +54,6 @@ namespace scene ...@@ -54,97 +54,6 @@ namespace scene
EAMT_SKINNED EAMT_SKINNED
}; };
//! Possible types of Animation Type
enum E_ANIMATION_TYPE
{
//! No Animation
EAMT_STILL,
//! From Start to End, then Stop ( Limited Line )
EAMT_WAYPOINT,
//! Linear Cycling Animation ( Sawtooth )
EAMT_LOOPING,
//! Linear bobbing ( Triangle )
EAMT_PINGPONG
};
//! Names for Animation Type
const c8* const MeshAnimationTypeNames[] =
{
"still",
"waypoint",
"looping",
"pingpong",
0
};
//! Data for holding named Animation Info
struct KeyFrameInterpolation
{
core::stringc Name; // Name of the current Animation/Bone
E_ANIMATION_TYPE AnimationType; // Type of Animation ( looping, usw..)
f32 CurrentFrame; // Current Frame
s32 NextFrame; // Frame which will be used next. For blending
s32 StartFrame; // Absolute Frame where the current animation start
s32 Frames; // Relative Frames how much Frames this animation have
s32 LoopingFrames; // How much of Frames sould be looped
s32 EndFrame; // Absolute Frame where the current animation ends End = start + frames - 1
f32 FramesPerSecond; // Speed in Frames/Seconds the animation is played
f32 RelativeSpeed; // Factor Original fps is modified
u32 BeginTime; // Animation started at this thime
u32 EndTime; // Animation end at this time
u32 LastTime; // Last Keyframe was done at this time
KeyFrameInterpolation ( const c8 * name = "", s32 start = 0, s32 frames = 0, s32 loopingframes = 0,
f32 fps = 0.f, f32 relativefps = 1.f )
: Name ( name ), AnimationType ( loopingframes ? EAMT_LOOPING : EAMT_WAYPOINT),
CurrentFrame ( (f32) start ), NextFrame ( start ), StartFrame ( start ),
Frames ( frames ), LoopingFrames ( loopingframes ), EndFrame ( start + frames - 1 ),
FramesPerSecond ( fps ), RelativeSpeed ( relativefps ),
BeginTime ( 0 ), EndTime ( 0 ), LastTime ( 0 )
{
}
// linear search
bool operator == ( const KeyFrameInterpolation & other ) const
{
return Name.equals_ignore_case ( other.Name );
}
};
//! a List holding named Animations
typedef core::array < KeyFrameInterpolation > IAnimationList;
//! a List holding named Skins
typedef core::array < core::stringc > ISkinList;
// Current Model per Body
struct SubModel
{
core::stringc name;
u32 startBuffer;
u32 endBuffer;
u32 state;
};
struct BodyPart
{
core::stringc name;
u32 defaultModel;
core::array < SubModel > model;
};
//! a List holding named Models and SubModels
typedef core::array < BodyPart > IBodyList;
//! Interface for an animated mesh. //! Interface for an animated mesh.
/** There are already simple implementations of this interface available so /** There are already simple implementations of this interface available so
you don't have to implement this interface on your own if you need to: you don't have to implement this interface on your own if you need to:
......
...@@ -18,8 +18,8 @@ namespace irr ...@@ -18,8 +18,8 @@ namespace irr
namespace scene namespace scene
{ {
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( push, packing ) # pragma pack( push, packing )
# pragma pack( 1 ) # pragma pack( 1 )
# define PACK_STRUCT # define PACK_STRUCT
...@@ -29,320 +29,320 @@ namespace scene ...@@ -29,320 +29,320 @@ namespace scene
# error compiler not supported # error compiler not supported
#endif #endif
// STUDIO MODELS, Copyright (c) 1998, Valve LLC. All rights reserved. // STUDIO MODELS, Copyright (c) 1998, Valve LLC. All rights reserved.
#define MAXSTUDIOTRIANGLES 20000 // TODO: tune this #define MAXSTUDIOTRIANGLES 20000 // TODO: tune this
#define MAXSTUDIOVERTS 2048 // TODO: tune this #define MAXSTUDIOVERTS 2048 // TODO: tune this
#define MAXSTUDIOSEQUENCES 256 // total animation sequences #define MAXSTUDIOSEQUENCES 256 // total animation sequences
#define MAXSTUDIOSKINS 100 // total textures #define MAXSTUDIOSKINS 100 // total textures
#define MAXSTUDIOSRCBONES 512 // bones allowed at source movement #define MAXSTUDIOSRCBONES 512 // bones allowed at source movement
#define MAXSTUDIOBONES 128 // total bones actually used #define MAXSTUDIOBONES 128 // total bones actually used
#define MAXSTUDIOMODELS 32 // sub-models per model #define MAXSTUDIOMODELS 32 // sub-models per model
#define MAXSTUDIOBODYPARTS 32 #define MAXSTUDIOBODYPARTS 32
#define MAXSTUDIOGROUPS 4 #define MAXSTUDIOGROUPS 4
#define MAXSTUDIOANIMATIONS 512 // per sequence #define MAXSTUDIOANIMATIONS 512 // per sequence
#define MAXSTUDIOMESHES 256 #define MAXSTUDIOMESHES 256
#define MAXSTUDIOEVENTS 1024 #define MAXSTUDIOEVENTS 1024
#define MAXSTUDIOPIVOTS 256 #define MAXSTUDIOPIVOTS 256
#define MAXSTUDIOCONTROLLERS 8 #define MAXSTUDIOCONTROLLERS 8
typedef f32 vec3_hl[3]; // x,y,z typedef f32 vec3_hl[3]; // x,y,z
typedef f32 vec4_hl[4]; // x,y,z,w typedef f32 vec4_hl[4]; // x,y,z,w
struct SHalflifeHeader struct SHalflifeHeader
{ {
c8 id[4]; c8 id[4];
s32 version; s32 version;
c8 name[64]; c8 name[64];
s32 length; s32 length;
vec3_hl eyeposition; // ideal eye position vec3_hl eyeposition; // ideal eye position
vec3_hl min; // ideal movement hull size vec3_hl min; // ideal movement hull size
vec3_hl max; vec3_hl max;
vec3_hl bbmin; // clipping bounding box vec3_hl bbmin; // clipping bounding box
vec3_hl bbmax; vec3_hl bbmax;
s32 flags; s32 flags;
u32 numbones; // bones u32 numbones; // bones
u32 boneindex; u32 boneindex;
u32 numbonecontrollers; // bone controllers u32 numbonecontrollers; // bone controllers
u32 bonecontrollerindex; u32 bonecontrollerindex;
u32 numhitboxes; // complex bounding boxes u32 numhitboxes; // complex bounding boxes
u32 hitboxindex; u32 hitboxindex;
u32 numseq; // animation sequences u32 numseq; // animation sequences
u32 seqindex; u32 seqindex;
u32 numseqgroups; // demand loaded sequences u32 numseqgroups; // demand loaded sequences
u32 seqgroupindex; u32 seqgroupindex;
u32 numtextures; // raw textures u32 numtextures; // raw textures
u32 textureindex; u32 textureindex;
u32 texturedataindex; u32 texturedataindex;
u32 numskinref; // replaceable textures u32 numskinref; // replaceable textures
u32 numskinfamilies; u32 numskinfamilies;
u32 skinindex; u32 skinindex;
u32 numbodyparts; u32 numbodyparts;
u32 bodypartindex; u32 bodypartindex;
u32 numattachments; // queryable attachable points u32 numattachments; // queryable attachable points
u32 attachmentindex; u32 attachmentindex;
s32 soundtable; s32 soundtable;
s32 soundindex; s32 soundindex;
s32 soundgroups; s32 soundgroups;
s32 soundgroupindex; s32 soundgroupindex;
s32 numtransitions; // animation node to animation node transition graph s32 numtransitions; // animation node to animation node transition graph
s32 transitionindex; s32 transitionindex;
}; };
// header for demand loaded sequence group data // header for demand loaded sequence group data
typedef struct typedef struct
{ {
s32 id; s32 id;
s32 version; s32 version;
c8 name[64]; c8 name[64];
s32 length; s32 length;
} studioseqhdr_t; } studioseqhdr_t;
// bones // bones
struct SHalflifeBone struct SHalflifeBone
{ {
c8 name[32]; // bone name for symbolic links c8 name[32]; // bone name for symbolic links
s32 parent; // parent bone s32 parent; // parent bone
s32 flags; // ?? s32 flags; // ??
s32 bonecontroller[6]; // bone controller index, -1 == none s32 bonecontroller[6]; // bone controller index, -1 == none
f32 value[6]; // default DoF values f32 value[6]; // default DoF values
f32 scale[6]; // scale for delta DoF values f32 scale[6]; // scale for delta DoF values
}; };
// bone controllers // bone controllers
struct SHalflifeBoneController struct SHalflifeBoneController
{ {
s32 bone; // -1 == 0 s32 bone; // -1 == 0
s32 type; // X, Y, Z, XR, YR, ZR, M s32 type; // X, Y, Z, XR, YR, ZR, M
f32 start; f32 start;
f32 end; f32 end;
s32 rest; // byte index value at rest s32 rest; // byte index value at rest
s32 index; // 0-3 user set controller, 4 mouth s32 index; // 0-3 user set controller, 4 mouth
}; };
// intersection boxes // intersection boxes
struct SHalflifeBBox struct SHalflifeBBox
{ {
s32 bone; s32 bone;
s32 group; // intersection group s32 group; // intersection group
vec3_hl bbmin; // bounding box vec3_hl bbmin; // bounding box
vec3_hl bbmax; vec3_hl bbmax;
}; };
#ifndef ZONE_H #ifndef ZONE_H
typedef void *cache_user_t; typedef void *cache_user_t;
#endif #endif
// demand loaded sequence groups // demand loaded sequence groups
struct SHalflifeSequenceGroup struct SHalflifeSequenceGroup
{ {
c8 label[32]; // textual name c8 label[32]; // textual name
c8 name[64]; // file name c8 name[64]; // file name
cache_user_t cache; // cache index pointer cache_user_t cache; // cache index pointer
s32 data; // hack for group 0 s32 data; // hack for group 0
}; };
// sequence descriptions // sequence descriptions
struct SHalflifeSequence struct SHalflifeSequence
{ {
c8 label[32]; // sequence label c8 label[32]; // sequence label
f32 fps; // frames per second f32 fps; // frames per second
s32 flags; // looping/non-looping flags s32 flags; // looping/non-looping flags
s32 activity; s32 activity;
s32 actweight; s32 actweight;
s32 numevents; s32 numevents;
s32 eventindex; s32 eventindex;
s32 numframes; // number of frames per sequence s32 numframes; // number of frames per sequence
u32 numpivots; // number of foot pivots u32 numpivots; // number of foot pivots
u32 pivotindex; u32 pivotindex;
s32 motiontype; s32 motiontype;
s32 motionbone; s32 motionbone;
vec3_hl linearmovement; vec3_hl linearmovement;
s32 automoveposindex; s32 automoveposindex;
s32 automoveangleindex; s32 automoveangleindex;
vec3_hl bbmin; // per sequence bounding box vec3_hl bbmin; // per sequence bounding box
vec3_hl bbmax; vec3_hl bbmax;
s32 numblends; s32 numblends;
s32 animindex; // SHalflifeAnimOffset pointer relative to start of sequence group data s32 animindex; // SHalflifeAnimOffset pointer relative to start of sequence group data
// [blend][bone][X, Y, Z, XR, YR, ZR] // [blend][bone][X, Y, Z, XR, YR, ZR]
s32 blendtype[2]; // X, Y, Z, XR, YR, ZR s32 blendtype[2]; // X, Y, Z, XR, YR, ZR
f32 blendstart[2]; // starting value f32 blendstart[2]; // starting value
f32 blendend[2]; // ending value f32 blendend[2]; // ending value
s32 blendparent; s32 blendparent;
s32 seqgroup; // sequence group for demand loading s32 seqgroup; // sequence group for demand loading
s32 entrynode; // transition node at entry s32 entrynode; // transition node at entry
s32 exitnode; // transition node at exit s32 exitnode; // transition node at exit
s32 nodeflags; // transition rules s32 nodeflags; // transition rules
s32 nextseq; // auto advancing sequences s32 nextseq; // auto advancing sequences
}; };
// events // events
typedef struct typedef struct
{ {
s32 frame; s32 frame;
s32 event; s32 event;
s32 type; s32 type;
c8 options[64]; c8 options[64];
} mstudioevent_t; } mstudioevent_t;
// pivots // pivots
typedef struct typedef struct
{ {
vec3_hl org; // pivot point vec3_hl org; // pivot point
s32 start; s32 start;
s32 end; s32 end;
} mstudiopivot_t; } mstudiopivot_t;
// attachment // attachment
struct SHalfelifeAttachment struct SHalfelifeAttachment
{ {
c8 name[32]; c8 name[32];
s32 type; s32 type;
s32 bone; s32 bone;
vec3_hl org; // attachment point vec3_hl org; // attachment point
vec3_hl vectors[3]; vec3_hl vectors[3];
}; };
struct SHalflifeAnimOffset struct SHalflifeAnimOffset
{ {
u16 offset[6]; u16 offset[6];
}; };
// animation frames // animation frames
union SHalfelifeAnimationFrame union SHalfelifeAnimationFrame
{ {
struct { struct {
u8 valid; u8 valid;
u8 total; u8 total;
} num; } num;
s16 value; s16 value;
}; };
// body part index // body part index
struct SHalflifeBody struct SHalflifeBody
{ {
c8 name[64]; c8 name[64];
u32 nummodels; u32 nummodels;
u32 base; u32 base;
u32 modelindex; // index into models array u32 modelindex; // index into models array
}; };
// skin info // skin info
struct SHalflifeTexture struct SHalflifeTexture
{ {
c8 name[64]; c8 name[64];
s32 flags; s32 flags;
s32 width; s32 width;
s32 height; s32 height;
s32 index; s32 index;
}; };
// skin families // skin families
// short index[skinfamilies][skinref] // short index[skinfamilies][skinref]
// studio models // studio models
struct SHalflifeModel struct SHalflifeModel
{ {
c8 name[64]; c8 name[64];
s32 type; s32 type;
f32 boundingradius; f32 boundingradius;
u32 nummesh; u32 nummesh;
u32 meshindex; u32 meshindex;
u32 numverts; // number of unique vertices u32 numverts; // number of unique vertices
u32 vertinfoindex; // vertex bone info u32 vertinfoindex; // vertex bone info
u32 vertindex; // vertex vec3_hl u32 vertindex; // vertex vec3_hl
u32 numnorms; // number of unique surface normals u32 numnorms; // number of unique surface normals
u32 norminfoindex; // normal bone info u32 norminfoindex; // normal bone info
u32 normindex; // normal vec3_hl u32 normindex; // normal vec3_hl
u32 numgroups; // deformation groups u32 numgroups; // deformation groups
u32 groupindex; u32 groupindex;
}; };
// meshes // meshes
typedef struct typedef struct
{ {
u32 numtris; u32 numtris;
u32 triindex; u32 triindex;
u32 skinref; u32 skinref;
u32 numnorms; // per mesh normals u32 numnorms; // per mesh normals
u32 normindex; // normal vec3_hl u32 normindex; // normal vec3_hl
} SHalflifeMesh; } SHalflifeMesh;
// lighting options // lighting options
#define STUDIO_NF_FLATSHADE 0x0001 #define STUDIO_NF_FLATSHADE 0x0001
#define STUDIO_NF_CHROME 0x0002 #define STUDIO_NF_CHROME 0x0002
#define STUDIO_NF_FULLBRIGHT 0x0004 #define STUDIO_NF_FULLBRIGHT 0x0004
// motion flags // motion flags
#define STUDIO_X 0x0001 #define STUDIO_X 0x0001
#define STUDIO_Y 0x0002 #define STUDIO_Y 0x0002
#define STUDIO_Z 0x0004 #define STUDIO_Z 0x0004
#define STUDIO_XR 0x0008 #define STUDIO_XR 0x0008
#define STUDIO_YR 0x0010 #define STUDIO_YR 0x0010
#define STUDIO_ZR 0x0020 #define STUDIO_ZR 0x0020
#define STUDIO_LX 0x0040 #define STUDIO_LX 0x0040
#define STUDIO_LY 0x0080 #define STUDIO_LY 0x0080
#define STUDIO_LZ 0x0100 #define STUDIO_LZ 0x0100
#define STUDIO_AX 0x0200 #define STUDIO_AX 0x0200
#define STUDIO_AY 0x0400 #define STUDIO_AY 0x0400
#define STUDIO_AZ 0x0800 #define STUDIO_AZ 0x0800
#define STUDIO_AXR 0x1000 #define STUDIO_AXR 0x1000
#define STUDIO_AYR 0x2000 #define STUDIO_AYR 0x2000
#define STUDIO_AZR 0x4000 #define STUDIO_AZR 0x4000
#define STUDIO_TYPES 0x7FFF #define STUDIO_TYPES 0x7FFF
#define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance #define STUDIO_RLOOP 0x8000 // controller that wraps shortest distance
// sequence flags // sequence flags
#define STUDIO_LOOPING 0x0001 #define STUDIO_LOOPING 0x0001
// bone flags // bone flags
#define STUDIO_HAS_NORMALS 0x0001 #define STUDIO_HAS_NORMALS 0x0001
#define STUDIO_HAS_VERTICES 0x0002 #define STUDIO_HAS_VERTICES 0x0002
#define STUDIO_HAS_BBOX 0x0004 #define STUDIO_HAS_BBOX 0x0004
#define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them #define STUDIO_HAS_CHROME 0x0008 // if any of the textures have chrome on them
#define RAD_TO_STUDIO (32768.0/M_PI) #define RAD_TO_STUDIO (32768.0/M_PI)
#define STUDIO_TO_RAD (M_PI/32768.0) #define STUDIO_TO_RAD (M_PI/32768.0)
// Default alignment // Default alignment
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) #if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( pop, packing ) # pragma pack( pop, packing )
#endif #endif
#undef PACK_STRUCT #undef PACK_STRUCT
...@@ -392,6 +392,96 @@ namespace scene ...@@ -392,6 +392,96 @@ namespace scene
}; };
//! Possible types of Animation Type
enum E_ANIMATION_TYPE
{
//! No Animation
EAMT_STILL,
//! From Start to End, then Stop ( Limited Line )
EAMT_WAYPOINT,
//! Linear Cycling Animation ( Sawtooth )
EAMT_LOOPING,
//! Linear bobbing ( Triangle )
EAMT_PINGPONG
};
//! Names for Animation Type
const c8* const MeshAnimationTypeNames[] =
{
"still",
"waypoint",
"looping",
"pingpong",
0
};
//! Data for holding named Animation Info
struct KeyFrameInterpolation
{
core::stringc Name; // Name of the current Animation/Bone
E_ANIMATION_TYPE AnimationType; // Type of Animation ( looping, usw..)
f32 CurrentFrame; // Current Frame
s32 NextFrame; // Frame which will be used next. For blending
s32 StartFrame; // Absolute Frame where the current animation start
s32 Frames; // Relative Frames how much Frames this animation have
s32 LoopingFrames; // How much of Frames sould be looped
s32 EndFrame; // Absolute Frame where the current animation ends End = start + frames - 1
f32 FramesPerSecond; // Speed in Frames/Seconds the animation is played
f32 RelativeSpeed; // Factor Original fps is modified
u32 BeginTime; // Animation started at this thime
u32 EndTime; // Animation end at this time
u32 LastTime; // Last Keyframe was done at this time
KeyFrameInterpolation ( const c8 * name = "", s32 start = 0, s32 frames = 0, s32 loopingframes = 0,
f32 fps = 0.f, f32 relativefps = 1.f )
: Name ( name ), AnimationType ( loopingframes ? EAMT_LOOPING : EAMT_WAYPOINT),
CurrentFrame ( (f32) start ), NextFrame ( start ), StartFrame ( start ),
Frames ( frames ), LoopingFrames ( loopingframes ), EndFrame ( start + frames - 1 ),
FramesPerSecond ( fps ), RelativeSpeed ( relativefps ),
BeginTime ( 0 ), EndTime ( 0 ), LastTime ( 0 )
{
}
// linear search
bool operator == ( const KeyFrameInterpolation & other ) const
{
return Name.equals_ignore_case ( other.Name );
}
};
//! a List holding named Animations
typedef core::array < KeyFrameInterpolation > IAnimationList;
//! a List holding named Skins
typedef core::array < core::stringc > ISkinList;
// Current Model per Body
struct SubModel
{
core::stringc name;
u32 startBuffer;
u32 endBuffer;
u32 state;
};
struct BodyPart
{
core::stringc name;
u32 defaultModel;
core::array < SubModel > model;
};
//! a List holding named Models and SubModels
typedef core::array < BodyPart > IBodyList;
class CAnimatedMeshHalfLife : public IAnimatedMesh class CAnimatedMeshHalfLife : public IAnimatedMesh
{ {
public: public:
...@@ -410,7 +500,7 @@ namespace scene ...@@ -410,7 +500,7 @@ namespace scene
virtual IMesh* getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop); virtual IMesh* getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop);
virtual const core::aabbox3d<f32>& getBoundingBox() const; virtual const core::aabbox3d<f32>& getBoundingBox() const;
virtual E_ANIMATED_MESH_TYPE getMeshType() const; virtual E_ANIMATED_MESH_TYPE getMeshType() const;
virtual void renderModel ( u32 param, video::IVideoDriver * driver, const core::matrix4 &absoluteTransformation); virtual void renderModel ( u32 param, video::IVideoDriver * driver, const core::matrix4 &absoluteTransformation);
//! returns amount of mesh buffers. //! returns amount of mesh buffers.
virtual u32 getMeshBufferCount() const; virtual u32 getMeshBufferCount() const;
...@@ -452,44 +542,44 @@ namespace scene ...@@ -452,44 +542,44 @@ namespace scene
ISceneManager *SceneManager; ISceneManager *SceneManager;
SHalflifeHeader *Header; SHalflifeHeader *Header;
SHalflifeHeader *TextureHeader; SHalflifeHeader *TextureHeader;
bool OwnTexModel; // do we have a modelT.mdl ? bool OwnTexModel; // do we have a modelT.mdl ?
SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl SHalflifeHeader *AnimationHeader[32]; // sequences named model01.mdl, model02.mdl
void initData (); void initData ();
void freeModel (); void freeModel ();
SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename ); SHalflifeHeader * loadModel( io::IReadFile* file, const io::path &filename );
bool postLoadModel( const io::path &filename ); bool postLoadModel( const io::path &filename );
u32 SequenceIndex; // sequence index u32 SequenceIndex; // sequence index
f32 CurrentFrame; // Current Frame f32 CurrentFrame; // Current Frame
#define MOUTH_CONTROLLER 4 #define MOUTH_CONTROLLER 4
u8 BoneController[4 + 1 ]; // bone controllers + mouth position u8 BoneController[4 + 1 ]; // bone controllers + mouth position
u8 Blending[2]; // animation blending u8 Blending[2]; // animation blending
f32 SetController( s32 controllerIndex, f32 value ); f32 SetController( s32 controllerIndex, f32 value );
u32 SkinGroupSelection; // skin group selection u32 SkinGroupSelection; // skin group selection
u32 SetSkin( u32 value ); u32 SetSkin( u32 value );
void initModel (); void initModel ();
void dumpModelInfo ( u32 level); void dumpModelInfo ( u32 level);
void ExtractBbox( s32 sequence, core::aabbox3df &box ); void ExtractBbox( s32 sequence, core::aabbox3df &box );
void setUpBones (); void setUpBones ();
SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq ); SHalflifeAnimOffset * getAnim( SHalflifeSequence *seq );
void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s ); void slerpBones( vec4_hl q1[], vec3_hl pos1[], vec4_hl q2[], vec3_hl pos2[], f32 s );
void calcRotations ( vec3_hl *pos, vec4_hl *q, SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f ); void calcRotations ( vec3_hl *pos, vec4_hl *q, SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f );
vec4_hl BoneAdj; vec4_hl BoneAdj;
void calcBoneAdj(); void calcBoneAdj();
void calcBoneQuaternion( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *q ) const; void calcBoneQuaternion( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *q ) const;
void calcBonePosition( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const; void calcBonePosition( s32 frame, f32 s, SHalflifeBone *bone, SHalflifeAnimOffset *anim, f32 *pos ) const;
void buildVertices (); void buildVertices ();
...@@ -502,7 +592,7 @@ namespace scene ...@@ -502,7 +592,7 @@ namespace scene
STextureAtlas TextureAtlas; STextureAtlas TextureAtlas;
video::ITexture *TextureMaster; video::ITexture *TextureMaster;
#endif #endif
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment