tab/spacing cleanups

This commit is contained in:
Glenn Maynard
2006-02-10 01:56:23 +00:00
parent 0f249786d1
commit 8be243e3a0
3 changed files with 49 additions and 49 deletions
+10 -10
View File
@@ -54,32 +54,32 @@ public:
virtual void PushSelf( lua_State *L ); virtual void PushSelf( lua_State *L );
private: private:
RageModelGeometry *m_pGeometry; RageModelGeometry *m_pGeometry;
vector<msMaterial> m_Materials; vector<msMaterial> m_Materials;
map<RString,msAnimation> m_mapNameToAnimation; map<RString,msAnimation> m_mapNameToAnimation;
const msAnimation* m_pCurAnimation; const msAnimation* m_pCurAnimation;
static void SetBones( const msAnimation* pAnimation, float fFrame, vector<myBone_t> &vpBones ); static void SetBones( const msAnimation* pAnimation, float fFrame, vector<myBone_t> &vpBones );
vector<myBone_t> m_vpBones; vector<myBone_t> m_vpBones;
// If any vertex has a bone weight, then then render from m_pTempGeometry. // If any vertex has a bone weight, then then render from m_pTempGeometry.
// Otherwise, render directly from m_pGeometry. // Otherwise, render directly from m_pGeometry.
RageCompiledGeometry* m_pTempGeometry; RageCompiledGeometry* m_pTempGeometry;
void UpdateTempGeometry(); void UpdateTempGeometry();
/* Keep a copy of the mesh data only if m_pTempGeometry is in use. The normal and /* Keep a copy of the mesh data only if m_pTempGeometry is in use. The normal and
* position data will be changed; the rest is static and kept only to prevent making * position data will be changed; the rest is static and kept only to prevent making
* a complete copy. */ * a complete copy. */
vector<msMesh> m_vTempMeshes; vector<msMesh> m_vTempMeshes;
void DrawMesh( int i ) const; void DrawMesh( int i ) const;
void AdvanceFrame( float fDeltaTime ); void AdvanceFrame( float fDeltaTime );
float m_fCurFrame; float m_fCurFrame;
RString m_sDefaultAnimation; RString m_sDefaultAnimation;
float m_fDefaultAnimationRate; float m_fDefaultAnimationRate;
float m_fCurAnimationRate; float m_fCurAnimationRate;
}; };
+38 -38
View File
@@ -7,7 +7,7 @@
struct msTriangle struct msTriangle
{ {
uint16_t nVertexIndices[3]; uint16_t nVertexIndices[3];
}; };
@@ -16,17 +16,17 @@ struct msMesh
msMesh(); msMesh();
~msMesh(); ~msMesh();
RString sName; RString sName;
char nMaterialIndex; char nMaterialIndex;
vector<RageModelVertex> Vertices; vector<RageModelVertex> Vertices;
// OPTIMIZATION: If all verts in a mesh are transformed by the same bone, // OPTIMIZATION: If all verts in a mesh are transformed by the same bone,
// then send the transform to the graphics card for the whole mesh instead // then send the transform to the graphics card for the whole mesh instead
// of transforming each vertex on the CPU; // of transforming each vertex on the CPU;
char nBoneIndex; // -1 = no bone char nBoneIndex; // -1 = no bone
vector<msTriangle> Triangles; vector<msTriangle> Triangles;
}; };
class RageTexture; class RageTexture;
@@ -84,52 +84,52 @@ private:
struct msMaterial struct msMaterial
{ {
int nFlags; int nFlags;
RString sName; RString sName;
RageColor Ambient; RageColor Ambient;
RageColor Diffuse; RageColor Diffuse;
RageColor Specular; RageColor Specular;
RageColor Emissive; RageColor Emissive;
float fShininess; float fShininess;
float fTransparency; float fTransparency;
int nName; // not used in SM. What is this for anyway? int nName; // not used in SM. What is this for anyway?
AnimatedTexture diffuse; AnimatedTexture diffuse;
AnimatedTexture alpha; AnimatedTexture alpha;
bool NeedsNormals() const { return diffuse.NeedsNormals() || alpha.NeedsNormals() ; } bool NeedsNormals() const { return diffuse.NeedsNormals() || alpha.NeedsNormals() ; }
}; };
struct msPositionKey struct msPositionKey
{ {
float fTime; float fTime;
RageVector3 Position; RageVector3 Position;
}; };
struct msRotationKey struct msRotationKey
{ {
float fTime; float fTime;
RageVector3 Rotation; RageVector3 Rotation;
}; };
struct msBone struct msBone
{ {
int nFlags; int nFlags;
RString sName; RString sName;
RString sParentName; RString sParentName;
RageVector3 Position; RageVector3 Position;
RageVector3 Rotation; RageVector3 Rotation;
vector<msPositionKey> PositionKeys; vector<msPositionKey> PositionKeys;
int nNumRotationKeys; int nNumRotationKeys;
int nNumAllocedRotationKeys; int nNumAllocedRotationKeys;
vector<msRotationKey> RotationKeys; vector<msRotationKey> RotationKeys;
}; };
struct msAnimation struct msAnimation
{ {
vector<msBone> Bones; vector<msBone> Bones;
int FindBoneByName( const RString &sName ) const int FindBoneByName( const RString &sName ) const
{ {
@@ -141,18 +141,18 @@ struct msAnimation
bool LoadMilkshapeAsciiBones( RString sAniName, RString sPath ); bool LoadMilkshapeAsciiBones( RString sAniName, RString sPath );
int nTotalFrames; int nTotalFrames;
RageVector3 Position; RageVector3 Position;
RageVector3 Rotation; RageVector3 Rotation;
}; };
struct myBone_t struct myBone_t
{ {
RageMatrix mRelative; RageMatrix mRelative;
RageMatrix mAbsolute; RageMatrix mAbsolute;
RageMatrix mRelativeFinal; RageMatrix mRelativeFinal;
RageMatrix mFinal; RageMatrix mFinal;
}; };
#endif #endif
+1 -1
View File
@@ -92,7 +92,7 @@ protected:
bool m_bUsingCustomTexCoords; bool m_bUsingCustomTexCoords;
bool m_bSkipNextUpdate; bool m_bSkipNextUpdate;
float m_CustomTexCoords[8]; // (x,y) * 4: top left, bottom left, bottom right, top right float m_CustomTexCoords[8]; // (x,y) * 4: top left, bottom left, bottom right, top right
// Remembered clipped dimensions are applied on Load(). // Remembered clipped dimensions are applied on Load().
// -1 means no remembered dimensions; // -1 means no remembered dimensions;