2 #include "AssetEntity.h" 3 #include "ParaXModel/ParaXModel.h" 4 #include "ParaXModel/ParaXStaticModel.h" 22 CParaXModelPtr m_pParaXMesh;
26 public std::binary_function<const MeshLOD&, const MeshLOD&, bool>
49 void Refresh(
const char* sFilename=NULL,
bool bLazyLoad =
false);
55 virtual bool IsLoaded();
58 const string& GetFileName();
60 void SetPrimaryTechniqueHandle(
int nHandle);
61 int GetPrimaryTechniqueHandle();
80 void CreateMeshLODLevel(
float fromDepth,
const string& sFilename);
89 void UpdateManualLodLevel(
int index,
const string& sFilename);
93 int GetLodIndex(
float depth)
const;
101 int GetLodIndexSquaredDepth(
float squaredDepth)
const;
104 void RemoveLodLevels(
void);
110 HRESULT CreateMeshFromFile_Serial(
RenderDevicePtr pDev=NULL,
const char* sFileName=NULL);
118 HRESULT CreateMeshFromFile_Async(
void* pContext,
RenderDevicePtr pDev = NULL,
const char* sFileName = NULL);
122 :
AssetEntity(key),m_nTechniqueHandle(-1), m_pParamBlock(NULL), m_vMin(0,0,0), m_vMax(0,0,0)
126 virtual HRESULT InitDeviceObjects();
127 virtual HRESULT RestoreDeviceObjects();
128 virtual HRESULT InvalidateDeviceObjects();
129 virtual HRESULT DeleteDeviceObjects();
130 virtual void Cleanup();
144 void Init(
const char* sFilename=NULL);
149 const Vector3& GetAABBMin(){
return m_vMin;}
150 const Vector3& GetAABBMax(){
return m_vMax;}
161 std::vector<MeshLOD> m_MeshLODs;
164 int m_nTechniqueHandle;
std::string m_sMeshFileName
Only relevant if m_bIsLodManual is true, the name of the alternative mesh to use. ...
Definition: MeshEntity.h:18
CMeshProcessor implementation of IDataProcessor.
Definition: ContentLoaderMesh.h:51
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
float m_fromDepthSquared
squared Z value from which this LOD will apply
Definition: MeshEntity.h:15
a very thin wrapper to DirectX device with a portable version of openGL implementation.
Definition: RenderDeviceDirectX.h:10
A way of recording the way each LODs is recorded a static Mesh or ParaXMesh object.
Definition: MeshEntity.h:9
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
AssetManager manages a set of asset entities of a certain type.
Definition: AssetManager.h:13
The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseA...
Definition: PERefPtr.h:13
void SetAABB(const Vector3 *vMin, const Vector3 *vMax)
set AABB
Definition: MeshEntity.h:147
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
MeshEntity distinguish one template from other.
Definition: MeshEntity.h:38
Definition: MeshEntity.h:25
std::string AssetKey
the unique key object for asset entity.
Definition: AssetEntity.h:13
Definition: ParaXStaticBase.h:32
ref_ptr< CParaXStaticBase > m_pStaticMesh
Hard link to mesh to avoid looking up each time.
Definition: MeshEntity.h:21
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108