3 #include "MeshEntity.h" 22 virtual IAttributeFields* GetChildAttributeObject(
int nRowIndex,
int nColumnIndex = 0);
24 ATTRIBUTE_METHOD1(
ParaXEntity, GetFileName_s,
const char**) { *p1 = cls->GetFileName().c_str();
return S_OK; }
26 ATTRIBUTE_METHOD1(
ParaXEntity, DumpTextureUsage_s,
const char**) { *p1 = cls->DumpTextureUsage();
return S_OK; }
27 ATTRIBUTE_METHOD1(
ParaXEntity, GetPolyCount_s,
int*) { *p1 = cls->GetPolyCount();
return S_OK; }
28 ATTRIBUTE_METHOD1(
ParaXEntity, GetPhysicsCount_s,
int*) { *p1 = cls->GetPhysicsCount();
return S_OK; }
39 virtual HRESULT InitDeviceObjects();
40 virtual HRESULT DeleteDeviceObjects();
59 void Refresh(
const char* sFilename=NULL,
bool bLazyLoad =
false);
94 int GetLodIndex(
float fCameraObjectDist,
float fScaling = 1.f)
const;
113 void Init(
const char* filename=NULL);
130 void SetPrimaryTechniqueHandle(
int nHandle);
131 int GetPrimaryTechniqueHandle();
138 std::vector<MeshLOD> m_MeshLODs;
141 int m_nTechniqueHandle;
virtual bool GetBoundingBox(Vector3 *pMin, Vector3 *pMax)
Get AABB bounding box of the asset object.
Definition: ParaXEntity.cpp:262
int GetPolyCount()
get polycount of this mesh object
Definition: ParaXEntity.cpp:284
HRESULT CreateModelFromFile_Async(void *pContext, RenderDevicePtr pDev=NULL, const char *sFileName=NULL)
this function is mostly used internally.
Definition: ParaXEntity.cpp:131
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
abstract class for all animation instance implementation.
Definition: AnimInstanceBase.h:66
void RemoveLodLevels(void)
Removes all LOD data from this Mesh.
Definition: ParaXEntity.cpp:243
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: ParaXEntity.cpp:302
int GetPhysicsCount()
get physics polycount of this mesh object
Definition: ParaXEntity.cpp:290
AssetType
each asset type has a unique asset type number
Definition: AssetEntity.h:82
different physics engine has different winding order.
Definition: EventBinding.h:32
a very thin wrapper to DirectX device with a portable version of openGL implementation.
Definition: RenderDeviceDirectX.h:10
const char * DumpTextureUsage()
get texture usage such as the number of textures and their sizes.
Definition: ParaXEntity.cpp:296
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
AssetManager manages a set of asset entities of a certain type.
Definition: AssetManager.h:13
void Refresh(const char *sFilename=NULL, bool bLazyLoad=false)
refresh this texture surface with a local file.
Definition: ParaXEntity.cpp:85
void UpdateManualLodLevel(int index, const std::string &sFilename)
Changes the alternate mesh to use as a manual LOD at the given index.
Definition: ParaXEntity.cpp:193
int GetLodIndex(float fCameraObjectDist, float fScaling=1.f) const
Retrieves the level of detail index for the given depth value.
Definition: ParaXEntity.cpp:206
Definition: ParaXEntity.h:9
CParaXModel * GetModel(int nLODIndex=0)
get the highest level mesh if LOD is enabled.
Definition: ParaXEntity.cpp:167
HRESULT CreateModelFromFile_Serial(RenderDevicePtr pDev=NULL, const char *sFileName=NULL)
this function is mostly used internally.
Definition: ParaXEntity.cpp:101
virtual int GetChildAttributeObjectCount(int nColumnIndex=0)
get the number of child objects (row count) in the given column.
Definition: ParaXEntity.cpp:274
virtual bool IsLoaded()
most assets are loaded asynchronously.
Definition: ParaXEntity.cpp:177
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
const std::string & GetFileName()
name of the model file(*.x) name holding the parax object get the mesh file name of the lowest level ...
Definition: ParaXEntity.cpp:155
void CreateMeshLODLevel(float fromDepth, const std::string &sFilename)
Adds a new level-of-detail entry to this Mesh.
Definition: ParaXEntity.cpp:182
virtual void Cleanup()
Clean up additional resources.
Definition: ParaXEntity.cpp:251
virtual IAttributeFields * GetAttributeObject()
get the attribute object of this asset.
Definition: ParaXEntity.cpp:257
CParaXProcessor implementation of IDataProcessor.
Definition: ContentLoaderParaX.h:47
int GetLodIndexSquaredDepth(float squaredDepth, float fScaling=1.f) const
Retrieves the level of detail index for the given squared depth value.
Definition: ParaXEntity.cpp:211
std::string AssetKey
the unique key object for asset entity.
Definition: AssetEntity.h:13
void Init(const char *filename=NULL)
init the parax model.
Definition: ParaXEntity.cpp:149
ParaX model is the model file for character animation, etc in the game world.
Definition: ParaXModel.h:30
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25