gwnavruntime/collision/indexedmeshblob.h Source File
Go to the documentation of this file.
8 #ifndef Navigation_IndexedMeshBlob_H
9 #define Navigation_IndexedMeshBlob_H
22 KY_ROOT_BLOB_CLASS(CollisionData, IndexedMeshBlob, 0)
28 KyUInt32 GetVertexStride()
const {
return sizeof(Vec3f); }
29 const UByte * GetIndexBase()
const {
return (
const UByte*)m_indices.GetValues(); }
30 const UByte * GetVertexBase()
const {
return (
const UByte*)m_vertices.GetValues(); }
32 KyUInt32 GetTriangleCount()
const {
return m_indices.GetCount() / 3; }
34 BlobArray<Vec3f> m_vertices;
35 BlobArray<KyUInt32> m_indices;
40 SwapEndianness(e,
self.m_vertices);
41 SwapEndianness(e,
self.m_indices);
44 class IndexedMeshBlobBuilder :
public BaseBlobBuilder<IndexedMeshBlob>
53 IndexedMeshBlobBuilder() : m_indexedState(NotIndexed) {}
57 bool IsEmpty() {
return m_indices.GetCount() == 0; }
58 void AddTriangle(
const Vec3f& a,
const Vec3f& b,
const Vec3f& c);
60 virtual void DoBuild();
65 KyArrayPOD<KyUInt32> m_indices;
66 KyArray<Vec3f> m_vertices;
67 IndexedState m_indexedState;
70 class IndexedMeshArrayBlob
72 KY_ROOT_BLOB_CLASS(CollisionData, IndexedMeshArrayBlob, 0)
76 IndexedMeshArrayBlob() {}
79 BlobArray<IndexedMeshBlob> m_meshParts;
84 SwapEndianness(e,
self.m_meshParts);
89 #endif // Navigation_IndexedMeshBlob_H
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Target
Enumerates the possible endianness types relative to the current platform.
Definition: endianness.h:35
Definition: gamekitcrowddispersion.h:20
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36