Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::EdgeData Class Reference

This class contains the information required to describe the edge connectivity of a given set of vertices and indexes. More...

`#include <OgreEdgeListBuilder.h>`

List of all members.

## Public Types

typedef std::vector< Triangle > | TriangleList
typedef std::vector< Edge > | EdgeList
typedef std::vector< EdgeGroup > | EdgeGroupList

## Public Methods

void | updateTriangleLightFacing (const Vector4 &lightPos)
| Calculate the light facing state of the triangles in this edge list.
void | updateFaceNormals (size_t vertexSet, HardwareVertexBufferSharedPtr positionBuffer)
| Updates the face normals for this edge list based on (changed) position information, useful for animated objects.
void | log (Log *log)

## Public Attributes

TriangleList | triangles
EdgeGroupList | edgeGroups

## Detailed Description

This class contains the information required to describe the edge connectivity of a given set of vertices and indexes.

Remarks:
  This information is built using the EdgeListBuilder class. Note that for a given mesh, which can be made up of multiple submeshes, there are separate edge lists for when

Definition at line 42 of file OgreEdgeListBuilder.h.

## Member Typedef Documentation

typedef std::vector<EdgeGroup> Ogre::EdgeData::EdgeGroupList

| Definition at line 88 of file OgreEdgeListBuilder.h.

typedef std::vector<Edge> Ogre::EdgeData::EdgeList

| Definition at line 74 of file OgreEdgeListBuilder.h.

typedef std::vector<Triangle> Ogre::EdgeData::TriangleList

| Definition at line 73 of file OgreEdgeListBuilder.h.

## Member Function Documentation

void Ogre::EdgeData::log | ( | Log * | log | ) |

| Definition at line 34 of file OgreEdgeListBuilder.cpp. References Ogre::EdgeData::Edge::degenerate, edgeGroups, Ogre::EdgeData::Triangle::indexSet, Ogre::Log::logMessage(), triangles, Ogre::EdgeData::Edge::triIndex, Ogre::EdgeData::Triangle::vertexSet, Ogre::EdgeData::Edge::vertIndex, and Ogre::EdgeData::Triangle::vertIndex. Referenced by Ogre::Mesh::buildEdgeList().

void Ogre::EdgeData::updateFaceNormals | ( | size_t | vertexSet,
|  | HardwareVertexBufferSharedPtr | positionBuffer
| ) |

Updates the face normals for this edge list based on (changed) position information, useful for animated objects.

Parameters:

  vertexSet | The vertex set we are updating
  positionBuffer | The updated position buffer, must contain ONLY xyz

Definition at line 614 of file OgreEdgeListBuilder.cpp.

References Ogre::EdgeData::Triangle::normal, Ogre::Real, triangles, Ogre::EdgeData::Triangle::vertexSet, and Ogre::EdgeData::Triangle::vertIndex.

Referenced by Ogre::Entity::getShadowVolumeRenderableIterator().

void Ogre::EdgeData::updateTriangleLightFacing | ( | const Vector4 & | lightPos | ) |

Calculate the light facing state of the triangles in this edge list.

Remarks:
  This is normally the first stage of calculating a silhouette, ie establishing which tris are facing the light and which are facing away. This state is stored in the 'lightFacing' flag in each Triangle.

Parameters:

  lightPos | 4D position of the light in object space, note that for directional lights (which have no position), the w component is 0 and the x/y/z position are the direction.

Definition at line 596 of file OgreEdgeListBuilder.cpp.

References Ogre::Vector4::dotProduct(), Ogre::EdgeData::Triangle::lightFacing, Ogre::EdgeData::Triangle::normal, Ogre::Real, and triangles.

Referenced by Ogre::ShadowCaster::updateEdgeListLightFacing().

## Member Data Documentation

EdgeGroupList Ogre::EdgeData::edgeGroups

Definition at line 90 of file OgreEdgeListBuilder.h.

Referenced by Ogre::EdgeListBuilder::attemptBuild(), Ogre::MeshSerializerImpl::calcEdgeListLodSize(), Ogre::EdgeListBuilder::createEdge(), Ogre::EdgeListBuilder::findEdge(), Ogre::ShadowCaster::generateShadowVolume(), Ogre::Entity::getShadowVolumeRenderableIterator(), log(), Ogre::MeshSerializerImpl::readEdgeList(), and Ogre::MeshSerializerImpl::writeEdgeList().

TriangleList Ogre::EdgeData::triangles

Definition at line 89 of file OgreEdgeListBuilder.h.

Referenced by Ogre::EdgeListBuilder::attemptBuild(), Ogre::EdgeListBuilder::buildTrianglesEdges(), Ogre::MeshSerializerImpl::calcEdgeListLodSize(), Ogre::EdgeListBuilder::connectEdges(), Ogre::ShadowCaster::generateShadowVolume(), log(), Ogre::MeshSerializerImpl::readEdgeList(), updateFaceNormals(), updateTriangleLightFacing(), and Ogre::MeshSerializerImpl::writeEdgeList().

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

- OgreEdgeListBuilder.h
- OgreEdgeListBuilder.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:53 2004