Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Ogre::EdgeListBuilder Class Reference

General utility class for building edge lists for geometry. More...

`#include <OgreEdgeListBuilder.h>`

List of all members.

## Public Member Functions
| EdgeListBuilder ()
virtual | ~EdgeListBuilder ()
void | addVertexData (const VertexData *vertexData)
| Add a set of vertex geometry data to the edge builder.
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.
EdgeData * | build (void)
| Builds the edge information based on the information built up so far.
void | log (Log *l)
| Debugging method.
## Protected Types
typedef std::vector< const VertexData * > | VertexDataList
typedef std::vector< Geometry > | GeometryList
typedef std::vector< CommonVertex > | CommonVertexList
typedef std::map< Vector3, size_t, vectorLess > | CommonVertexMap
| Map for identifying common vertices.
typedef std::multimap< std::pair< size_t, size_t >, std::pair< size_t, size_t > > | EdgeMap
| Edge map, used to connect edges.
## Protected Member Functions
void | buildTrianglesEdges (const Geometry &geometry)
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.
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.
## Protected Attributes
GeometryList | mGeometryList
VertexDataList | mVertexDataList
CommonVertexList | mVertices
EdgeData * | mEdgeData
CommonVertexMap | mCommonVertexMap
EdgeMap | mEdgeMap
## Classes
struct | CommonVertex
| A vertex can actually represent several vertices in the final model, because vertices along texture seams etc will have been duplicated. More...
struct | Geometry
| A set of indexed geometry data. More...
struct | geometryLess
| Comparator for sorting geometries by vertex set. More...
struct | vectorLess
| Comparator for unique vertex list. More...

## Detailed Description

General utility class for building edge lists for geometry.

Remarks:
  You can add multiple sets of vertex and index data to build and edge list. Edges will be built between the various sets as well as within sets; this allows you to use a model which is built from multiple SubMeshes each using separate index and (optionally) vertex data and still get the same connectivity information. It's important to note that the indexes for the edge will be constrained to a single vertex buffer though (this is required in order to render the edge).

Definition at line 157 of file OgreEdgeListBuilder.h.

## Member Typedef Documentation

typedef std::vector<CommonVertex> Ogre::EdgeListBuilder::CommonVertexList`[protected]`

| Definition at line 234 of file OgreEdgeListBuilder.h.

typedef std::map<Vector3, size_t, vectorLess> Ogre::EdgeListBuilder::CommonVertexMap`[protected]`

| Map for identifying common vertices. Definition at line 241 of file OgreEdgeListBuilder.h.

typedef std::multimap< std::pair<size_t, size_t>, std::pair<size_t, size_t> > Ogre::EdgeListBuilder::EdgeMap`[protected]`

| Edge map, used to connect edges. Note we allow many triangles on an edge, after connected an existing edge, we will remove it and never used again. Definition at line 246 of file OgreEdgeListBuilder.h.

typedef std::vector<Geometry> Ogre::EdgeListBuilder::GeometryList`[protected]`

| Definition at line 233 of file OgreEdgeListBuilder.h.

typedef std::vector<const VertexData*> Ogre::EdgeListBuilder::VertexDataList`[protected]`

| Definition at line 232 of file OgreEdgeListBuilder.h.

## Constructor & Destructor Documentation

Ogre::EdgeListBuilder::EdgeListBuilder | ( |  | ) |

virtual Ogre::EdgeListBuilder::~EdgeListBuilder | ( |  | ) | `[virtual]`

## Member Function Documentation

void Ogre::EdgeListBuilder::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. Remarks: You must add at least one set of index data to the builder before invoking the build method. Parameters:
  | indexData | The index information which describes the triangles.
  | vertexSet | The vertex data set this index data refers to; you only need to alter this if you have added multiple sets of vertices
  | opType | The operation type used to render these indexes. Only triangle types are supported (no point or line types)

void Ogre::EdgeListBuilder::addVertexData | ( | const VertexData * | vertexData | ) |

| Add a set of vertex geometry data to the edge builder. Remarks: You must add at least one set of vertex data to the builder before invoking the build method.

EdgeData* Ogre::EdgeListBuilder::build | ( | void |  | ) |

| Builds the edge information based on the information built up so far. Remarks: The caller takes responsibility for deleting the returned structure.

void Ogre::EdgeListBuilder::buildTrianglesEdges | ( | const Geometry & | geometry | ) | `[protected]`

void Ogre::EdgeListBuilder::connectOrCreateEdge | ( | size_t | vertexSet,
|  | size_t | triangleIndex,
|  | size_t | vertIndex0,
|  | size_t | vertIndex1,
|  | size_t | sharedVertIndex0,
|  | size_t | sharedVertIndex1
| ) | `[protected]`

| Connect existing edge or create a new edge - utility method during building.

size_t Ogre::EdgeListBuilder::findOrCreateCommonVertex | ( | const Vector3 & | vec,
|  | size_t | vertexSet,
|  | size_t | indexSet,
|  | size_t | originalIndex
| ) | `[protected]`

| Finds an existing common vertex, or inserts a new one.

void Ogre::EdgeListBuilder::log | ( | Log * | l | ) |

| Debugging method.

## Member Data Documentation

CommonVertexMap Ogre::EdgeListBuilder::mCommonVertexMap`[protected]`

| Definition at line 242 of file OgreEdgeListBuilder.h.

EdgeData* Ogre::EdgeListBuilder::mEdgeData`[protected]`

| Definition at line 239 of file OgreEdgeListBuilder.h.

EdgeMap Ogre::EdgeListBuilder::mEdgeMap`[protected]`

| Definition at line 247 of file OgreEdgeListBuilder.h.

GeometryList Ogre::EdgeListBuilder::mGeometryList`[protected]`

| Definition at line 236 of file OgreEdgeListBuilder.h.

VertexDataList Ogre::EdgeListBuilder::mVertexDataList`[protected]`

| Definition at line 237 of file OgreEdgeListBuilder.h.

CommonVertexList Ogre::EdgeListBuilder::mVertices`[protected]`

| Definition at line 238 of file OgreEdgeListBuilder.h.

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

- OgreEdgeListBuilder.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 30 10:51:12 2007