My Project
VoxelMesh.h
1 #pragma once
2 #include "TileObject.h"
3 #include "VoxelMesh/MetaWorldFragment.h"
4 
5 namespace ParaEngine
6 {
8  class CVoxelMesh : public CTileObject
9  {
10  public:
11  virtual CBaseObject::_SceneObjectType GetType(){return CBaseObject::VoxelMesh;};
12  CVoxelMesh(void);
13  virtual ~CVoxelMesh(void);
14 
16  virtual void Reset();
17 
20  virtual void SetScaling(float s);
21 
23  virtual float GetScaling();
24 
42  HRESULT InitObject(const char* sVoxelFile, const DVector3& vPos, TextureEntity* pTexture = NULL);
43 
44  // -- for rendering
45  virtual HRESULT Draw( SceneState * sceneState);
46 
47  virtual AssetEntity* GetPrimaryAsset(){return (AssetEntity*)m_pBaseTexture.get();};
48 
49 
52 
61  virtual int GetNumReplaceableTextures();
62 
71  virtual TextureEntity* GetReplaceableTexture(int ReplaceableTextureID);
72 
82  virtual bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity* pTextureEntity);
83 
84 
85  private:
87  std::string m_sVoxelFile;
88 
90  asset_ptr<TextureEntity> m_pBaseTexture;
91 
93  MetaWorldFragmentPtr m_pMetaWorldFragment;
94  };
95 }
96 
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
virtual float GetScaling()
get scaling
Definition: VoxelMesh.cpp:54
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
It&#39;s used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
A MetaWorldFragment is the basic building block of the world.
Definition: MetaWorldFragment.h:17
virtual void Reset()
reset the object to its default settings.
Definition: VoxelMesh.cpp:43
virtual MetaWorldFragment * GetMetaWorldFragment()
get the meta world fragment that this object is bound to.
Definition: VoxelMesh.cpp:142
virtual int GetNumReplaceableTextures()
get the total number of replaceable textures, which is the largest replaceable texture ID...
Definition: VoxelMesh.cpp:126
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual void SetScaling(float s)
set the scale of the object.
Definition: VoxelMesh.cpp:48
HRESULT InitObject(const char *sVoxelFile, const DVector3 &vPos, TextureEntity *pTexture=NULL)
init the object
Definition: VoxelMesh.cpp:59
virtual TextureEntity * GetReplaceableTexture(int ReplaceableTextureID)
get the current replaceable texture by its ID.
Definition: VoxelMesh.cpp:131
virtual HRESULT Draw(SceneState *sceneState)
only for drawable objects
Definition: VoxelMesh.cpp:77
virtual bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity *pTextureEntity)
set the replaceable texture at the given index with a new texture.
Definition: VoxelMesh.cpp:136
Tile Object have position and bounding rect and can usually be attached to quad-tree terrain tile...
Definition: TileObject.h:10
A voxel based mesh in the 3d scene.
Definition: VoxelMesh.h:8
virtual AssetEntity * GetPrimaryAsset()
Set scaling.
Definition: VoxelMesh.h:47
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25