Drag[en]gine Game Engine
1.21
|
Occlusion Mesh. More...
#include <deOcclusionMesh.h>
Public Types | |
typedef deTObjectReference< deOcclusionMesh > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deResource | |
typedef deTObjectReference< deResource > | Ref |
Type holding strong reference. More... | |
Public Types inherited from deObject | |
typedef deTObjectReference< deObject > | Ref |
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... | |
deOcclusionMeshBone & | GetBoneAt (int index) const |
Retrieves a bone by index. More... | |
deOcclusionMeshBone * | GetBones () 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... | |
deOcclusionMeshWeight & | GetWeightAt (int index) const |
Weight at the given position. More... | |
deOcclusionMeshWeight * | GetWeights () 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... | |
deOcclusionMeshVertex & | GetVertexAt (int index) const |
Vertex at the given position. More... | |
deOcclusionMeshVertex * | GetVertices () 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 | |
deBaseGraphicOcclusionMesh * | GetPeerGraphic () const |
Graphic system peer. More... | |
void | SetPeerGraphic (deBaseGraphicOcclusionMesh *peer) |
Set graphic system peer. More... | |
Public Member Functions inherited from deFileResource | |
deVirtualFileSystem * | GetVirtualFileSystem () const |
Virtual file system or NULL if build from memory. More... | |
const decString & | GetFilename () 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 | |
deResourceManager * | GetResourceManager () const |
Resource manager or NULL if resource is leaking. More... | |
deEngine * | GetEngine () const |
Game engine object from resource manager. More... | |
deResource * | GetLLManagerPrev () const |
Previous resource in the resource manager linked list. More... | |
void | SetLLManagerPrev (deResource *resource) |
Set next resource in the resource manager linked list. More... | |
deResource * | GetLLManagerNext () 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... | |
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.
Type holding strong reference.
deOcclusionMesh::deOcclusionMesh | ( | deOcclusionMeshManager * | manager, |
deVirtualFileSystem * | vfs, | ||
const char * | filename, | ||
TIME_SYSTEM | modificationTime | ||
) |
Create new occlusion mesh with the given resource manager.
|
protectedvirtual |
Clean up occlusion mesh.
deOcclusionMeshBone& deOcclusionMesh::GetBoneAt | ( | int | index | ) | const |
Retrieves a bone by index.
|
inline |
Number of bones.
|
inline |
Pointer to the bones.
unsigned short deOcclusionMesh::GetCornerAt | ( | int | index | ) | const |
Corner at the given position.
|
inline |
Number of corners.
|
inline |
Pointer to the corners.
|
inline |
Number of faces at the end of the face list that are double sided not single sided.
unsigned short deOcclusionMesh::GetFaceAt | ( | int | index | ) | const |
Corner count for the face at the given position.
|
inline |
Number of faces.
|
inline |
Pointer to the face corner counts.
|
inline |
Graphic system peer.
deOcclusionMeshVertex& deOcclusionMesh::GetVertexAt | ( | int | index | ) | const |
Vertex at the given position.
|
inline |
Number of vertices.
|
inline |
Pointer to the vertices.
deOcclusionMeshWeight& deOcclusionMesh::GetWeightAt | ( | int | index | ) | const |
Weight at the given position.
|
inline |
Number of weights.
int deOcclusionMesh::GetWeightGroupAt | ( | int | index | ) | const |
Weight group at the given position.
|
inline |
Number of weight groups.
|
inline |
Pointer to the weight groups.
|
inline |
Pointer to the weights.
bool deOcclusionMesh::HasBoneNamed | ( | const char * | name | ) | const |
Determiens if a bone with the given name exists.
int deOcclusionMesh::IndexOfBoneNamed | ( | const char * | name | ) | const |
Index of the bone with the given name or -1 if not found.
void deOcclusionMesh::Prepare | ( | ) |
Prepare mesh for later use.
void deOcclusionMesh::SetBoneCount | ( | int | count | ) |
Set number of bones.
void deOcclusionMesh::SetCornerAt | ( | int | index, |
unsigned short | vertexIndex | ||
) |
Set corner at the given position.
void deOcclusionMesh::SetCornerCount | ( | int | count | ) |
Set number of corners.
void deOcclusionMesh::SetDoubleSidedFaceCount | ( | int | count | ) |
Set number of faces at the end of the face list that are double sided not single sided.
void deOcclusionMesh::SetFaceAt | ( | int | index, |
unsigned short | cornerCount | ||
) |
Set corner count for the face at the given position.
void deOcclusionMesh::SetFaceCount | ( | int | count | ) |
Set number of faces.
void deOcclusionMesh::SetPeerGraphic | ( | deBaseGraphicOcclusionMesh * | peer | ) |
Set graphic system peer.
void deOcclusionMesh::SetVertexCount | ( | int | count | ) |
Set number of vertices.
void deOcclusionMesh::SetWeightCount | ( | int | count | ) |
Set number of weights.
void deOcclusionMesh::SetWeightGroupAt | ( | int | index, |
int | weightSetCount | ||
) | const |
Set weight group at the given position.
void deOcclusionMesh::SetWeightGroupCount | ( | int | count | ) |
Set number of weight groups.
bool deOcclusionMesh::Verify | ( | ) | const |
Verify the mesh.