Go to the documentation of this file.
28 #ifndef __EdgeListBuilder_H__
29 #define __EdgeListBuilder_H__
69 size_t sharedVertIndex[3];
83 size_t sharedVertIndex[2];
91 typedef std::vector<Vector4, STLAllocator<Vector4, CategorisedAlignAllocPolicy<MEMCATEGORY_GEOMETRY> > >
TriangleFaceNormalList;
236 if (a.
x < b.
x)
return true;
237 if (a.
x > b.
x)
return false;
238 if (a.
y < b.
y)
return true;
239 if (a.
y > b.
y)
return false;
265 size_t indexSet,
size_t originalIndex);
268 size_t sharedVertIndex0,
size_t sharedVertIndex1);
std::vector< Vector4, STLAllocator< Vector4, CategorisedAlignAllocPolicy< MEMCATEGORY_GEOMETRY > > > TriangleFaceNormalList
Array of 4D vector of triangle face normal, which is unit vector orthogonal to the triangles,...
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
GeometryList mGeometryList
bool operator()(const Vector3 &a, const Vector3 &b) const
void updateFaceNormals(size_t vertexSet, const HardwareVertexBufferSharedPtr &positionBuffer)
Updates the face normals for this edge list based on (changed) position information,...
vector< Triangle >::type TriangleList
bool isClosed
Flag indicate the mesh is manifold.
CommonVertexMap mCommonVertexMap
void addVertexData(const VertexData *vertexData)
Add a set of vertex geometry data to the edge builder.
General utility class for building edge lists for geometry.
CommonVertexList mVertices
EdgeList edges
The edges themselves.
size_t indexSet
The vertex set this came from.
size_t originalIndex
The index set this was referenced (first) from.
@ OT_TRIANGLE_LIST
A list of triangles, 3 vertices per triangle.
size_t indexSet
The set of indexes this triangle came from (NB it is possible that the triangles on one side of an ed...
EdgeData * build(void)
Builds the edge information based on the information built up so far.
vector< EdgeGroup >::type EdgeGroupList
void log(Log *l)
Debugging method.
Summary class collecting together vertex source information.
bool degenerate
Indicates if this is a degenerate edge, ie it does not have 2 triangles.
TriangleList triangles
Main triangles array, stores all triangles of this edge list.
bool operator()(const Geometry &a, const Geometry &b) const
Shared pointer implementation used to share vertex buffers.
size_t vertexSet
The vertex set these vertices came from.
Comparator for unique vertex list.
size_t indexSet
The vertex data set this geometry data refers to.
virtual ~EdgeListBuilder()
vector< Geometry >::type GeometryList
void addIndexData(const IndexData *indexData, size_t vertexSet=0, RenderOperation::OperationType opType=RenderOperation::OT_TRIANGLE_LIST)
Add a set of index geometry data to the edge builder.
vector< CommonVertex >::type CommonVertexList
size_t vertexSet
The vertex set index that contains the vertices for this edge group.
size_t vertexSet
Place of vertex in common vertex list.
A set of indexed geometry data.
size_t index
Location of point in euclidean space.
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...
void updateTriangleLightFacing(const Vector4 &lightPos)
Calculate the light facing state of the triangles in this edge list.
EdgeGroupList edgeGroups
All edge groups of this edge list.
4-dimensional homogeneous vector.
A vertex can actually represent several vertices in the final model, because vertices along texture s...
void buildTrianglesEdges(const Geometry &geometry)
const IndexData * indexData
The index data set this geometry data refers to.
RenderOperation::OperationType opType
The index information which describes the triangles.
vector< const VertexData * >::type VertexDataList
const VertexData * vertexData
Pointer to vertex data used by this edge group.
size_t findOrCreateCommonVertex(const Vector3 &vec, size_t vertexSet, size_t indexSet, size_t originalIndex)
Finds an existing common vertex, or inserts a new one.
vector< Edge >::type EdgeList
TriangleFaceNormalList triangleFaceNormals
All triangle face normals.
This class contains the information required to describe the edge connectivity of a given set of vert...
OperationType
The rendering operation type to perform.
Basic triangle structure.
size_t triCount
Number triangles of this edge group.
void connectOrCreateEdge(size_t vertexSet, size_t triangleIndex, size_t vertIndex0, size_t vertIndex1, size_t sharedVertIndex0, size_t sharedVertIndex1)
Connect existing edge or create a new edge - utility method during building.
vector< char >::type TriangleLightFacingList
Working vector used when calculating the silhouette.
Summary class collecting together index data source information.
Standard 3-dimensional vector.
void log(Log *log)
Debugging method.
multimap< std::pair< size_t, size_t >, std::pair< size_t, size_t > >::type EdgeMap
Edge map, used to connect edges.
map< Vector3, size_t, vectorLess >::type CommonVertexMap
Map for identifying common vertices.
TriangleLightFacingList triangleLightFacings
Triangle light facing states.
A group of edges sharing the same vertex data.
VertexDataList mVertexDataList
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.