Drag[en]gine Game Engine  1.21
deOcclusionMesh Class Reference

Occlusion Mesh. More...

#include <deOcclusionMesh.h>

Inheritance diagram for deOcclusionMesh:
deFileResource deResource deObject

Public Types

typedef deTObjectReference< deOcclusionMeshRef
 Type holding strong reference. More...
 
- Public Types inherited from deResource
typedef deTObjectReference< deResourceRef
 Type holding strong reference. More...
 
- Public Types inherited from deObject
typedef deTObjectReference< deObjectRef
 Type holding strong reference. More...
 

Public Member Functions

Management
bool Verify () const
 Verify the mesh. More...
 
void Prepare ()
 Prepare mesh for later use. More...
 
Bones
int GetBoneCount () const
 Number of bones. More...
 
void SetBoneCount (int count)
 Set number of bones. More...
 
deOcclusionMeshBoneGetBoneAt (int index) const
 Retrieves a bone by index. More...
 
deOcclusionMeshBoneGetBones () const
 Pointer to the bones. More...
 
int IndexOfBoneNamed (const char *name) const
 Index of the bone with the given name or -1 if not found. More...
 
bool HasBoneNamed (const char *name) const
 Determiens if a bone with the given name exists. More...
 
Weight Sets
int GetWeightCount () const
 Number of weights. More...
 
void SetWeightCount (int count)
 Set number of weights. More...
 
deOcclusionMeshWeightGetWeightAt (int index) const
 Weight at the given position. More...
 
deOcclusionMeshWeightGetWeights () const
 Pointer to the weights. More...
 
int GetWeightGroupCount () const
 Number of weight groups. More...
 
void SetWeightGroupCount (int count)
 Set number of weight groups. More...
 
int GetWeightGroupAt (int index) const
 Weight group at the given position. More...
 
void SetWeightGroupAt (int index, int weightSetCount) const
 Set weight group at the given position. More...
 
int * GetWeightGroups () const
 Pointer to the weight groups. More...
 
Vertices
int GetVertexCount () const
 Number of vertices. More...
 
void SetVertexCount (int count)
 Set number of vertices. More...
 
deOcclusionMeshVertexGetVertexAt (int index) const
 Vertex at the given position. More...
 
deOcclusionMeshVertexGetVertices () const
 Pointer to the vertices. More...
 
Corners
int GetCornerCount () const
 Number of corners. More...
 
void SetCornerCount (int count)
 Set number of corners. More...
 
unsigned short GetCornerAt (int index) const
 Corner at the given position. More...
 
void SetCornerAt (int index, unsigned short vertexIndex)
 Set corner at the given position. More...
 
unsigned short * GetCorners () const
 Pointer to the corners. More...
 
Faces
int GetFaceCount () const
 Number of faces. More...
 
void SetFaceCount (int count)
 Set number of faces. More...
 
int GetDoubleSidedFaceCount () const
 Number of faces at the end of the face list that are double sided not single sided. More...
 
void SetDoubleSidedFaceCount (int count)
 Set number of faces at the end of the face list that are double sided not single sided. More...
 
unsigned short GetFaceAt (int index) const
 Corner count for the face at the given position. More...
 
void SetFaceAt (int index, unsigned short cornerCount)
 Set corner count for the face at the given position. More...
 
unsigned short * GetFaces () const
 Pointer to the face corner counts. More...
 
System Peers
deBaseGraphicOcclusionMeshGetPeerGraphic () const
 Graphic system peer. More...
 
void SetPeerGraphic (deBaseGraphicOcclusionMesh *peer)
 Set graphic system peer. More...
 
- Public Member Functions inherited from deFileResource
deVirtualFileSystemGetVirtualFileSystem () const
 Virtual file system or NULL if build from memory. More...
 
const decStringGetFilename () const
 Filename or empty string if build from memory. More...
 
TIME_SYSTEM GetModificationTime () const
 Modification time used to detect resources changing on disk while loaded. More...
 
void SetModificationTime (TIME_SYSTEM modificationTime)
 Set modification time used to detect resources changing on disk while loaded. More...
 
bool GetAsynchron () const
 Resource is asynchron. More...
 
void SetAsynchron (bool asynchron)
 Set if resource is asynchron. More...
 
bool GetOutdated () const
 
