OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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>

+ Inheritance diagram for Ogre::EdgeData:
+ Collaboration diagram for Ogre::EdgeData:

Classes

struct  Edge
 Edge data. More...
 
struct  EdgeGroup
 A group of edges sharing the same vertex data. More...
 
struct  Triangle
 Basic triangle structure. More...
 

Public Types

typedef vector< EdgeGroup >::type EdgeGroupList
 
typedef vector< Edge >::type EdgeList
 
typedef 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, plus distance from origin. More...
 
typedef vector< char >::type TriangleLightFacingList
 Working vector used when calculating the silhouette. More...
 
typedef vector< Triangle >::type TriangleList
 

Public Member Functions

 EdgeData ()
 
void log (Log *log)
 Debugging method. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
void updateFaceNormals (size_t vertexSet, const HardwareVertexBufferSharedPtr &positionBuffer)
 Updates the face normals for this edge list based on (changed) position information, useful for animated objects. More...
 
void updateTriangleLightFacing (const Vector4 &lightPos)
 Calculate the light facing state of the triangles in this edge list. More...
 

Public Attributes

EdgeGroupList edgeGroups
 All edge groups of this edge list. More...
 
bool isClosed
 Flag indicate the mesh is manifold. More...
 
TriangleFaceNormalList triangleFaceNormals
 All triangle face normals. More...
 
TriangleLightFacingList triangleLightFacings
 Triangle light facing states. More...
 
TriangleList triangles
 Main triangles array, stores all triangles of this edge list. More...
 

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 52 of file OgreEdgeListBuilder.h.

Member Typedef Documentation

Definition at line 120 of file OgreEdgeListBuilder.h.

Definition at line 99 of file OgreEdgeListBuilder.h.

Array of 4D vector of triangle face normal, which is unit vector orthogonal to the triangles, plus distance from origin.

Use aligned policy here because we are intended to use in SIMD optimised routines.

Definition at line 91 of file OgreEdgeListBuilder.h.

Working vector used when calculating the silhouette.

Use std::vector<char> instead of std::vector<bool> which might implemented similar bit-fields causing loss performance.

Definition at line 96 of file OgreEdgeListBuilder.h.

Definition at line 98 of file OgreEdgeListBuilder.h.

Constructor & Destructor Documentation

Ogre::EdgeData::EdgeData ( )

Member Function Documentation

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

Debugging method.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

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

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

Parameters
vertexSetThe vertex set we are updating
positionBufferThe updated position buffer, must contain ONLY xyz
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, i.e. establishing which tris are facing the light and which are facing away. This state is stored in the 'triangleLightFacings'.
Parameters
lightPos4D 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.

Member Data Documentation

EdgeGroupList Ogre::EdgeData::edgeGroups

All edge groups of this edge list.

Definition at line 131 of file OgreEdgeListBuilder.h.

bool Ogre::EdgeData::isClosed

Flag indicate the mesh is manifold.

Definition at line 133 of file OgreEdgeListBuilder.h.

TriangleFaceNormalList Ogre::EdgeData::triangleFaceNormals

All triangle face normals.

It should be 1:1 with triangles.

Definition at line 127 of file OgreEdgeListBuilder.h.

TriangleLightFacingList Ogre::EdgeData::triangleLightFacings

Triangle light facing states.

It should be 1:1 with triangles.

Definition at line 129 of file OgreEdgeListBuilder.h.

TriangleList Ogre::EdgeData::triangles

Main triangles array, stores all triangles of this edge list.

Note that triangles are grouping against edge group.

Definition at line 125 of file OgreEdgeListBuilder.h.


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