initial
This commit is contained in:
1424
public/mdlobjects/authphysfx.h
Normal file
1424
public/mdlobjects/authphysfx.h
Normal file
File diff suppressed because it is too large
Load Diff
145
public/mdlobjects/clothproxymesh.h
Normal file
145
public/mdlobjects/clothproxymesh.h
Normal file
@@ -0,0 +1,145 @@
|
||||
//========== Copyright (c) Valve Corporation. All Rights Reserved. ============
|
||||
#ifndef MDLOBJECTS_CLOTHPROXYMESH_HDR
|
||||
#define MDLOBJECTS_CLOTHPROXYMESH_HDR
|
||||
|
||||
|
||||
|
||||
class CVClothProxyMesh
|
||||
{
|
||||
public:
|
||||
CVClothProxyMesh()
|
||||
{
|
||||
m_meshName = "";
|
||||
m_meshFile = "";
|
||||
m_bMapUsingUVs = false;
|
||||
m_bBackSolveJoints = false;
|
||||
m_flBackSolveInfluenceThreshold = 0.05f;
|
||||
m_flEnvelope = 1000;
|
||||
m_flCollapseTinyEdges = 0.001f;
|
||||
m_bFlexClothBorders = false;
|
||||
//m_bEnableVolumetricSolve = false;
|
||||
}
|
||||
|
||||
bool IsSharedMeshProcessing() const
|
||||
{
|
||||
return m_bMapUsingUVs == false
|
||||
&& m_bBackSolveJoints == false
|
||||
&& fabsf( m_flBackSolveInfluenceThreshold - 0.05f ) < 0.00001f
|
||||
&& fabsf( m_flEnvelope - 1000 ) < 0.01f
|
||||
&& fabsf( m_flCollapseTinyEdges - 0.001f ) < 0.000001f
|
||||
&& m_bFlexClothBorders == false
|
||||
//&& m_bEnableVolumetricSolve == false
|
||||
;
|
||||
}
|
||||
|
||||
~CVClothProxyMesh()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool operator==( const CVClothProxyMesh &mesh ) const
|
||||
{
|
||||
if ( m_meshName != mesh.m_meshName )
|
||||
return false;
|
||||
if ( m_meshFile != mesh.m_meshFile )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
CUtlString m_meshName;
|
||||
CUtlString m_meshFile; // ProcessFilepath
|
||||
bool m_bMapUsingUVs;
|
||||
// Note: m_bBackSolveJoints is implicitly assumed to be true when m_bDriveMeshesWithBacksolvedJointsOnly is true
|
||||
bool m_bBackSolveJoints;
|
||||
//bool m_bEnableVolumetricSolve;
|
||||
bool m_bFlexClothBorders;
|
||||
float32 m_flBackSolveInfluenceThreshold;
|
||||
float32 m_flEnvelope;
|
||||
float32 m_flCollapseTinyEdges;
|
||||
};
|
||||
|
||||
|
||||
class CVClothProxyMeshOptions
|
||||
{
|
||||
public:
|
||||
|
||||
CVClothProxyMeshOptions()
|
||||
{
|
||||
m_flClothEnableThreshold = 0.05f;
|
||||
m_bCreateStaticBone = false;
|
||||
m_nMaxBonesPerVertex = 4;
|
||||
m_bRemoveUnusedBonesEnabled = false;
|
||||
m_flMatchProxiesToMeshes = 1.0f;
|
||||
m_bDriveMeshesWithBacksolvedJointsOnly = true;
|
||||
|
||||
m_flReservedFloat = 0;
|
||||
m_nReservedInt = 0;
|
||||
m_bReservedBool1 = false;
|
||||
m_bReservedBool2 = false;
|
||||
m_bReservedBool3 = false;
|
||||
m_bReservedBool4 = false;
|
||||
}
|
||||
|
||||
bool IsDefault()const
|
||||
{
|
||||
return fabsf( m_flClothEnableThreshold - 0.05f ) < 0.0001f
|
||||
&& m_bCreateStaticBone != false
|
||||
&& m_nMaxBonesPerVertex != 4
|
||||
&& m_bRemoveUnusedBonesEnabled == false
|
||||
&& fabsf( m_flMatchProxiesToMeshes - 1.0f ) < 0.0001f
|
||||
&& m_bDriveMeshesWithBacksolvedJointsOnly == true;
|
||||
}
|
||||
|
||||
float m_flClothEnableThreshold;
|
||||
bool m_bCreateStaticBone;
|
||||
int m_nMaxBonesPerVertex;
|
||||
bool m_bRemoveUnusedBonesEnabled;
|
||||
// this will ignore cloth attributes in meshes if we back-solve, so that back-solved joints may drive meshes
|
||||
bool m_bDriveMeshesWithBacksolvedJointsOnly;
|
||||
float m_flMatchProxiesToMeshes;
|
||||
|
||||
float m_flReservedFloat;
|
||||
int m_nReservedInt;
|
||||
bool m_bReservedBool1;
|
||||
bool m_bReservedBool2;
|
||||
bool m_bReservedBool3;
|
||||
bool m_bReservedBool4;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class CVClothProxyMeshList : public CVClothProxyMeshOptions
|
||||
{
|
||||
public:
|
||||
|
||||
CVClothProxyMeshList()
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~CVClothProxyMeshList() {}
|
||||
CUtlVector< CVClothProxyMesh > m_clothProxyMeshList;
|
||||
|
||||
bool IgnoreClothInMeshes() const
|
||||
{
|
||||
// Note: m_bBackSolveJoints is implicitly assumed to be true when m_bDriveMeshesWithBacksolvedJointsOnly is true
|
||||
return m_bDriveMeshesWithBacksolvedJointsOnly;
|
||||
}
|
||||
|
||||
bool IsSharedMeshProcessing()const
|
||||
{
|
||||
if ( m_clothProxyMeshList.IsEmpty() )
|
||||
return true;
|
||||
if ( !IsDefault() )
|
||||
return false;
|
||||
for ( const CVClothProxyMesh &proxy : m_clothProxyMeshList )
|
||||
{
|
||||
if ( !proxy.IsSharedMeshProcessing() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // MDLOBJECTS_CLOTHPROXYMESH_HDR
|
||||
154
public/mdlobjects/dmeanimationassemblycommand.h
Normal file
154
public/mdlobjects/dmeanimationassemblycommand.h
Normal file
@@ -0,0 +1,154 @@
|
||||
//====== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// DmeAnimationAssemblyCommand
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DMEANIMATIONASSEMBLYCOMMAND_H
|
||||
#define DMEANIMATIONASSEMBLYCOMMAND_H
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "mdlobjects/dmeassemblycommand.h"
|
||||
#include "mdlobjects/dmesequence.h"
|
||||
#include "movieobjects/dmelog.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequence;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimationAssemblyCommand : public CDmeAssemblyCommand
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimationAssemblyCommand, CDmeAssemblyCommand );
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeFixupLoop : public CDmeAnimationAssemblyCommand
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeFixupLoop, CDmeAnimationAssemblyCommand );
|
||||
|
||||
public:
|
||||
// From CDmeAssemblyCommand
|
||||
virtual bool Apply( CDmElement *pDmElement );
|
||||
|
||||
CDmaVar< int > m_nStartFrame;
|
||||
CDmaVar< int > m_nEndFrame;
|
||||
|
||||
protected:
|
||||
template< class T > void Apply(
|
||||
CDmeTypedLog< T > *pDmeTypedLog,
|
||||
const DmeTime_t &dmeTimeStart,
|
||||
const DmeTime_t &dmeTimeEnd ) const;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSubtract : public CDmeAnimationAssemblyCommand
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSubtract, CDmeAnimationAssemblyCommand );
|
||||
|
||||
public:
|
||||
// From CDmeAssemblyCommand
|
||||
virtual bool Apply( CDmElement *pDmElement );
|
||||
|
||||
CDmaElement< CDmeSequenceBase > m_eSequence;
|
||||
CDmaVar< int > m_nFrame;
|
||||
|
||||
protected:
|
||||
template< class T > void Subtract(
|
||||
CDmeTypedLog< T > *pDmeTypedLogDst,
|
||||
const CDmeTypedLog< T > *pDmeTypedLogSrc,
|
||||
const DmeTime_t &dmeTimeSrc ) const;
|
||||
|
||||
virtual void Subtract(
|
||||
Vector &vResult,
|
||||
const Vector &vDst,
|
||||
const Vector &vSrc ) const;
|
||||
|
||||
virtual void Subtract(
|
||||
Quaternion &vResult,
|
||||
const Quaternion &vDst,
|
||||
const Quaternion &vSrc ) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmePreSubtract : public CDmeSubtract
|
||||
{
|
||||
DEFINE_ELEMENT( CDmePreSubtract, CDmeSubtract );
|
||||
|
||||
public:
|
||||
|
||||
protected:
|
||||
virtual void Subtract(
|
||||
Vector &vResult,
|
||||
const Vector &vDst,
|
||||
const Vector &vSrc ) const;
|
||||
|
||||
virtual void Subtract(
|
||||
Quaternion &vResult,
|
||||
const Quaternion &vDst,
|
||||
const Quaternion &vSrc ) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeRotateTo : public CDmeAnimationAssemblyCommand
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeRotateTo, CDmeAnimationAssemblyCommand );
|
||||
|
||||
public:
|
||||
// From CDmeAssemblyCommand
|
||||
virtual bool Apply( CDmElement *pDmElement );
|
||||
|
||||
CDmaVar< float > m_flAngle; // Specified in degrees
|
||||
|
||||
protected:
|
||||
void SubApply( CDmeDag *pDmeDag, CDmeChannelsClip *pDmeChannelsClip, bool bZUp );
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneMaskCmd : public CDmeAnimationAssemblyCommand
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneMaskCmd, CDmeAnimationAssemblyCommand );
|
||||
|
||||
public:
|
||||
// From CDmeAssemblyCommand
|
||||
virtual bool Apply( CDmElement *pDmElement );
|
||||
|
||||
protected:
|
||||
void SubApply( CDmeChannelsClip *pDmeChannelsClip, CDmeDag *pDmeDag, CDmeBoneMask *pDmeBoneMask );
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEANIMATIONASSEMBLYCOMMAND_H
|
||||
41
public/mdlobjects/dmeanimblocksize.h
Normal file
41
public/mdlobjects/dmeanimblocksize.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Dme $animblocksize
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEANIMBLOCKSIZE_H
|
||||
#define DMEANIMBLOCKSIZE_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimBlockSize : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimBlockSize, CDmElement );
|
||||
|
||||
public:
|
||||
enum AnimBlockStorageType_t
|
||||
{
|
||||
ANIMBLOCKSTORAGETYPE_LOWRES = 0,
|
||||
ANIMBLOCKSTORAGETYPE_HIRES = 1
|
||||
};
|
||||
|
||||
CDmaVar< int > m_nSize;
|
||||
CDmaVar< bool > m_bStall;
|
||||
CDmaVar< int > m_nStorageType;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEANIMBLOCKSIZE_H
|
||||
271
public/mdlobjects/dmeanimcmd.h
Normal file
271
public/mdlobjects/dmeanimcmd.h
Normal file
@@ -0,0 +1,271 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Animation commands
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEANIMCMD_H
|
||||
#define DMEANIMCMD_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "movieobjects/dmelog.h"
|
||||
|
||||
|
||||
// Forward declarations
|
||||
class CDmeMotionControl;
|
||||
class CDmeSequenceBase;
|
||||
class CDmeSequence;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Animation commands
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmd : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmd, CDmElement );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
bool HasAssemblyDmElement() const { return Q_strcmp( "", GetAssemblyDmElementTypeString() ) != 0; }
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC fixuploop
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdFixupLoop : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdFixupLoop, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString();
|
||||
|
||||
CDmaVar< int > m_nStartFrame;
|
||||
CDmaVar< int > m_nEndFrame;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC weightlisrt
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdWeightList : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdWeightList, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaString m_sWeightListName;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC subtract
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdSubtract : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdSubtract, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString();
|
||||
|
||||
CDmaElement< CDmeSequenceBase > m_eAnimation;
|
||||
CDmaVar< int > m_nFrame;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC presubtract
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdPreSubtract : public CDmeAnimCmdSubtract
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdPreSubtract, CDmeAnimCmdSubtract );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString();
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC align, alignto, alignbone, alignboneto
|
||||
//
|
||||
// align animationName, boneName = "", any motion, sourceFrame, destinationFrame
|
||||
// alignTo animationName, boneName = "", motion = X | Y, sourceFrame = 0, destinationFrame = 0
|
||||
// alignBone animationName, bone, any motion, sourceFrame, destinationFrame
|
||||
// alignBoneTo animationName, bone, motion = X | Y, sourceFrame = 0, destinationFrame = 0
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdAlign : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdAlign, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaElement< CDmeSequenceBase > m_eAnimation;
|
||||
CDmaString m_sBoneName;
|
||||
CDmaVar< int > m_nSourceFrame;
|
||||
CDmaVar< int > m_nDestinatonFrame;
|
||||
CDmaElement< CDmeMotionControl > m_eMotionControl;
|
||||
};
|
||||
|
||||
|
||||
// TODO: QC match
|
||||
// TODO: QC matchblend
|
||||
// TODO: QC worldspaceblend
|
||||
// TODO: QC worldspaceblendloop
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC rotateTo
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdRotateTo : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdRotateTo, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString();
|
||||
|
||||
CDmaVar< float > m_flAngle; // Specified in degrees
|
||||
};
|
||||
|
||||
|
||||
// ikRule, ikFixup handled separately
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC walkframe
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdWalkFrame : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdWalkFrame, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaElement< CDmeMotionControl > m_eMotionControl;
|
||||
CDmaVar< int > m_nEndFrame;
|
||||
};
|
||||
|
||||
// TODO: QC walkalignto
|
||||
// TODO: QC walkalign
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC derivative
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdDerivative : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdDerivative, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaVar< float > m_flScale;
|
||||
};
|
||||
|
||||
// TODO: QC noanimation
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC lineardelta
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdLinearDelta : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdLinearDelta, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC splinedelta
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdSplineDelta : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdSplineDelta, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC compress
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdCompress : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdCompress, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaVar< int > m_nSkipFrames;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC numframes
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdNumFrames : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdNumFrames, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaVar< int > m_nFrames;
|
||||
};
|
||||
|
||||
// TODO: counterrotate
|
||||
// TODO: counterrotateto
|
||||
// TODO: localhierarchy
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdLocalHierarchy : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdLocalHierarchy, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaString m_sBoneName;
|
||||
CDmaString m_sParentBoneName;
|
||||
CDmaVar< float > m_flStartFrame;
|
||||
CDmaVar< float > m_flPeakFrame;
|
||||
CDmaVar< float > m_flTailFrame;
|
||||
CDmaVar< float > m_flEndFrame;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimCmdNoAnimation : public CDmeAnimCmd
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimCmdNoAnimation, CDmeAnimCmd );
|
||||
|
||||
public:
|
||||
static const char *GetAssemblyDmElementTypeString() { return ""; }
|
||||
|
||||
CDmaVar< bool > m_bNullAttr;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEANIMCMD_H
|
||||
35
public/mdlobjects/dmeassemblycommand.h
Normal file
35
public/mdlobjects/dmeassemblycommand.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//====== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// DmeAssembleCommand
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DMEASSEMBLYCOMMAND_H
|
||||
#define DMEASSEMBLYCOMMAND_H
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeAssemblyCommand
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAssemblyCommand : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAssemblyCommand, CDmElement );
|
||||
|
||||
public:
|
||||
virtual bool Apply( CDmElement * /* pDmElement */ ) { return false; }
|
||||
|
||||
// No attributes
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEASSEMBLYCOMMAND_H
|
||||
67
public/mdlobjects/dmeasset.h
Normal file
67
public/mdlobjects/dmeasset.h
Normal file
@@ -0,0 +1,67 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Elements related to assets
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEASSET_H
|
||||
#define DMEASSET_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeRelatedAsset : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeRelatedAsset, CDmElement );
|
||||
|
||||
public:
|
||||
|
||||
CDmaString m_sPath;
|
||||
CDmaVar< bool > m_bIncludeModel;
|
||||
CDmaString m_sNotes;
|
||||
CDmaVar< bool > m_bUseSkeleton;
|
||||
CDmaVar< bool > m_bAlwaysIncludeAttachments;
|
||||
CDmaElementArray< CDmElement > m_eAssembleCmds;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAssetRoot : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAssetRoot, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaString m_sMdlPath;
|
||||
CDmaString m_sSurfaceProperty;
|
||||
CDmaElementArray< CDmElement > m_ePostAssembleCmds;
|
||||
CDmaElementArray< CDmElement > m_eRelatedAssets;
|
||||
CDmaString m_sNameAtCreationTime;
|
||||
CDmaString m_sNotes;
|
||||
CDmaVar< bool > m_bAmbientBoost;
|
||||
CDmaVar< bool > m_bCastTextureShadows;
|
||||
CDmaVar< bool > m_bDoNotCastShadows;
|
||||
CDmaString m_sDynamicLightingOrigin;
|
||||
CDmaVar< int > m_nOpacity;
|
||||
CDmaVar< bool > m_bNoForcedFade;
|
||||
CDmaVar< bool > m_bSubdivisionSurface;
|
||||
CDmaString m_sContentsDescription;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEASSET_H
|
||||
57
public/mdlobjects/dmebbox.h
Normal file
57
public/mdlobjects/dmebbox.h
Normal file
@@ -0,0 +1,57 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of an axis aligned bounding box
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEBBOX_H
|
||||
#define DMEBBOX_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "movieobjects/dmeshape.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDrawSettings;
|
||||
struct matrix3x4_t;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an axis aligned bounding box
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBBox : public CDmeShape
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBBox, CDmeShape );
|
||||
|
||||
public:
|
||||
void Clear();
|
||||
bool Empty() const;
|
||||
void TransformUsing ( const matrix3x4_t &mMatrix );
|
||||
void Expand( const Vector &vPoint );
|
||||
void Expand( const CDmeBBox &bbox );
|
||||
bool Contains( const Vector &vPoint ) const;
|
||||
bool Intersects( const CDmeBBox &bbox ) const;
|
||||
float Width() const; // X
|
||||
float Height() const; // Y
|
||||
float Depth() const; // Z
|
||||
Vector Center() const;
|
||||
const Vector &Min() const;
|
||||
const Vector &Max() const;
|
||||
|
||||
CDmaVar< Vector > m_vMinBounds;
|
||||
CDmaVar< Vector > m_vMaxBounds;
|
||||
|
||||
// From CDmeShape
|
||||
virtual void Draw( const matrix3x4_t &shapeToWorld, CDmeDrawSettings *pDrawSettings = NULL );
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBBOX_H
|
||||
28
public/mdlobjects/dmeblankbodypart.h
Normal file
28
public/mdlobjects/dmeblankbodypart.h
Normal file
@@ -0,0 +1,28 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A blank body part
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEBLANKBODYPART_H
|
||||
#define DMEBLANKBODYPART_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "mdlobjects/dmebodypart.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A blank body part
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBlankBodyPart : public CDmeBodyPart
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBlankBodyPart, CDmeBodyPart );
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBLANKBODYPART_H
|
||||
43
public/mdlobjects/dmebodygroup.h
Normal file
43
public/mdlobjects/dmebodygroup.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a body groups. Each body group contains a list
|
||||
// of LOD lists which are the various options to switch in for that part
|
||||
// of the body
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEBODYGROUP_H
|
||||
#define DMEBODYGROUP_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBodyPart;
|
||||
class CDmeLODList;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a body group. Each element of the body parts array
|
||||
// is an option that can be switched into that part of the body.
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBodyGroup : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBodyGroup, CDmElement );
|
||||
|
||||
public:
|
||||
// Finds a body part by name
|
||||
CDmeLODList *FindBodyPart( const char *pName );
|
||||
|
||||
CDmaElementArray< CDmeBodyPart > m_BodyParts;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBODYGROUP_H
|
||||
43
public/mdlobjects/dmebodygrouplist.h
Normal file
43
public/mdlobjects/dmebodygrouplist.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a list of body groups. Each body group contains a list
|
||||
// of LOD lists which are the various options to switch in for that part of the body
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEBODYGROUPLIST_H
|
||||
#define DMEBODYGROUPLIST_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBodyGroup;
|
||||
class CDmeLODList;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of body groups
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBodyGroupList : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBodyGroupList, CDmElement );
|
||||
|
||||
public:
|
||||
CDmeBodyGroup *FindBodyGroup( const char *pName );
|
||||
|
||||
// Gets the 'main' body part (used for compilation)
|
||||
CDmeLODList *GetMainBodyPart();
|
||||
|
||||
CDmaElementArray< CDmeBodyGroup > m_BodyGroups;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBODYGROUPLIST_H
|
||||
45
public/mdlobjects/dmebodypart.h
Normal file
45
public/mdlobjects/dmebodypart.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Body part base class
|
||||
//
|
||||
// Body parts can be either:
|
||||
//
|
||||
// * A list of LODs (DmeLODList)
|
||||
// * empty (DmeBlankBodyPart)
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEBODYPART_H
|
||||
#define DMEBODYPART_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmelod.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A generic body part
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBodyPart : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBodyPart, CDmElement );
|
||||
|
||||
public:
|
||||
// Returns the number of LODs in this body part, can be 0
|
||||
virtual int LODCount() const { return 0; }
|
||||
|
||||
// Returns the root LOD. This is the one with the switch metric 0
|
||||
virtual CDmeLOD *GetRootLOD() { return NULL; }
|
||||
|
||||
// Returns the shadow LOD
|
||||
virtual CDmeLOD *GetShadowLOD() { return NULL; }
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBODYPART_H
|
||||
74
public/mdlobjects/dmeboneflexdriver.h
Normal file
74
public/mdlobjects/dmeboneflexdriver.h
Normal file
@@ -0,0 +1,74 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Dme version of QC $boneflexdriver
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef BONEFLEXDRIVER_H
|
||||
#define BONEFLEXDRIVER_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// The control for a DmeBoneFlexDriver
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneFlexDriverControl : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneFlexDriverControl, CDmElement );
|
||||
|
||||
public:
|
||||
// Sets the bone component to be in the range [STUDIO_BONE_FLEX_TX, STUDIO_BONE_FLEX_RZ]
|
||||
int SetBoneComponent( int nBoneComponent );
|
||||
|
||||
CDmaString m_sFlexControllerName; // Name of flex controller to drive
|
||||
CDmaVar< int > m_nBoneComponent; // Component of bone to drive flex controller, StudioBoneFlexComponent_t
|
||||
CDmaVar< float > m_flMin; // Min value of bone component mapped to 0 on flex controller
|
||||
CDmaVar< float > m_flMax; // Max value of bone component mapped to 1 on flex controller (inches if T, degress if R)
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// $QC boneflexdriver
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneFlexDriver : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneFlexDriver, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_eControlList.GetAttribute(); }
|
||||
|
||||
CDmeBoneFlexDriverControl *FindOrCreateControl( const char *pszControlName );
|
||||
|
||||
CDmaString m_sBoneName; // Name of bone to drive flex controller
|
||||
CDmaElementArray< CDmeBoneFlexDriverControl > m_eControlList; // List of flex controllers to drive
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A list of DmeBoneFlexDriver elements
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneFlexDriverList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneFlexDriverList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_eBoneFlexDriverList.GetAttribute(); }
|
||||
|
||||
CDmeBoneFlexDriver *FindOrCreateBoneFlexDriver( const char *pszBoneName );
|
||||
|
||||
CDmaElementArray< CDmeBoneFlexDriver > m_eBoneFlexDriverList;
|
||||
};
|
||||
|
||||
|
||||
#endif // BONEFLEXDRIVER_H
|
||||
45
public/mdlobjects/dmebonemask.h
Normal file
45
public/mdlobjects/dmebonemask.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A list of DmeBoneWeight elements, replacing QC's $WeightList
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEBONEMASK_H
|
||||
#define DMEBONEMASK_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneWeight;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of bone weights
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneMask : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneMask, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_BoneWeights.GetAttribute(); }
|
||||
|
||||
// Does a case-insensitive search for the specified bone name and returns the weight if it exists or 1.0f if it doesn't
|
||||
float GetBoneWeight( const char *pszBoneName );
|
||||
|
||||
CDmaElementArray< CDmeBoneWeight > m_BoneWeights;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBONEMASK_H
|
||||
43
public/mdlobjects/dmebonemasklist.h
Normal file
43
public/mdlobjects/dmebonemasklist.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A list of DmeBoneMask elements, representing multiple QC $WeightList's
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEBONEMASKLIST_H
|
||||
#define DMEBONEMASKLIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneMask;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of bone masks
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneMaskList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneMaskList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_BoneMaskList.GetAttribute(); }
|
||||
|
||||
CDmaElement< CDmeBoneMask > m_eDefaultBoneMask;
|
||||
CDmaElementArray< CDmeBoneMask > m_BoneMaskList;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBONEMASKLIST_H
|
||||
34
public/mdlobjects/dmeboneweight.h
Normal file
34
public/mdlobjects/dmeboneweight.h
Normal file
@@ -0,0 +1,34 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a bone weight as in QC $WeightList
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEBONEWEIGHT_H
|
||||
#define DMEBONEWEIGHT_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a bone weight
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeBoneWeight : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeBoneWeight, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flWeight;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEBONEWEIGHT_H
|
||||
99
public/mdlobjects/dmecollisionjoints.h
Normal file
99
public/mdlobjects/dmecollisionjoints.h
Normal file
@@ -0,0 +1,99 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme $collisionjoints
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMECOLLISIONJOINTS_H
|
||||
#define DMECOLLISIONJOINTS_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmecollisionmodel.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Dme $jointconstrain
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeJointConstrain : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeJointConstrain, CDmElement );
|
||||
|
||||
virtual void OnAttributeChanged( CDmAttribute *pAttribute );
|
||||
|
||||
public:
|
||||
CDmaVar< int > m_nType; // 0: Free, 1: Fixed, 2: Limit
|
||||
CDmaVar< float > m_aLimitMin;
|
||||
CDmaVar< float > m_aLimitMax;
|
||||
CDmaVar< float > m_flFriction;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Dme $animatedfriction
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeJointAnimatedFriction : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeJointAnimatedFriction, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< int > m_nMinFriction;
|
||||
CDmaVar< int > m_nMaxFriction;
|
||||
CDmaVar< DmeTime_t > m_tTimeIn;
|
||||
CDmaVar< DmeTime_t > m_tTimeHold;
|
||||
CDmaVar< DmeTime_t > m_tTimeOut;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeCollisionJoint : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeCollisionJoint, CDmElement );
|
||||
|
||||
#ifndef SWIG
|
||||
public:
|
||||
#endif // #ifndef SWIG
|
||||
|
||||
CDmaVar< float> m_flMassBias;
|
||||
CDmaVar< float> m_flDamping;
|
||||
CDmaVar< float> m_flRotDamping;
|
||||
CDmaVar< float> m_flInertia;
|
||||
CDmaElement< CDmeJointConstrain > m_ConstrainX;
|
||||
CDmaElement< CDmeJointConstrain > m_ConstrainY;
|
||||
CDmaElement< CDmeJointConstrain > m_ConstrainZ;
|
||||
CDmaStringArray m_JointMergeList;
|
||||
CDmaStringArray m_JointCollideList;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Dme $collisionjoints
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeCollisionJoints : public CDmeCollisionModel
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeCollisionJoints, CDmeCollisionModel );
|
||||
|
||||
#ifndef SWIG
|
||||
public:
|
||||
#endif // #ifndef SWIG
|
||||
|
||||
CDmaVar< bool > m_bConcavePerJoint;
|
||||
CDmaVar< bool > m_bSelfCollisions;
|
||||
CDmaVar< bool > m_bBoneFollower;
|
||||
CDmaString m_RootBone;
|
||||
CDmaElement< CDmeJointAnimatedFriction> m_AnimatedFriction;
|
||||
CDmaStringArray m_JointSkipList;
|
||||
CDmaElementArray< CDmeCollisionJoint > m_JointList;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMECOLLISIONJOINTS_H
|
||||
51
public/mdlobjects/dmecollisionmodel.h
Normal file
51
public/mdlobjects/dmecollisionmodel.h
Normal file
@@ -0,0 +1,51 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a collision model
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMECOLLISIONMODEL_H
|
||||
#define DMECOLLISIONMODEL_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeModel;
|
||||
class CDmeDag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeCollisionModel : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeCollisionModel, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flMass;
|
||||
CDmaVar< bool > m_bAutomaticMassComputation;
|
||||
CDmaVar< float > m_flInertia;
|
||||
CDmaVar< float > m_flDamping;
|
||||
CDmaVar< float > m_flRotationalDamping;
|
||||
CDmaVar< float > m_flDrag;
|
||||
CDmaVar< int > m_nMaxConvexPieces;
|
||||
CDmaVar< bool > m_bRemove2D;
|
||||
CDmaVar< float > m_flWeldPositionTolerance;
|
||||
CDmaVar< float > m_flWeldNormalTolerance;
|
||||
CDmaVar< bool > m_bConcave;
|
||||
CDmaVar< bool > m_bForceMassCenter;
|
||||
CDmaVar< Vector > m_vecMassCenter;
|
||||
CDmaVar< bool > m_bAssumeWorldSpace;
|
||||
CDmaString m_SurfaceProperty;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMECOLLISIONMODEL_H
|
||||
38
public/mdlobjects/dmedefinebone.h
Normal file
38
public/mdlobjects/dmedefinebone.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme representation of QC: $definebone
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEDEFINEBONE_H
|
||||
#define DMEDEFINEBONE_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Dme representation of QC: $definebone
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDefineBone : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeDefineBone, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaString m_Parent;
|
||||
CDmaVar< Vector > m_Translation;
|
||||
CDmaVar< QAngle > m_Rotation;
|
||||
CDmaVar< Vector > m_RealignTranslation;
|
||||
CDmaVar< QAngle > m_RealignRotation;
|
||||
CDmaString m_sContentsDescription;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEDEFINEBONE_H
|
||||
42
public/mdlobjects/dmedefinebonelist.h
Normal file
42
public/mdlobjects/dmedefinebonelist.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A list of DmeSequences's
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEDEFINEBONELIST_H
|
||||
#define DMEDEFINEBONELIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDefineBone;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of sequences
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDefineBoneList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeDefineBoneList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_DefineBones.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmeDefineBone > m_DefineBones;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEDEFINEBONELIST_H
|
||||
36
public/mdlobjects/dmeelementgroup.h
Normal file
36
public/mdlobjects/dmeelementgroup.h
Normal file
@@ -0,0 +1,36 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Element group
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEELEMENTGROUP_H
|
||||
#define DMEELEMENTGROUP_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeElementGroup : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeElementGroup, CDmElement );
|
||||
|
||||
public:
|
||||
|
||||
CDmaElementArray< CDmeElementGroup > m_eElementList;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEELEMENTGROUP_H
|
||||
46
public/mdlobjects/dmeeyeball.h
Normal file
46
public/mdlobjects/dmeeyeball.h
Normal file
@@ -0,0 +1,46 @@
|
||||
//====== Copyright <20> 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// DmeEyeball
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DMEEYEBALL_H
|
||||
#define DMEEYEBALL_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDag;
|
||||
class CDmeMaterial;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeEyeball
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeEyeball : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeEyeball, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flRadius; // Radius of the ball of the eye
|
||||
CDmaVar< float > m_flYawAngle; // Yaw offset from "forward" for iris. Humans are typically 2-4 degrees walleyed.
|
||||
CDmaVar< float > m_flIrisScale; // Scale of the iris texture
|
||||
CDmaString m_sMaterialName; // The name of the material assigned to the faces belonging to the eye
|
||||
CDmaString m_sParentBoneName; // The name of the parent bone for the eyes
|
||||
CDmaVar< Vector > m_vPosition; // The name of the attachment at the position of this eye
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEEYEBALL_H
|
||||
41
public/mdlobjects/dmeeyeballglobals.h
Normal file
41
public/mdlobjects/dmeeyeballglobals.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//====== Copyright <20> 1996-2009, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Globals applyign to Eyeballs
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEEYEBALLGLOBALS_H
|
||||
#define DMEEYEBALLGLOBALS_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Globals applying to Eyeballs
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeEyeballGlobals : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeEyeballGlobals, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< Vector > m_vEyePosition; // The position of the eye
|
||||
CDmaVar< float > m_flMaxEyeDeflection; // The maximum amount of eye deflection
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEEYEBALLGLOBALS_H
|
||||
45
public/mdlobjects/dmeeyelid.h
Normal file
45
public/mdlobjects/dmeeyelid.h
Normal file
@@ -0,0 +1,45 @@
|
||||
//============ Copyright (c) Valve Corporation, All rights reserved. ==========
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef DMEEYELID_H
|
||||
#define DMEEYELID_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeEyeball
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeEyelid : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeEyelid, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< bool > m_bUpper;
|
||||
CDmaString m_sLowererFlex;
|
||||
CDmaVar< float > m_flLowererHeight;
|
||||
CDmaString m_sNeutralFlex;
|
||||
CDmaVar< float > m_flNeutralHeight;
|
||||
CDmaString m_sRaiserFlex;
|
||||
CDmaVar< float > m_flRaiserHeight;
|
||||
CDmaString m_sRightEyeballName;
|
||||
CDmaString m_sLeftEyeballName;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEEYELID_H
|
||||
37
public/mdlobjects/dmehitbox.h
Normal file
37
public/mdlobjects/dmehitbox.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a hitbox
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEHITBOX_H
|
||||
#define DMEHITBOX_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "mdlobjects/dmebbox.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeHitbox : public CDmeBBox
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeHitbox, CDmeBBox );
|
||||
|
||||
public:
|
||||
virtual void Draw( const matrix3x4_t &shapeToWorld, CDmeDrawSettings *pDrawSettings = NULL );
|
||||
|
||||
CDmaString m_sSurfaceProperty;
|
||||
CDmaVar< int > m_nGroupId;
|
||||
CDmaString m_sBoneName;
|
||||
CDmaColor m_cRenderColor; // used for visualization
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEHITBOX_H
|
||||
41
public/mdlobjects/dmehitboxset.h
Normal file
41
public/mdlobjects/dmehitboxset.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a hitbox set
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEHITBOXSET_H
|
||||
#define DMEHITBOXSET_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeHitbox;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeHitboxSet : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeHitboxSet, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_HitboxList.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmeHitbox > m_HitboxList;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEHITBOXSET_H
|
||||
41
public/mdlobjects/dmehitboxsetlist.h
Normal file
41
public/mdlobjects/dmehitboxsetlist.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a hitbox set
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEHITBOXSETLIST_H
|
||||
#define DMEHITBOXSETLIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeHitboxSet;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeHitboxSetList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeHitboxSetList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_HitboxSetList.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmeHitboxSet > m_HitboxSetList;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEHITBOXSETLIST_H
|
||||
146
public/mdlobjects/dmeik.h
Normal file
146
public/mdlobjects/dmeik.h
Normal file
@@ -0,0 +1,146 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Dme Ik rules
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
#ifndef DMEIK_H
|
||||
#define DMEIK_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkChain
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkChain : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkChain, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaString m_sEndJoint;
|
||||
CDmaVar< float > m_flHeight;
|
||||
CDmaVar< float > m_flPad;
|
||||
CDmaVar< float > m_flFloor;
|
||||
CDmaVar< Vector > m_vKnee;
|
||||
CDmaVar< Vector > m_vCenter;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkLock
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkLock : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkLock, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaElement< CDmeIkChain > m_eIkChain;
|
||||
CDmaVar< float > m_flLockPosition;
|
||||
CDmaVar< float > m_flLockRotation;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkRange
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkRange : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkRange, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< int > m_nStartFrame;
|
||||
CDmaVar< int > m_nMaxStartFrame;
|
||||
CDmaVar< int > m_nMaxEndFrame;
|
||||
CDmaVar< int > m_nEndFrame;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkRule
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkRule : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkRule, CDmElement );
|
||||
|
||||
public:
|
||||
enum Use_t
|
||||
{
|
||||
USE_NONE = 0,
|
||||
USE_SEQUENCE = 1,
|
||||
USE_SOURCE = 2
|
||||
};
|
||||
|
||||
CDmaElement< CDmeIkChain > m_eIkChain;
|
||||
CDmaElement< CDmeIkRange > m_eRange;
|
||||
CDmaVar< int > m_nUseType;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkTouchRule
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkTouchRule : public CDmeIkRule
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkTouchRule, CDmeIkRule );
|
||||
|
||||
public:
|
||||
CDmaString m_sBoneName;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkFootstepRule
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkFootstepRule : public CDmeIkRule
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkFootstepRule, CDmeIkRule );
|
||||
|
||||
public:
|
||||
// These are optional
|
||||
// CDmaVar< int > m_nContact;
|
||||
// CDmaVar< float > m_flHeight;
|
||||
// CDmaVar< float > m_flFloor;
|
||||
// CDmaVar< float > m_flPad;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkAttachmentRule
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkAttachmentRule : public CDmeIkRule
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkAttachmentRule, CDmeIkRule );
|
||||
|
||||
public:
|
||||
|
||||
CDmaString m_sAttachmentName;
|
||||
CDmaVar< float > m_flRadius;
|
||||
|
||||
// These are optional
|
||||
// CDmaString m_sFallbackBone;
|
||||
// CDmaVar< Vector > m_vFallbackPoint;
|
||||
// CDmaVar< Quaternion > m_qFallbackRotation;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeIkReleaseRule
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIkReleaseRule : public CDmeIkRule
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIkReleaseRule, CDmeIkRule );
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEIK_H
|
||||
34
public/mdlobjects/dmeincludemodellist.h
Normal file
34
public/mdlobjects/dmeincludemodellist.h
Normal file
@@ -0,0 +1,34 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a list of $includemodel
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMEINCLUDEMODELLIST_H
|
||||
#define DMEINCLUDEMODELLIST_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of $includemodel
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeIncludeModelList : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeIncludeModelList, CDmElement );
|
||||
|
||||
public:
|
||||
|
||||
#ifndef SWIG
|
||||
CDmaStringArray m_IncludeModels;
|
||||
#endif // #ifndef SWIG
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEINCLUDEMODELLIST_H
|
||||
91
public/mdlobjects/dmejigglebone.h
Normal file
91
public/mdlobjects/dmejigglebone.h
Normal file
@@ -0,0 +1,91 @@
|
||||
//====== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ======
|
||||
//
|
||||
// DmeJiggleBone
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
|
||||
#ifndef DMEJIGGLEBONE_H
|
||||
#define DMEJIGGLEBONE_H
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "mdlobjects/dmeproceduralbone.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeJiggleBone
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeJiggleBone : public CDmeProceduralBone
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeJiggleBone, CDmeProceduralBone );
|
||||
|
||||
public:
|
||||
|
||||
// flags
|
||||
CDmaVar< bool > m_bRigid;
|
||||
CDmaVar< bool > m_bFlexible;
|
||||
CDmaVar< bool > m_bBaseSpring;
|
||||
CDmaVar< bool > m_bYawConstrained;
|
||||
CDmaVar< bool > m_bPitchConstrained;
|
||||
CDmaVar< bool > m_bLengthConstrained;
|
||||
CDmaVar< bool > m_bAngleConstrained;
|
||||
|
||||
// general params
|
||||
CDmaVar< float > m_flLength;
|
||||
CDmaVar< float > m_flTipMass;
|
||||
|
||||
// angle constraint
|
||||
CDmaVar< float > m_flAngleLimit; // Angles
|
||||
|
||||
// yaw constraint
|
||||
CDmaVar< float > m_flYawMin; // Angle
|
||||
CDmaVar< float > m_flYawMax; // Angle
|
||||
CDmaVar< float > m_flYawFriction;
|
||||
CDmaVar< float > m_flYawBounce;
|
||||
|
||||
// pitch constraint
|
||||
CDmaVar< float > m_flPitchMin; // Angle
|
||||
CDmaVar< float > m_flPitchMax; // Angle
|
||||
CDmaVar< float > m_flPitchFriction;
|
||||
CDmaVar< float > m_flPitchBounce;
|
||||
|
||||
// flexible params
|
||||
CDmaVar< float > m_flYawStiffness; // [0, 1000]
|
||||
CDmaVar< float > m_flYawDamping; // [0, 10]
|
||||
|
||||
CDmaVar< float > m_flPitchStiffness; // [0, 1000]
|
||||
CDmaVar< float > m_flPitchDamping; // [0, 10]
|
||||
|
||||
CDmaVar< float > m_flAlongStiffness; // [0, 1000]
|
||||
CDmaVar< float > m_flAlongDamping; // [0, 10]
|
||||
|
||||
// base spring
|
||||
CDmaVar< float > m_flBaseMass;
|
||||
CDmaVar< float > m_flBaseStiffness; // [0, 1000]
|
||||
CDmaVar< float > m_flBaseDamping; // [0, 10]
|
||||
|
||||
// base spring yaw
|
||||
CDmaVar< float > m_flBaseYawMin;
|
||||
CDmaVar< float > m_flBaseYawMax;
|
||||
CDmaVar< float > m_flBaseYawFriction;
|
||||
|
||||
// base spring pitch
|
||||
CDmaVar< float > m_flBasePitchMin;
|
||||
CDmaVar< float > m_flBasePitchMax;
|
||||
CDmaVar< float > m_flBasePitchFriction;
|
||||
|
||||
// base spring along
|
||||
CDmaVar< float > m_flBaseAlongMin;
|
||||
CDmaVar< float > m_flBaseAlongMax;
|
||||
CDmaVar< float > m_flBaseAlongFriction;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEJIGGLEBONE_H
|
||||
46
public/mdlobjects/dmelod.h
Normal file
46
public/mdlobjects/dmelod.h
Normal file
@@ -0,0 +1,46 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a lod
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMELOD_H
|
||||
#define DMELOD_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeModel;
|
||||
class CDmeDag;
|
||||
class CDmeCombinationOperator;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing an attachment point
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeLOD : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeLOD, CDmElement );
|
||||
|
||||
public:
|
||||
// NOTE: It may be possible to eliminate the skeleton here
|
||||
// and assume the LOD always uses the root skeleton.
|
||||
CDmaString m_Path;
|
||||
CDmaElement< CDmeModel > m_Model;
|
||||
CDmaElement< CDmeDag > m_Skeleton;
|
||||
CDmaElement< CDmeCombinationOperator > m_CombinationOperator;
|
||||
CDmaVar< float > m_flSwitchMetric;
|
||||
CDmaVar< bool > m_bNoFlex;
|
||||
CDmaVar< bool > m_bIsShadowLOD;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMELOD_H
|
||||
50
public/mdlobjects/dmelodlist.h
Normal file
50
public/mdlobjects/dmelodlist.h
Normal file
@@ -0,0 +1,50 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme version of a list of lods
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMELODLIST_H
|
||||
#define DMELODLIST_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "mdlobjects/dmebodypart.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeLOD;
|
||||
class CDmeEyeball;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of LODs
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeLODList : public CDmeBodyPart
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeLODList, CDmeBodyPart );
|
||||
|
||||
public:
|
||||
// Returns the number of LODs in this body part, can be 0
|
||||
virtual int LODCount() const;
|
||||
|
||||
// Returns the root LOD. This is the one with the switch metric 0
|
||||
virtual CDmeLOD *GetRootLOD();
|
||||
|
||||
// Returns the shadow LOD
|
||||
virtual CDmeLOD *GetShadowLOD();
|
||||
|
||||
// NOTE: It may be possible to eliminate the skeleton here
|
||||
// and assume the LOD always uses the root skeleton.
|
||||
CDmaElementArray< CDmeLOD > m_LODs;
|
||||
|
||||
// Eyeballs
|
||||
CDmaElementArray< CDmeEyeball > m_EyeballList;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMELODLIST_H
|
||||
38
public/mdlobjects/dmematerialgroup.h
Normal file
38
public/mdlobjects/dmematerialgroup.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// DmeMaterialGroup
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEMATERIALGROUP_H
|
||||
#define DMEMATERIALGROUP_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Dme MaterialGroup element
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMaterialGroup : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMaterialGroup, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_MaterialList.GetAttribute(); }
|
||||
|
||||
#ifndef SWIG
|
||||
CDmaStringArray m_MaterialList;
|
||||
#endif // #ifndef SWIG
|
||||
|
||||
};
|
||||
|
||||
#endif // DMEMATERIALGROUP_H
|
||||
|
||||
42
public/mdlobjects/dmematerialgrouplist.h
Normal file
42
public/mdlobjects/dmematerialgrouplist.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A list of DmeSequences's
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEMATERIALGROUPSLIST_H
|
||||
#define DMEMATERIALGROUPSLIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMaterialGroup;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of sequences
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMaterialGroupList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMaterialGroupList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_MaterialGroups.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmeMaterialGroup > m_MaterialGroups;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEDEFINEBONELIST_H
|
||||
150
public/mdlobjects/dmematsysroot.h
Normal file
150
public/mdlobjects/dmematsysroot.h
Normal file
@@ -0,0 +1,150 @@
|
||||
//====== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DMEMATSYSROOT_H
|
||||
#define DMEMATSYSROOT_H
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "mathlib/mathlib.h"
|
||||
#include "movieobjects/dmedag.h"
|
||||
#include "movieobjects/dmeshape.h"
|
||||
#include "movieobjects/dmemdl.h"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CDmeMatSysSettings
|
||||
//=============================================================================
|
||||
class CDmeMatSysPanelSettings : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMatSysPanelSettings, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< Color > m_cBackgroundColor;
|
||||
CDmaVar< Color > m_cAmbientColor;
|
||||
CDmaVar< bool > m_bDrawGroundPlane;
|
||||
CDmaVar< bool > m_bDrawOriginAxis;
|
||||
};
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CDmeMatSysRoot
|
||||
//=============================================================================
|
||||
class CDmeMatSysRoot : public CDmeDag
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMatSysRoot, CDmeDag );
|
||||
|
||||
public:
|
||||
CDmaElement< CDmeMatSysPanelSettings > m_Settings;
|
||||
};
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
//=============================================================================
|
||||
class IDmeMatSysModel
|
||||
{
|
||||
virtual void GetSequenceList( CUtlVector< CUtlString > *pOutList ) = 0;
|
||||
virtual void GetActivityList( CUtlVector< CUtlString > *pOutList ) = 0;
|
||||
// Returns number of frame or -1 for error
|
||||
virtual int SelectSequence( const char *pszSequenceName );
|
||||
virtual void SetTime( DmeTime_t dmeTime );
|
||||
virtual void SetFrame( float flFrame );
|
||||
};
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CDmeMatSysMDLDag
|
||||
//=============================================================================
|
||||
class CDmeMatSysMDLDag : public IDmeMatSysModel, public CDmeDag
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMatSysMDLDag, CDmeDag );
|
||||
|
||||
public:
|
||||
studiohdr_t *GetStudioHdr() const;
|
||||
|
||||
// From IDmeMatSysModel
|
||||
virtual void GetSequenceList( CUtlVector< CUtlString > *pOutList );
|
||||
virtual void GetActivityList( CUtlVector< CUtlString > *pOutList );
|
||||
virtual int SelectSequence( const char *pszSequenceName );
|
||||
virtual void SetTime( DmeTime_t dmeTime );
|
||||
virtual void SetFrame( float flFrame );
|
||||
|
||||
// Convenience Functions calling into CDmeMDL which is the shape
|
||||
void SetMDL( MDLHandle_t hMDL );
|
||||
MDLHandle_t GetMDL() const;
|
||||
|
||||
|
||||
protected:
|
||||
CDmeMDL *GetDmeMDL() const;
|
||||
};
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CDmeMatSysDMXDag
|
||||
//=============================================================================
|
||||
class CDmeMatSysDMXDag : public IDmeMatSysModel, public CDmeDag
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMatSysDMXDag, CDmeDag );
|
||||
|
||||
public:
|
||||
// From CDmeDag
|
||||
virtual void Draw( CDmeDrawSettings *pDrawSettings = NULL );
|
||||
|
||||
// From IDmeMatSysModel
|
||||
virtual void GetSequenceList( CUtlVector< CUtlString > *pOutList );
|
||||
virtual void GetActivityList( CUtlVector< CUtlString > *pOutList );
|
||||
|
||||
void SetDmxRoot( CDmElement *pDmxRoot );
|
||||
|
||||
protected:
|
||||
CDmaElement< CDmElement > m_eDmxRoot;
|
||||
DmElementHandle_t m_hDmxModel;
|
||||
};
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// CDmeMatSysMPPDag
|
||||
//=============================================================================
|
||||
class CDmeMatSysMPPDag : public IDmeMatSysModel, public CDmeDag
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMatSysMPPDag, CDmeDag );
|
||||
|
||||
public:
|
||||
// From CDmeDag
|
||||
virtual void Draw( CDmeDrawSettings *pDrawSettings = NULL );
|
||||
|
||||
// From IDmeMatSysModel
|
||||
virtual void GetSequenceList( CUtlVector< CUtlString > *pOutList );
|
||||
virtual void GetActivityList( CUtlVector< CUtlString > *pOutList );
|
||||
virtual int SelectSequence( const char *pszSequenceName );
|
||||
virtual void SetTime( DmeTime_t dmeTime );
|
||||
virtual void SetFrame( float flFrame );
|
||||
|
||||
void SetMppRoot( CDmElement *pMppRoot );
|
||||
|
||||
protected:
|
||||
CDmaElement< CDmElement > m_eMppRoot;
|
||||
DmElementHandle_t m_hDmeBodyGroupList;
|
||||
DmElementHandle_t m_hDmeSequenceList;
|
||||
CUtlVector< DmElementHandle_t > m_hChildren;
|
||||
|
||||
// These are used for animation playback
|
||||
DmElementHandle_t m_hDmeSequence;
|
||||
CUtlVector< IDmeOperator * > m_dmeOperatorList;
|
||||
|
||||
void RemoveNullAndImplicitChildren();
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEMATSYSROOT_H
|
||||
38
public/mdlobjects/dmemdllist.h
Normal file
38
public/mdlobjects/dmemdllist.h
Normal file
@@ -0,0 +1,38 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A Dme element intended to be a base class for a common pattern of
|
||||
// MDLOBJECTS, that is an element which contains simply one attribute
|
||||
// of type AT_ELEMENTARRAY
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMEMDLLIST_H
|
||||
#define DMEMDLLIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A base class intended to be used for the common pattern in MDLOBJECTS
|
||||
// of an element which is nothing but a container for an array of element
|
||||
// attributes
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMdlList : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMdlList, CDmElement );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return NULL; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEMDLLIST_H
|
||||
54
public/mdlobjects/dmemotioncontrol.h
Normal file
54
public/mdlobjects/dmemotioncontrol.h
Normal file
@@ -0,0 +1,54 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// DmeMotionControl
|
||||
//
|
||||
// Used for specifiying motion axis control things like in QC
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEMOTIONCONTROL_H
|
||||
#define DMEMOTIONCONTROL_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CDmeMotionControl
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMotionControl : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMotionControl, CDmElement );
|
||||
|
||||
public:
|
||||
|
||||
// Sets the motion control booleans based on logical OR'd STUDIO_? flags in passed int
|
||||
void SetStudioMotionControl( int nStudioMotionControl );
|
||||
|
||||
// Gets the motion control booleans as a logical OR'd STUDIO_? flags int
|
||||
int GetStudioMotionControl() const;
|
||||
|
||||
CDmaVar< bool > m_bX;
|
||||
CDmaVar< bool > m_bY;
|
||||
CDmaVar< bool > m_bZ;
|
||||
CDmaVar< bool > m_bXR;
|
||||
CDmaVar< bool > m_bYR;
|
||||
CDmaVar< bool > m_bZR;
|
||||
CDmaVar< bool > m_bLX;
|
||||
CDmaVar< bool > m_bLY;
|
||||
CDmaVar< bool > m_bLZ;
|
||||
CDmaVar< bool > m_bLXR;
|
||||
CDmaVar< bool > m_bLYR;
|
||||
CDmaVar< bool > m_bLZR;
|
||||
CDmaVar< bool > m_bLM;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEMOTIONCONTROL_H
|
||||
40
public/mdlobjects/dmemouth.h
Normal file
40
public/mdlobjects/dmemouth.h
Normal file
@@ -0,0 +1,40 @@
|
||||
//============ Copyright (c) Valve Corporation, All rights reserved. ==========
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef DMEMOUTH_H
|
||||
#define DMEMOUTH_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeEyeball
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMouth : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMouth, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< int > m_nMouthNumber;
|
||||
CDmaString m_sFlexControllerName;
|
||||
CDmaString m_sBoneName;
|
||||
CDmaVar< Vector > m_vForward;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEMOUTH_H
|
||||
39
public/mdlobjects/dmeposeparameter.h
Normal file
39
public/mdlobjects/dmeposeparameter.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// Dme version of QC $poseparameter
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
#ifndef DMEPOSEPARAMETER_H
|
||||
#define DMEPOSEPARAMETER_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmelement.h"
|
||||
#include "datamodel/dmattributevar.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// $QC poseparam
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmePoseParameter : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmePoseParameter, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flMin;
|
||||
CDmaVar< float > m_flMax;
|
||||
CDmaVar< bool > m_bLoop;
|
||||
CDmaVar< float > m_flLoopRange;
|
||||
CDmaVar< bool > m_bWrap;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEPOSEPARAMETER_H
|
||||
41
public/mdlobjects/dmeposeparameterlist.h
Normal file
41
public/mdlobjects/dmeposeparameterlist.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====
|
||||
//
|
||||
// List of DmePoseParamaters
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
#ifndef DMEPOSEPARAMETERLIST_H
|
||||
#define DMEPOSEPARAMETERLIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmePoseParameter;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of LODs
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmePoseParameterList : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmePoseParameterList, CDmElement );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_ePoseParameterList.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmePoseParameter > m_ePoseParameterList;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEPOSEPARAMETERLIST_H
|
||||
30
public/mdlobjects/dmeproceduralbone.h
Normal file
30
public/mdlobjects/dmeproceduralbone.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// DmeProceduralBone
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
#ifndef DMEPROCEDURALBONE_H
|
||||
#define DMEPROCEDURALBONE_H
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "movieobjects/dmejoint.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeProceduralBone
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeProceduralBone : public CDmeJoint
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeProceduralBone, CDmeJoint );
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
#endif // DMEPROCEDURALBONE_H
|
||||
277
public/mdlobjects/dmesequence.h
Normal file
277
public/mdlobjects/dmesequence.h
Normal file
@@ -0,0 +1,277 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// Dme representation of QC: $sequence
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#ifndef DMESEQUENCE_H
|
||||
#define DMESEQUENCE_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "datamodel/dmelement.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeDag;
|
||||
class CDmeAnimationList;
|
||||
class CDmeIkRule;
|
||||
class CDmeIkLock;
|
||||
class CDmeAnimCmd;
|
||||
class CDmeEvent;
|
||||
class CDmeMotionControl;
|
||||
class CDmeSequenceBase;
|
||||
class CDmeChannelsClip;
|
||||
class CDmeBoneMask;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Animation event
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeAnimationEvent : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeAnimationEvent, CDmElement );
|
||||
|
||||
public:
|
||||
// Name is the event name
|
||||
CDmaVar< int > m_nFrame;
|
||||
CDmaString m_sDataString;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// QC $sequence activity <name> <weight>
|
||||
//
|
||||
// .name = <name>
|
||||
// .weight = <weight>
|
||||
// .modifierList = $QC activityModifier
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef SWIG
|
||||
%ignore CDmeSequenceActivity::m_sModifierList;
|
||||
#endif // #ifdef SWIG
|
||||
|
||||
class CDmeSequenceActivity : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceActivity, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaVar< int > m_nWeight;
|
||||
CDmaStringArray m_sModifierList;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CDmeSequenceLayerBase
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceLayerBase : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceLayerBase, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaElement< CDmeSequenceBase > m_eAnimation;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CDmeSequenceAddLayer
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceAddLayer : public CDmeSequenceLayerBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceAddLayer, CDmeSequenceLayerBase );
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CDmeSequenceBlendLayer
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceBlendLayer : public CDmeSequenceLayerBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceBlendLayer, CDmeSequenceLayerBase );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flStartFrame;
|
||||
CDmaVar< float > m_flPeakFrame;
|
||||
CDmaVar< float > m_flTailFrame;
|
||||
CDmaVar< float > m_flEndFrame;
|
||||
CDmaVar< bool > m_bSpline;
|
||||
CDmaVar< bool > m_bCrossfade;
|
||||
CDmaVar< bool > m_bNoBlend;
|
||||
CDmaVar< bool > m_bLocal;
|
||||
CDmaString m_sPoseParameterName;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC seq blend/calcblend base class
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceBlendBase : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceBlendBase, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaString m_sPoseParameterName;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC seq blend
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceBlend : public CDmeSequenceBlendBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceBlend, CDmeSequenceBlendBase );
|
||||
|
||||
public:
|
||||
CDmaVar< float > m_flParamStart;
|
||||
CDmaVar< float > m_flParamEnd;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// QC seq calcblend
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceCalcBlend : public CDmeSequenceBlendBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceCalcBlend, CDmeSequenceBlendBase );
|
||||
|
||||
public:
|
||||
CDmaString m_sAttachmentName;
|
||||
CDmaElement< CDmeMotionControl > m_eMotionControl;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// CDmeSequenceBase - Base Class For CDmeSequence & CDmeMultiSequence
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceBase : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceBase, CDmElement );
|
||||
|
||||
public:
|
||||
CDmaElement< CDmeSequenceActivity > m_eActivity; // QC activity
|
||||
CDmaVar< bool > m_bHidden; // QC hidden
|
||||
CDmaVar< bool > m_bDelta; // QC delta
|
||||
CDmaVar< bool > m_bWorldSpace; // QC worldspace
|
||||
CDmaVar< bool > m_bPreDelta; // QC predelta
|
||||
CDmaVar< bool > m_bAutoPlay; // QC autoplay
|
||||
CDmaVar< bool > m_bRealtime; // QC realtime
|
||||
CDmaVar< float > m_flFadeIn; // QC fadein
|
||||
CDmaVar< float > m_flFadeOut; // QC fadeout
|
||||
CDmaString m_sEntryNode; // QC node, transition, rtransition
|
||||
CDmaString m_sExitNode; // QC node, transition, rtransition
|
||||
CDmaVar< bool > m_bReverseNodeTransition; // QC rtransition
|
||||
|
||||
CDmaVar< bool > m_bSnap; // QC snap - Both Sequence & Animation
|
||||
CDmaVar< bool > m_bPost; // QC post - Both Sequence & Animation
|
||||
CDmaVar< bool > m_bLoop; // QC loop - Both Sequence & Animation
|
||||
|
||||
CDmaElementArray< CDmeIkLock > m_eIkLockList;
|
||||
CDmaElementArray< CDmeAnimationEvent > m_eAnimationEventList;
|
||||
CDmaElementArray< CDmeSequenceLayerBase > m_eLayerList;
|
||||
CDmaString m_sKeyValues; // Sequence KeyValues
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// qsort function for sorting DmeBaseSequence elements based on type and
|
||||
// sequence references.
|
||||
//
|
||||
// * A DmeBaseSequence must be either a DmeSequence or a DmeMultiSequence
|
||||
// They are mutually exclusive, cannot be both
|
||||
// * DmeMultiSequence refer to DmeSequence's so should always go last
|
||||
// * DmeMultiSequence cannot refer to other DmeMultiSequence so they are
|
||||
// considered equal
|
||||
// * DmeSequence can refer to other DmeSequence elements via DmeAnimCmd's
|
||||
// but circular references are not allowed. If a DmeSequence refers
|
||||
// to another, the DmeSequence being referenced needs to be before the
|
||||
// DmeSequence doing the referring
|
||||
// * If no referrals between two DmeSequence's, sort based on DmeAnimCmd count
|
||||
// so DmeSequence's with fewer DmeAnimCmd's go first
|
||||
//-----------------------------------------------------------------------------
|
||||
static int QSortFunction( const void *pVoidSeq1, const void *pVoidSeq2 );
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Animation data
|
||||
//
|
||||
// QC $sequence
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequence : public CDmeSequenceBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequence, CDmeSequenceBase );
|
||||
|
||||
public:
|
||||
CDmaElement< CDmeDag > m_eSkeleton;
|
||||
CDmaElement< CDmeAnimationList > m_eAnimationList; // QC animation file
|
||||
|
||||
CDmaVar< float > m_flFPS; // QC fps
|
||||
CDmaVar< Vector > m_vOrigin; // QC origin
|
||||
CDmaVar< float > m_flScale; // QC scale
|
||||
CDmaVar< int > m_nStartLoop; // QC startloop
|
||||
CDmaVar< bool > m_bForceLoop; // QC !( noforceloop )
|
||||
CDmaVar< bool > m_bAutoIk; // QC autoik / noautoik
|
||||
CDmaVar< float > m_flMotionRollback; // QC motionrollback
|
||||
CDmaVar< bool > m_bAnimBlocks; // QC !( noanimblock )
|
||||
CDmaVar< bool > m_bAnimBlockStall; // QC !( noanimblockstalls )
|
||||
CDmaElement< CDmeMotionControl > m_eMotionControl; // QC STUDIO_X, etc...
|
||||
|
||||
CDmaElementArray< CDmeAnimCmd > m_eAnimationCommandList;
|
||||
CDmaElementArray< CDmeIkRule > m_eIkRuleList;
|
||||
CDmaElement< CDmeBoneMask > m_eBoneMask;
|
||||
|
||||
CDmeChannelsClip *GetDmeChannelsClip() const;
|
||||
|
||||
DmeFramerate_t GetFrameRate(
|
||||
DmeFramerate_t fallbackFrameRate = DmeFramerate_t( 30 ),
|
||||
bool bForceFallback = false ) const;
|
||||
|
||||
// Gets the maximum frame count from all animations in the DmeSequence
|
||||
int GetFrameCount(
|
||||
DmeFramerate_t fallbackFrameRate = DmeFramerate_t( 30 ),
|
||||
bool bForceFallback = false ) const;
|
||||
|
||||
// Put all DmeChannel's in this DmeSequence to CM_PLAY
|
||||
void PrepareChannels( CUtlVector< IDmeOperator * > &dmeOperatorList );
|
||||
|
||||
// Operate all DmeChannel's in this DmeSequence
|
||||
// Pass the dmeOperatorList returned by PrepareChannels
|
||||
void UpdateChannels( CUtlVector< IDmeOperator * > &dmeOperatorList, DmeTime_t nClipTime );
|
||||
|
||||
void GetDependentOperators( CUtlVector< IDmeOperator * > &operatorList, CDmeOperator *pDmeOperator ) const;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Animation data
|
||||
//
|
||||
// QC $sequence
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeMultiSequence : public CDmeSequenceBase
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeMultiSequence, CDmeSequenceBase );
|
||||
|
||||
public:
|
||||
|
||||
CDmaVar< int > m_nBlendWidth; // QC blendwidth
|
||||
CDmaElement< CDmeSequence > m_eBlendRef; // QC blendref
|
||||
CDmaElement< CDmeSequence > m_eBlendComp; // QC blendcomp
|
||||
CDmaElement< CDmeSequence > m_eBlendCenter; // QC blendcenter
|
||||
CDmaElementArray< CDmeSequence > m_eSequenceList;
|
||||
CDmaElementArray< CDmeSequenceBlendBase > m_eBlendList;
|
||||
};
|
||||
|
||||
|
||||
#endif // DMESEQUENCE_H
|
||||
52
public/mdlobjects/dmesequencelist.h
Normal file
52
public/mdlobjects/dmesequencelist.h
Normal file
@@ -0,0 +1,52 @@
|
||||
//====== Copyright <20> 1996-2008, Valve Corporation, All rights reserved. =====//
|
||||
//
|
||||
// A list of DmeSequences's
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#ifndef DMESEQUENCELIST_H
|
||||
#define DMESEQUENCELIST_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
#include "tier1/utlvector.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceBase;
|
||||
class CDmeIkChain;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// A class representing a list of sequences
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSequenceList : public CDmeMdlList
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSequenceList, CDmeMdlList );
|
||||
|
||||
public:
|
||||
virtual CDmAttribute *GetListAttr() { return m_Sequences.GetAttribute(); }
|
||||
|
||||
CDmaElementArray< CDmeSequenceBase> m_Sequences;
|
||||
CDmaElementArray< CDmeIkChain > m_eIkChainList;
|
||||
|
||||
// Returns a sorted of the sequences in the m_Sequences attribute in order of priority
|
||||
// Sequences that are referred to come before the sequences that refer to them
|
||||
void GetSortedSequenceList( CUtlVector< CDmeSequenceBase * > &sortedSequenceList ) const;
|
||||
|
||||
// Sorts the sequences in the m_Sequences attribute in order of priority
|
||||
// Sequences that are referred to come before the sequences that refer to them
|
||||
void SortSequences();
|
||||
};
|
||||
|
||||
|
||||
#endif // DMESEQUENCELIST_H
|
||||
91
public/mdlobjects/dmeskinner.h
Normal file
91
public/mdlobjects/dmeskinner.h
Normal file
@@ -0,0 +1,91 @@
|
||||
//====== Copyright <20> 1996-2009, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// DmeSkinner
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
|
||||
#ifndef DMESKINNER_H
|
||||
#define DMESKINNER_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "datamodel/dmattributevar.h"
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
#include "movieobjects/dmejoint.h"
|
||||
#include "movieobjects/dmedag.h"
|
||||
#include "movieobjects/dmemesh.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeModel;
|
||||
class CDmeDag;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeSkinnerVolume
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSkinnerVolume : public CDmElement
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSkinnerVolume, CDmElement );
|
||||
|
||||
public:
|
||||
enum FalloffType_t
|
||||
{
|
||||
FT_LINEAR = 0,
|
||||
FT_SMOOTH = 1,
|
||||
FT_SPIKE = 2,
|
||||
FT_DOME = 3
|
||||
};
|
||||
|
||||
bool IsEllipse() const { return m_flPowerXZ == 1.0 && m_flPowerY == 1.0; }
|
||||
bool IsSuper() const { return m_flPowerXZ != 1.0 || m_flPowerY != 1.0; }
|
||||
|
||||
CDmaVar< VMatrix > m_mMatrix;
|
||||
CDmaVar< float > m_flStrength;
|
||||
CDmaVar< float > m_flFalloff;
|
||||
CDmaVar< int > m_nFalloffType; // 0:Linear, 1:Smooth, 2:Spike, 3:Dome
|
||||
CDmaVar< float > m_flPowerY;
|
||||
CDmaVar< float > m_flPowerXZ;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeSkinnerJoint
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSkinnerJoint : public CDmeJoint
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSkinnerJoint, CDmeJoint );
|
||||
|
||||
public:
|
||||
CDmAttribute *GetListAttr() { return m_eVolumeList.GetAttribute(); }
|
||||
|
||||
CDmaVar< VMatrix > m_mBindWorldMatrix;
|
||||
CDmaElementArray< CDmeSkinnerVolume > m_eVolumeList;
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// DmeSkinner
|
||||
//-----------------------------------------------------------------------------
|
||||
class CDmeSkinner : public CDmeDag
|
||||
{
|
||||
DEFINE_ELEMENT( CDmeSkinner, CDmeDag );
|
||||
|
||||
public:
|
||||
CDmAttribute *GetListAttr() { return m_Children.GetAttribute(); }
|
||||
|
||||
bool ReskinMeshes( CDmeModel *pDmeModel, int nJointPerVertexCount );
|
||||
|
||||
bool ReskinMesh( CDmeModel *pDmeModel, CDmeMesh *pDmeMesh, int nJointPerVertexCount );
|
||||
|
||||
};
|
||||
|
||||
#endif // DMESKINNER_H
|
||||
103
public/mdlobjects/mdlobjects.cpp
Normal file
103
public/mdlobjects/mdlobjects.cpp
Normal file
@@ -0,0 +1,103 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose: See notes below
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#include "mdlobjects/mdlobjects.h"
|
||||
#include "datamodel/dmelementfactoryhelper.h"
|
||||
|
||||
// YOU MUST INCLUDE THIS FILE INTO ANY PROJECT WHICH USES THE mdlobjects.lib FILE
|
||||
// This hack causes the class factories for the element types to be imported into the compiled code...
|
||||
|
||||
// MDL types
|
||||
USING_ELEMENT_FACTORY( DmeMdlList );
|
||||
USING_ELEMENT_FACTORY( DmeBBox );
|
||||
USING_ELEMENT_FACTORY( DmeHitbox );
|
||||
USING_ELEMENT_FACTORY( DmeHitboxSet );
|
||||
USING_ELEMENT_FACTORY( DmeHitboxSetList );
|
||||
USING_ELEMENT_FACTORY( DmeBodyPart );
|
||||
USING_ELEMENT_FACTORY( DmeBlankBodyPart );
|
||||
USING_ELEMENT_FACTORY( DmeLOD );
|
||||
USING_ELEMENT_FACTORY( DmeLODList );
|
||||
USING_ELEMENT_FACTORY( DmeCollisionModel );
|
||||
USING_ELEMENT_FACTORY( DmeJointConstrain );
|
||||
USING_ELEMENT_FACTORY( DmeJointAnimatedFriction );
|
||||
USING_ELEMENT_FACTORY( DmeCollisionJoint );
|
||||
USING_ELEMENT_FACTORY( DmeCollisionJoints );
|
||||
USING_ELEMENT_FACTORY( DmeBodyGroup );
|
||||
USING_ELEMENT_FACTORY( DmeBodyGroupList );
|
||||
USING_ELEMENT_FACTORY( DmeBoneWeight );
|
||||
USING_ELEMENT_FACTORY( DmeBoneMask );
|
||||
USING_ELEMENT_FACTORY( DmeBoneMaskList );
|
||||
USING_ELEMENT_FACTORY( DmeMotionControl );
|
||||
USING_ELEMENT_FACTORY( DmeIkChain );
|
||||
USING_ELEMENT_FACTORY( DmeIkRange );
|
||||
USING_ELEMENT_FACTORY( DmeIkLock );
|
||||
USING_ELEMENT_FACTORY( DmeIkRule );
|
||||
USING_ELEMENT_FACTORY( DmeIkTouchRule );
|
||||
USING_ELEMENT_FACTORY( DmeIkFootstepRule );
|
||||
USING_ELEMENT_FACTORY( DmeIkReleaseRule );
|
||||
USING_ELEMENT_FACTORY( DmeIkAttachmentRule );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmd );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdFixupLoop );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdWeightList );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdSubtract );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdAlign );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdRotateTo );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdWalkFrame );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdCompress );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdDerivative );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdLinearDelta );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdSplineDelta );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdNumFrames );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdPreSubtract );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdLocalHierarchy );
|
||||
USING_ELEMENT_FACTORY( DmeAnimCmdNoAnimation );
|
||||
USING_ELEMENT_FACTORY( DmeAnimationEvent );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceActivity );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceBlendBase );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceBlend );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceCalcBlend );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceBase );
|
||||
USING_ELEMENT_FACTORY( DmeSequence );
|
||||
USING_ELEMENT_FACTORY( DmeMultiSequence );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceList );
|
||||
USING_ELEMENT_FACTORY( DmeIncludeModelList );
|
||||
USING_ELEMENT_FACTORY( DmeDefineBone );
|
||||
USING_ELEMENT_FACTORY( DmeDefineBoneList );
|
||||
USING_ELEMENT_FACTORY( DmeMaterialGroup );
|
||||
USING_ELEMENT_FACTORY( DmeMaterialGroupList );
|
||||
USING_ELEMENT_FACTORY( DmeEyeballGlobals );
|
||||
USING_ELEMENT_FACTORY( DmeEyeball );
|
||||
USING_ELEMENT_FACTORY( DmeSkinnerVolume );
|
||||
USING_ELEMENT_FACTORY( DmeSkinnerJoint );
|
||||
USING_ELEMENT_FACTORY( DmeSkinner );
|
||||
USING_ELEMENT_FACTORY( DmePoseParameter );
|
||||
USING_ELEMENT_FACTORY( DmePoseParameterList );
|
||||
USING_ELEMENT_FACTORY( DmeAnimBlockSize );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceLayerBase );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceAddLayer );
|
||||
USING_ELEMENT_FACTORY( DmeSequenceBlendLayer );
|
||||
USING_ELEMENT_FACTORY( DmeAssetRoot );
|
||||
USING_ELEMENT_FACTORY( DmeRelatedAsset );
|
||||
USING_ELEMENT_FACTORY( DmeElementGroup );
|
||||
USING_ELEMENT_FACTORY( DmeBoneFlexDriverControl );
|
||||
USING_ELEMENT_FACTORY( DmeBoneFlexDriver );
|
||||
USING_ELEMENT_FACTORY( DmeBoneFlexDriverList );
|
||||
USING_ELEMENT_FACTORY( DmeProceduralBone );
|
||||
USING_ELEMENT_FACTORY( DmeJiggleBone );
|
||||
USING_ELEMENT_FACTORY( DmeMatSysPanelSettings );
|
||||
USING_ELEMENT_FACTORY( DmeMatSysRoot );
|
||||
USING_ELEMENT_FACTORY( DmeMatSysMDLDag );
|
||||
USING_ELEMENT_FACTORY( DmeMatSysDMXDag );
|
||||
USING_ELEMENT_FACTORY( DmeMatSysMPPDag );
|
||||
USING_ELEMENT_FACTORY( DmeAssemblyCommand );
|
||||
USING_ELEMENT_FACTORY( DmeAnimationAssemblyCommand );
|
||||
USING_ELEMENT_FACTORY( DmeFixupLoop );
|
||||
USING_ELEMENT_FACTORY( DmeSubtract );
|
||||
USING_ELEMENT_FACTORY( DmePreSubtract );
|
||||
USING_ELEMENT_FACTORY( DmeRotateTo );
|
||||
USING_ELEMENT_FACTORY( DmeBoneMaskCmd );
|
||||
USING_ELEMENT_FACTORY( DmeEyelid );
|
||||
USING_ELEMENT_FACTORY( DmeMouth );
|
||||
60
public/mdlobjects/mdlobjects.h
Normal file
60
public/mdlobjects/mdlobjects.h
Normal file
@@ -0,0 +1,60 @@
|
||||
//====== Copyright <20> 1996-2004, Valve Corporation, All rights reserved. =======
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
#ifndef MDLOBJECTS_H
|
||||
#define MDLOBJECTS_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
#include "mdlobjects/dmemdllist.h"
|
||||
#include "mdlobjects/dmebbox.h"
|
||||
#include "mdlobjects/dmehitbox.h"
|
||||
#include "mdlobjects/dmehitboxset.h"
|
||||
#include "mdlobjects/dmehitboxsetlist.h"
|
||||
#include "mdlobjects/dmebodypart.h"
|
||||
#include "mdlobjects/dmeblankbodypart.h"
|
||||
#include "mdlobjects/dmelod.h"
|
||||
#include "mdlobjects/dmelodlist.h"
|
||||
#include "mdlobjects/dmecollisionmodel.h"
|
||||
#include "mdlobjects/dmecollisionjoints.h"
|
||||
#include "mdlobjects/dmebodygroup.h"
|
||||
#include "mdlobjects/dmebodygrouplist.h"
|
||||
#include "mdlobjects/dmeboneweight.h"
|
||||
#include "mdlobjects/dmebonemask.h"
|
||||
#include "mdlobjects/dmebonemasklist.h"
|
||||
#include "mdlobjects/dmemotioncontrol.h"
|
||||
#include "mdlobjects/dmeik.h"
|
||||
#include "mdlobjects/dmeanimcmd.h"
|
||||
#include "mdlobjects/dmesequence.h"
|
||||
#include "mdlobjects/dmesequencelist.h"
|
||||
#include "mdlobjects/dmeincludemodellist.h"
|
||||
#include "mdlobjects/dmedefinebone.h"
|
||||
#include "mdlobjects/dmedefinebonelist.h"
|
||||
#include "mdlobjects/dmematerialgroup.h"
|
||||
#include "mdlobjects/dmematerialgrouplist.h"
|
||||
#include "mdlobjects/dmeeyeballglobals.h"
|
||||
#include "mdlobjects/dmeeyeball.h"
|
||||
#include "mdlobjects/dmeskinner.h"
|
||||
#include "mdlobjects/dmeposeparameter.h"
|
||||
#include "mdlobjects/dmeposeparameterlist.h"
|
||||
#include "mdlobjects/dmeanimblocksize.h"
|
||||
#include "mdlobjects/dmeasset.h"
|
||||
#include "mdlobjects/dmeelementgroup.h"
|
||||
#include "mdlobjects/dmeboneflexdriver.h"
|
||||
#include "mdlobjects/dmeproceduralbone.h"
|
||||
#include "mdlobjects/dmejigglebone.h"
|
||||
#include "mdlobjects/dmematsysroot.h"
|
||||
#include "mdlobjects/dmeassemblycommand.h"
|
||||
#include "mdlobjects/dmeanimationassemblycommand.h"
|
||||
#include "mdlobjects/dmeeyelid.h"
|
||||
#include "mdlobjects/dmemouth.h"
|
||||
|
||||
|
||||
#endif // MDLOBJECTS_H
|
||||
83
public/mdlobjects/mpp_utils.h
Normal file
83
public/mdlobjects/mpp_utils.h
Normal file
@@ -0,0 +1,83 @@
|
||||
//===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. =====
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
|
||||
#ifndef MDLOBJECTS_UTILS_H
|
||||
#define MDLOBJECTS_UTILS_H
|
||||
|
||||
|
||||
#if defined( _WIN32 )
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
// Valve includes
|
||||
#include "movieobjects/dmechannel.h"
|
||||
#include "movieobjects/dmemodel.h"
|
||||
#include "mdlobjects/dmeasset.h"
|
||||
#include "mdlobjects/dmesequence.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "tier1/utlstring.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Ok to pass NULL
|
||||
//-----------------------------------------------------------------------------
|
||||
void ReorientMppFile( CDmElement *pDmElementRoot, bool bMakeZUp );
|
||||
void MppReorient( CDmElement *pDmElementRoot, bool bMakeZUp );
|
||||
|
||||
void GetAbsMotion( CDmeChannel **ppDmePChannel, CDmeChannel **ppDmeOChannel, CDmeDag *pDmeDag );
|
||||
bool SetAbsMotion( CDmeDag *pDmeDag, CDmeChannel *pDmePositionChannel, CDmeChannel *pDmeOrientationChannel );
|
||||
|
||||
// Creates a guaranteed unique DmFileId_t
|
||||
DmFileId_t CreateUniqueDmFileId();
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Iterates over all CDmeSequence's in the MPP File (Not CDmeMultiSequence)
|
||||
// Get() only returns NULL if IsDone() also returns true so this usage is safe
|
||||
//
|
||||
// for ( MppSequenceIt sIt( pDmeAssetRoot ); !sIt.IsDone(); sIt.Next() )
|
||||
// {
|
||||
// sIt.Get()->SomeFunctionOnCDmeSequence()
|
||||
// }
|
||||
//-----------------------------------------------------------------------------
|
||||
class MppSequenceIt
|
||||
{
|
||||
public:
|
||||
MppSequenceIt( CDmeAssetRoot *pDmeAssetRoot );
|
||||
CDmeSequence *Get() const;
|
||||
bool IsDone() const;
|
||||
void Next();
|
||||
void Reset();
|
||||
|
||||
protected:
|
||||
CUtlVector< DmElementHandle_t > m_hDmeSequenceList;
|
||||
int m_nSequenceIndex;
|
||||
};
|
||||
|
||||
// Masks for MppGetSkeletonLIst
|
||||
enum MppSkeletonMask_t
|
||||
{
|
||||
MPP_ANIM_SKELETON_MASK = 1 << 0,
|
||||
MPP_PHYSICS_SKELETON_MASK = 1 << 1,
|
||||
MPP_MODEL_SKELETON_MASK = 1 << 2,
|
||||
MPP_ALL_SKELETON_MASK = MPP_ANIM_SKELETON_MASK | MPP_PHYSICS_SKELETON_MASK | MPP_MODEL_SKELETON_MASK
|
||||
};
|
||||
|
||||
// Returns a list of all unique skeletons under the specified MPP DmeAssetRoot
|
||||
void MppGetSkeletonList( CUtlVector< CDmeModel * > &skeletonList, CDmeAssetRoot *pDmeAssetRoot, int nMppSkeletonMask = MPP_ALL_SKELETON_MASK );
|
||||
|
||||
// Connects all of the non-animation skeletons to each animation skeleton via DmeConnectionOperators
|
||||
DmFileId_t MppConnectSkeletonsForAnimation( CDmeAssetRoot *pDmeAssetRoot );
|
||||
|
||||
// Disconnects all of the non-animation skeletons from each animation skeleton
|
||||
// and destroys the elements created by MppConnectSkeletonsForAnimation
|
||||
void MppDisconnectSkeletonsFromAnimation( CDmeAssetRoot *pDmeAssetRoot );
|
||||
|
||||
// Utility to return DmElement id as name:string
|
||||
CUtlString ComputeDmElementIdStr( const CDmElement *pDmElement );
|
||||
|
||||
#endif // MDLOBJECTS_UTILS_H
|
||||
214
public/mdlobjects/physmodelsource.h
Normal file
214
public/mdlobjects/physmodelsource.h
Normal file
@@ -0,0 +1,214 @@
|
||||
//===== Copyright <20> Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// This is a declaration of an abstraction of data used to generate collision mesh and potentially other physics data
|
||||
//
|
||||
#ifndef PHYS_MODEL_SOURCE_HDR
|
||||
#define PHYS_MODEL_SOURCE_HDR
|
||||
|
||||
#include "mathlib/aabb.h"
|
||||
#include "tier1/utlvector.h"
|
||||
#include "tier1/utlstringtoken.h"
|
||||
#include "bitvec.h"
|
||||
#include "meshutils/mesh.h"
|
||||
#include "movieobjects/dmemodel.h"
|
||||
#include "mathlib/transform.h"
|
||||
|
||||
class CMesh;
|
||||
|
||||
enum VertEnumFlagEnum_t
|
||||
{
|
||||
FLAG_ENUMERATE_VERTICES_WITH_SUBTREE = 1 << 0, // enumerate vertices belonging to the given bone and its children
|
||||
FLAG_ENUMERATE_VERTICES_ALL = 1 << 1
|
||||
};
|
||||
|
||||
void ComputeSubtree( const CDmeModel *pDmeModel, int nSubtreeTipBone, CVarBitVec *pSubtree );
|
||||
|
||||
// this is an adaptor class so that we can use render mesh or
|
||||
class CPhysModelSource
|
||||
{
|
||||
class CModel; // Source2 model; not supported in Source1
|
||||
public:
|
||||
CPhysModelSource():
|
||||
m_pRenderModel( NULL ),
|
||||
m_pDmeModel( NULL )
|
||||
{
|
||||
|
||||
}
|
||||
CPhysModelSource( const CModel *pModel ):
|
||||
m_pRenderModel( pModel ),
|
||||
m_pDmeModel( NULL )
|
||||
{
|
||||
}
|
||||
|
||||
CPhysModelSource( CDmeModel *pModel ):
|
||||
m_pRenderModel( NULL ),
|
||||
m_pDmeModel( pModel )
|
||||
{
|
||||
}
|
||||
|
||||
CPhysModelSource( const CPhysModelSource &source ):
|
||||
m_pRenderModel( source.m_pRenderModel ),
|
||||
m_pDmeModel( source.m_pDmeModel )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
~CPhysModelSource()
|
||||
{
|
||||
Purge();
|
||||
}
|
||||
|
||||
void SetRenderModel ( const CModel *pModel )
|
||||
{
|
||||
Purge();
|
||||
m_pRenderModel = pModel;
|
||||
}
|
||||
|
||||
void SetDmeModel( CDmeModel *pModel )
|
||||
{
|
||||
Purge();
|
||||
m_pDmeModel = pModel;
|
||||
}
|
||||
|
||||
const CModel *const GetRenderModel() const { return m_pRenderModel; }
|
||||
CDmeModel *GetDmeModel() const { return m_pDmeModel; }
|
||||
|
||||
void Purge()
|
||||
{
|
||||
m_DmeMeshCache.PurgeAndDeleteElements();
|
||||
m_pDmeModel = NULL;
|
||||
m_pRenderModel = NULL;
|
||||
}
|
||||
|
||||
bool IsValid()const
|
||||
{
|
||||
return m_pRenderModel || m_pDmeModel;
|
||||
}
|
||||
|
||||
int GetBoneCount()const;
|
||||
const char *GetBoneNameByIndex( int nIndex )const;
|
||||
|
||||
int FindBoneByName( const char *pName )const
|
||||
{
|
||||
for ( int i = 0; i < GetBoneCount(); ++i )
|
||||
{
|
||||
if ( !V_stricmp( GetBoneNameByIndex( i ), pName ) )
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void GetBoneTriangles( CUtlStringToken joint, uint nFlags, float flMinWeight, CUtlVector<Vector> &arrVertices, CUtlVector<uint> &arrIndices )const;
|
||||
bool BoneHasMeat( CUtlStringToken joint, uint nFlags, const CTransform &bindPose ) const;
|
||||
AABB_t GetBoneInfluenceBbox( CUtlStringToken joint, uint nFlags, const CTransform &bindPose, float flMinWeight = 0.5f )const;
|
||||
|
||||
static bool IsBitInSet( int nBit, const CVarBitVec &bonesInSubtree )
|
||||
{
|
||||
return uint( nBit ) < uint( bonesInSubtree.GetNumBits() ) && bonesInSubtree.IsBitSet( nBit );
|
||||
}
|
||||
|
||||
template <typename Fn>
|
||||
void EnumerateBoneVerts( CUtlStringToken joint, uint nFlags, Fn functor )const
|
||||
{
|
||||
/*
|
||||
if( GetRenderModel() )
|
||||
{
|
||||
::EnumerateBoneVerts( GetRenderModel(), joint, nFlags, functor );
|
||||
}
|
||||
else */if( m_pDmeModel )
|
||||
{
|
||||
CreateDmeModelCache();
|
||||
int nMeshBoneIndex = m_pDmeModel->GetJointIndex( joint );
|
||||
|
||||
for( int nMesh = 0; nMesh < m_DmeMeshCache.Count(); ++nMesh )
|
||||
{
|
||||
CMesh *pMesh = m_DmeMeshCache[nMesh];
|
||||
CMesh::SkinningDataFields_t skinData;
|
||||
CVarBitVec bonesInSubtree( m_pDmeModel->GetJointCount() );
|
||||
if( nMeshBoneIndex >= 0 )
|
||||
{
|
||||
bonesInSubtree.Set( nMeshBoneIndex );
|
||||
skinData = pMesh->GetSkinningDataFields();
|
||||
if( nFlags & FLAG_ENUMERATE_VERTICES_WITH_SUBTREE )
|
||||
{
|
||||
ComputeSubtree( m_pDmeModel, nMeshBoneIndex, &bonesInSubtree );
|
||||
}
|
||||
}
|
||||
|
||||
if( ( nFlags & FLAG_ENUMERATE_VERTICES_ALL ) || ( !skinData.HasSkinningData() && IsBitInSet( GetDmeDagIndex( nMesh ), bonesInSubtree ) ) )
|
||||
{
|
||||
for( int nVert = 0; nVert < pMesh->VertexCount(); ++nVert )
|
||||
{
|
||||
// this vertex belongs to this joint
|
||||
functor( pMesh->GetVertexPosition( nVert ), 1.0f );
|
||||
}
|
||||
}
|
||||
else if( skinData.HasSkinningData() )
|
||||
{
|
||||
for( int nVert = 0; nVert < pMesh->VertexCount(); ++nVert )
|
||||
{
|
||||
// this vertex belongs to this joint
|
||||
float flWeight = pMesh->GetVertexJointSumWeight( skinData, nVert, bonesInSubtree );
|
||||
functor( pMesh->GetVertexPosition( nVert ), flWeight );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct Stats_t
|
||||
{
|
||||
int m_nVertCount;
|
||||
int m_nTriCount;
|
||||
int m_nMeshCount;
|
||||
|
||||
Stats_t()
|
||||
{
|
||||
m_nVertCount = 0;
|
||||
m_nTriCount = 0;
|
||||
m_nMeshCount = 0;
|
||||
}
|
||||
|
||||
void operator += ( const Stats_t &that )
|
||||
{
|
||||
m_nTriCount += that.m_nTriCount;
|
||||
m_nVertCount += that.m_nVertCount;
|
||||
m_nMeshCount += that.m_nMeshCount;
|
||||
}
|
||||
};
|
||||
Stats_t GetStats( )const;
|
||||
|
||||
int GetParentJoint( int nJoint )const;
|
||||
void GetBoneSubtree( int nBone, CVarBitVec *pSubtree ) const; // this is O(N) algorithm : starting from the given bone, it finds all (grand)children of that bone and sets corresponding bits in pSubtree; pSubtree must be pre-allocated with the desired number of bones
|
||||
CTransform GetBindPoseParentTransform( int nJointIndex )const;
|
||||
void GetBindPoseWorldTransforms( CUtlVector< CTransform > &transforms )const;
|
||||
bool GetAnimFrame( const char *pAnimName, float flCycle, CUtlVector< CTransform > *pTransformsOut )const;
|
||||
|
||||
int GetDmeDagIndex( int nMesh )const;
|
||||
|
||||
protected:
|
||||
void CreateDmeModelCache()const;
|
||||
protected:
|
||||
const CModel *m_pRenderModel;
|
||||
CDmeModel *m_pDmeModel;
|
||||
mutable CUtlVector< CMesh* > m_DmeMeshCache;
|
||||
mutable CUtlVector< int > m_DmeDagIndexCache; // for each DmeMesh, this is the index of DmeDag in the Dme Model
|
||||
};
|
||||
|
||||
|
||||
inline void AdjustLegacyDotaOrientation( CUtlVector< CTransform > &transforms )
|
||||
{
|
||||
float sin45 = sqrtf( .5f );
|
||||
CTransform root( vec3_origin, Quaternion( 0, 0, sin45, sin45 ) * Quaternion( sin45, 0, 0, sin45 ) );
|
||||
for ( int nBone = 0; nBone < transforms.Count( ); ++nBone )
|
||||
{
|
||||
transforms[ nBone ] = ConcatTransforms( root, transforms[ nBone ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//void GetBoneTriangles( const CModel *pModel, CUtlStringToken joint, uint nFlags, float flMinWeight, CUtlVector<Vector> &arrVertices, CUtlVector<uint> &arrIndices );
|
||||
|
||||
|
||||
#endif
|
||||
43
public/mdlobjects/vpropbreakabledata.h
Normal file
43
public/mdlobjects/vpropbreakabledata.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//========== Copyright (c) Valve Corporation. All Rights Reserved. ============
|
||||
#ifndef PROP_BREAKABLE_DATA
|
||||
#define PROP_BREAKABLE_DATA
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "resourcefile/resourcefile.h"
|
||||
|
||||
#define META( X )
|
||||
//#define DECLARE_SCHEMA_DATA_CLASS( X )
|
||||
#define DECLARE_SCHEMA_ENUM( X )
|
||||
|
||||
|
||||
schema enum multiplayerBreak_t
|
||||
{
|
||||
MULTIPLAYER_BREAK_SERVER,
|
||||
MULTIPLAYER_BREAK_CLIENT
|
||||
};
|
||||
DECLARE_SCHEMA_ENUM( multiplayerBreak_t );
|
||||
|
||||
|
||||
// Runtime class compiled from schema class CPhysPartBreakableData (open file://src\public\mdlobjects\authphysmodel.h)
|
||||
schema class VpropBreakablePartData_t
|
||||
{
|
||||
TYPEMETA( MNoScatter )
|
||||
DECLARE_SCHEMA_DATA_CLASS( VpropBreakablePartData_t );
|
||||
|
||||
bool m_bMotionDisabled; META( MPropertyFriendlyName = "Motion Disabled" );
|
||||
bool m_bNoShadows; META( MPropertyFriendlyName = "Do Not Cast Shadows" );
|
||||
int32 m_nHealth;META( MPropertyFriendlyName = "Health" );
|
||||
int32 m_nFadeTime;META( MPropertyFriendlyName = "Fade Time" );
|
||||
int32 m_nFadeMin;META( MPropertyFriendlyName = "Fade Min Distance" );
|
||||
int32 m_nFadeMax;META( MPropertyFriendlyName = "Fade Max Distance" );
|
||||
float32 m_flBurstScale; META( MPropertyFriendlyName = "Burst Scale" );
|
||||
float32 m_flBurstRandomize; META( MPropertyFriendlyName = "Burst Randomize" );
|
||||
uint32 m_nSurfaceProp; META( MPropertyFriendlyName = "Surface Prop Hash" );
|
||||
uint32 m_nCollisionGroupHash; META( MPropertyFriendlyName = "Collision Group Hash" );
|
||||
};
|
||||
|
||||
|
||||
#endif // PROP_BREAKABLE_DATA
|
||||
Reference in New Issue
Block a user