void MarkOutdated ()
 
 deFileResource (deFileResourceManager *resourceManager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 Create file resource. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deOcclusionMesh (deOcclusionMeshManager *manager, deVirtualFileSystem *vfs, const char *filename, TIME_SYSTEM modificationTime)
 Create new occlusion mesh with the given resource manager. More...
 
virtual ~deOcclusionMesh ()
 Clean up occlusion mesh. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deFileResource
virtual ~deFileResource ()
 Clean up file resource. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Occlusion Mesh.

Defines an occlusion mesh used to help graphic modules to improve occlusion testing if supported. Occlusion meshes are optional but potentially improve performance. Occlusion meshes are similar to models in that they support bone weights but they do not support LOD nor textures or texture coordinate sets. Faces are classified in single sided and double sided. Single sided is useful to define occlusion only in the direction in front of a faces. In contrary to models an occlusion mesh face can have more than 3 corners as long as they are all coplanar and convex. corners are the vertices used in the faces and are stored as a continuous array of vertex indices. Each face defines the number of corners it contains in clockwise order.

Member Typedef Documentation

◆ Ref

Type holding strong reference.

Constructor & Destructor Documentation

◆ deOcclusionMesh()

deOcclusionMesh::deOcclusionMesh ( deOcclusionMeshManager manager,
deVirtualFileSystem vfs,
const char *  filename,
TIME_SYSTEM  modificationTime 
)

Create new occlusion mesh with the given resource manager.

◆ ~deOcclusionMesh()

virtual deOcclusionMesh::~deOcclusionMesh ( )
protectedvirtual

Clean up occlusion mesh.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetBoneAt()

deOcclusionMeshBone& deOcclusionMesh::GetBoneAt ( int  index) const

Retrieves a bone by index.

◆ GetBoneCount()

int deOcclusionMesh::GetBoneCount ( ) const
inline

Number of bones.

◆ GetBones()

deOcclusionMeshBone* deOcclusionMesh::GetBones ( ) const
inline

Pointer to the bones.

◆ GetCornerAt()

unsigned short deOcclusionMesh::GetCornerAt ( int  index) const

Corner at the given position.

◆ GetCornerCount()

int deOcclusionMesh::GetCornerCount ( ) const
inline

Number of corners.

◆ GetCorners()

unsigned short* deOcclusionMesh::GetCorners ( ) const
inline

Pointer to the corners.

◆ GetDoubleSidedFaceCount()

int deOcclusionMesh::GetDoubleSidedFaceCount ( ) const
inline

Number of faces at the end of the face list that are double sided not single sided.

◆ GetFaceAt()

unsigned short deOcclusionMesh::GetFaceAt ( int  index) const

Corner count for the face at the given position.

◆ GetFaceCount()

int deOcclusionMesh::GetFaceCount ( ) const
inline

Number of faces.

◆ GetFaces()

unsigned short* deOcclusionMesh::GetFaces ( ) const
inline

Pointer to the face corner counts.

◆ GetPeerGraphic()

deBaseGraphicOcclusionMesh* deOcclusionMesh::GetPeerGraphic ( ) const
inline

Graphic system peer.

◆ GetVertexAt()

deOcclusionMeshVertex& deOcclusionMesh::GetVertexAt ( int  index) const

Vertex at the given position.

◆ GetVertexCount()

int deOcclusionMesh::GetVertexCount ( ) const
inline

Number of vertices.

◆ GetVertices()

deOcclusionMeshVertex* deOcclusionMesh::GetVertices ( ) const
inline

Pointer to the vertices.

◆ GetWeightAt()

deOcclusionMeshWeight& deOcclusionMesh::GetWeightAt ( int  index) const

Weight at the given position.

◆ GetWeightCount()

int deOcclusionMesh::GetWeightCount ( ) const
inline

Number of weights.

◆ GetWeightGroupAt()

int deOcclusionMesh::GetWeightGroupAt ( int  index) const

Weight group at the given position.

◆ GetWeightGroupCount()

int deOcclusionMesh::GetWeightGroupCount ( ) const
inline

Number of weight groups.

◆ GetWeightGroups()

int* deOcclusionMesh::GetWeightGroups ( ) const
inline

Pointer to the weight groups.

◆ GetWeights()

deOcclusionMeshWeight* deOcclusionMesh::GetWeights ( ) const
inline

Pointer to the weights.

◆ HasBoneNamed()

bool deOcclusionMesh::HasBoneNamed ( const char *  name) const

Determiens if a bone with the given name exists.

◆ IndexOfBoneNamed()

int deOcclusionMesh::IndexOfBoneNamed ( const char *  name) const

Index of the bone with the given name or -1 if not found.

◆ Prepare()

void deOcclusionMesh::Prepare ( )

Prepare mesh for later use.

◆ SetBoneCount()

void deOcclusionMesh::SetBoneCount ( int  count)

Set number of bones.

◆ SetCornerAt()

void deOcclusionMesh::SetCornerAt ( int  index,
unsigned short  vertexIndex 
)

Set corner at the given position.

◆ SetCornerCount()

void deOcclusionMesh::SetCornerCount ( int  count)

Set number of corners.

◆ SetDoubleSidedFaceCount()

void deOcclusionMesh::SetDoubleSidedFaceCount ( int  count)

Set number of faces at the end of the face list that are double sided not single sided.

◆ SetFaceAt()

void deOcclusionMesh::SetFaceAt ( int  index,
unsigned short  cornerCount 
)

Set corner count for the face at the given position.

◆ SetFaceCount()

void deOcclusionMesh::SetFaceCount ( int  count)

Set number of faces.

◆ SetPeerGraphic()

void deOcclusionMesh::SetPeerGraphic ( deBaseGraphicOcclusionMesh peer)

Set graphic system peer.

◆ SetVertexCount()

void deOcclusionMesh::SetVertexCount ( int  count)

Set number of vertices.

◆ SetWeightCount()

void deOcclusionMesh::SetWeightCount ( int  count)

Set number of weights.

◆ SetWeightGroupAt()

void deOcclusionMesh::SetWeightGroupAt ( int  index,
int  weightSetCount 
) const

Set weight group at the given position.

◆ SetWeightGroupCount()

void deOcclusionMesh::SetWeightGroupCount ( int  count)

Set number of weight groups.

◆ Verify()

bool deOcclusionMesh::Verify ( ) const

Verify the mesh.


The documentation for this class was generated from the following file: