28 #ifndef __EdgeListBuilder_H__
29 #define __EdgeListBuilder_H__
62 size_t sharedVertIndex[3];
77 size_t sharedVertIndex[2];
85 typedef std::vector<Vector4, STLAllocator<Vector4, CategorisedAlignAllocPolicy<MEMCATEGORY_GEOMETRY> > >
TriangleFaceNormalList;
139 void updateTriangleLightFacing(
const Vector4& lightPos);
174 void addVertexData(
const VertexData* vertexData);
185 void addIndexData(
const IndexData* indexData,
size_t vertexSet = 0,
230 if (a.
x < b.
x)
return true;
231 if (a.
x > b.
x)
return false;
232 if (a.
y < b.
y)
return true;
233 if (a.
y > b.
y)
return false;
255 void buildTrianglesEdges(
const Geometry &geometry);
258 size_t findOrCreateCommonVertex(
const Vector3& vec,
size_t vertexSet,
259 size_t indexSet,
size_t originalIndex);
261 void connectOrCreateEdge(
size_t vertexSet,
size_t triangleIndex,
size_t vertIndex0,
size_t vertIndex1,
262 size_t sharedVertIndex0,
size_t sharedVertIndex1);
map< Vector3, size_t, vectorLess >::type CommonVertexMap
Map for identifying common vertices.
multimap< std::pair< size_t, size_t >, std::pair< size_t, size_t > >::type EdgeMap
Edge map, used to connect edges.
const IndexData * indexData
Basic triangle structure.
const VertexData * vertexData
Pointer to vertex data used by this edge group.
VertexDataList mVertexDataList
Triangle()
Vertex indexes, relative to a shared vertex buffer with.
size_t indexSet
The set of indexes this triangle came from (NB it is possible that the triangles on one side of an ed...
Comparator for sorting geometries by vertex set.
size_t triStart
Index to main triangles array, indicate the first triangle of this edge group, and all triangles of t...
CommonVertexMap mCommonVertexMap
vector< const VertexData * >::type VertexDataList
bool operator()(const Vector3 &a, const Vector3 &b) const
vector< EdgeGroup >::type EdgeGroupList
General utility class for building edge lists for geometry.
Shared pointer implementation used to share index buffers.
vector< Geometry >::type GeometryList
EdgeList edges
The edges themselves.
A set of indexed geometry data.
bool operator()(const Geometry &a, const Geometry &b) const
A group of edges sharing the same vertex data.
vector< Edge >::type EdgeList
vector< char >::type TriangleLightFacingList
EdgeGroupList edgeGroups
All edge groups of this edge list.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Summary class collecting together index data source information.
bool isClosed
Flag indicate the mesh is manifold.
std::vector< Vector4, STLAllocator< Vector4, CategorisedAlignAllocPolicy< MEMCATEGORY_GEOMETRY > > > TriangleFaceNormalList
Standard 3-dimensional vector.
Comparator for unique vertex list.
Summary class collecting together vertex source information.
TriangleFaceNormalList triangleFaceNormals
All triangle face normals.
RenderOperation::OperationType opType
vector< CommonVertex >::type CommonVertexList
A vertex can actually represent several vertices in the final model, because vertices along texture s...
size_t vertexSet
The vertex set these vertices came from.
This class contains the information required to describe the edge connectivity of a given set of vert...
vector< Triangle >::type TriangleList
size_t vertexSet
The vertex set index that contains the vertices for this edge group.
A list of triangles, 3 vertices per triangle.
bool degenerate
Indicates if this is a degenerate edge, ie it does not have 2 triangles.
4-dimensional homogeneous vector.
CommonVertexList mVertices
TriangleList triangles
Main triangles array, stores all triangles of this edge list.
size_t triCount
Number triangles of this edge group.
TriangleLightFacingList triangleLightFacings
Triangle light facing states.
GeometryList mGeometryList
OperationType
The rendering operation type to perform.