#include <PolyPrimitive.h>
Inheritance diagram for Fluxus::PolyPrimitive:


Public Types | |
| enum | Type { TRISTRIP, QUADS, TRILIST, TRIFAN, POLYGON } |
Public Member Functions | |
| PolyPrimitive (Type t=TRISTRIP) | |
| PolyPrimitive (const PolyPrimitive &other) | |
| virtual | ~PolyPrimitive () |
| Type | GetType () const |
| virtual void | AddVertex (const dVertex &Vert) |
| Add a new vertex to the primitive. | |
| void | Clear () |
| Clears out the primitive. | |
Primitive Interface | |
| virtual PolyPrimitive * | Clone () const |
| virtual void | Render () |
| virtual dBoundingBox | GetBoundingBox () |
| virtual void | RecalculateNormals (bool smooth) |
| Only makes sense for certain primitive types. | |
| virtual void | ApplyTransform (bool ScaleRotOnly=false) |
| virtual string | GetTypeName () |
| This needs to be set appropriately for all derived types. | |
| virtual Evaluator * | MakeEvaluator () |
Topology functions | |
Functions to get topological information about the primitive. These are lazily computed and stored as they can take some time. | |
| const vector< vector< int > > & | GetConnectedVerts () |
| const vector< vector< pair< int, int > > > & | GetUniqueEdges () |
| const vector< dVector > & | GetGeometricNormals () |
Indexed mode access | |
| void | SetIndexMode (bool s) |
| bool | IsIndexed () const |
| vector< unsigned int > & | GetIndex () |
| const vector< unsigned int > & | GetIndexConst () const |
| void | ConvertToIndexed () |
Protected Member Functions | |
| virtual void | PDataDirty () |
| Called when a named pdata mapping changes. | |
| void | GenerateTopology () |
| void | CalculateConnected () |
| void | CalculateGeometricNormals () |
| void | CalculateUniqueEdges () |
| void | UniqueEdgesFindShared (pair< int, int > edge, set< pair< int, int > > firstpass, set< pair< int, int > > &stored) |
| void | RecalculateNormalsIndexed () |
Protected Attributes | |
| vector< vector< int > > | m_ConnectedVerts |
| vector< dVector > | m_GeometricNormals |
| vector< vector< pair< int, int > > > | m_UniqueEdges |
| bool | m_IndexMode |
| vector< unsigned int > | m_IndexData |
| Type | m_Type |
| vector< dVector > * | m_VertData |
| vector< dVector > * | m_NormData |
| vector< dColour > * | m_ColData |
| vector< dVector > * | m_TexData |
Definition at line 30 of file PolyPrimitive.h.
| PolyPrimitive::PolyPrimitive | ( | Type | t = TRISTRIP |
) |
Definition at line 26 of file PolyPrimitive.cpp.
| PolyPrimitive::PolyPrimitive | ( | const PolyPrimitive & | other | ) |
Definition at line 39 of file PolyPrimitive.cpp.
| PolyPrimitive::~PolyPrimitive | ( | ) | [virtual] |
Definition at line 48 of file PolyPrimitive.cpp.
| PolyPrimitive * PolyPrimitive::Clone | ( | ) | const [virtual] |
Implements Fluxus::Primitive.
Reimplemented in Fluxus::TextPrimitive.
Definition at line 52 of file PolyPrimitive.cpp.
| void PolyPrimitive::Render | ( | ) | [virtual] |
Implements Fluxus::Primitive.
Reimplemented in Fluxus::TextPrimitive.
Definition at line 86 of file PolyPrimitive.cpp.
| dBoundingBox PolyPrimitive::GetBoundingBox | ( | ) | [virtual] |
| void PolyPrimitive::RecalculateNormals | ( | bool | smooth | ) | [virtual] |
Only makes sense for certain primitive types.
Reimplemented from Fluxus::Primitive.
Definition at line 202 of file PolyPrimitive.cpp.
| void PolyPrimitive::ApplyTransform | ( | bool | ScaleRotOnly = false |
) | [virtual] |
| virtual string Fluxus::PolyPrimitive::GetTypeName | ( | ) | [inline, virtual] |
This needs to be set appropriately for all derived types.
Reimplemented from Fluxus::Primitive.
Reimplemented in Fluxus::TextPrimitive.
Definition at line 48 of file PolyPrimitive.h.
| virtual Evaluator* Fluxus::PolyPrimitive::MakeEvaluator | ( | ) | [inline, virtual] |
Implements Fluxus::Primitive.
Reimplemented in Fluxus::TextPrimitive.
Definition at line 49 of file PolyPrimitive.h.
| Type Fluxus::PolyPrimitive::GetType | ( | ) | const [inline] |
Definition at line 52 of file PolyPrimitive.h.
| void PolyPrimitive::AddVertex | ( | const dVertex & | Vert | ) | [virtual] |
| void PolyPrimitive::Clear | ( | ) |
Clears out the primitive.
Reimplemented from Fluxus::PDataContainer.
Definition at line 57 of file PolyPrimitive.cpp.
| const vector<vector<int> >& Fluxus::PolyPrimitive::GetConnectedVerts | ( | ) | [inline] |
Connected verts is a list of lists of vertices which are coincident. If this polyprimitive is indexed the coincident verts are calculated by looking at the index values and the position of the index is stored, otherwise it's done by looking at the actual vertex positions, with a small allowed error, and the index is stored.
Definition at line 74 of file PolyPrimitive.h.
| const vector<vector<pair<int,int> > >& Fluxus::PolyPrimitive::GetUniqueEdges | ( | ) | [inline] |
Unique edges is a list of coincident edges in the topology, formed by pairs of vert indexes, or index positions if the poly is indexed.
Definition at line 79 of file PolyPrimitive.h.
| const vector<dVector>& Fluxus::PolyPrimitive::GetGeometricNormals | ( | ) | [inline] |
In indexed mode there is a geometric normal for every index
Definition at line 83 of file PolyPrimitive.h.
| void Fluxus::PolyPrimitive::SetIndexMode | ( | bool | s | ) | [inline] |
Definition at line 89 of file PolyPrimitive.h.
| bool Fluxus::PolyPrimitive::IsIndexed | ( | ) | const [inline] |
Definition at line 90 of file PolyPrimitive.h.
| vector<unsigned int>& Fluxus::PolyPrimitive::GetIndex | ( | ) | [inline] |
Definition at line 91 of file PolyPrimitive.h.
| const vector<unsigned int>& Fluxus::PolyPrimitive::GetIndexConst | ( | ) | const [inline] |
Definition at line 92 of file PolyPrimitive.h.
| void PolyPrimitive::ConvertToIndexed | ( | ) |
Look at coincident verts and compress the poly primitive into an indexed form
Definition at line 262 of file PolyPrimitive.cpp.
| void PolyPrimitive::PDataDirty | ( | ) | [protected, virtual] |
Called when a named pdata mapping changes.
Implements Fluxus::PDataContainer.
Definition at line 65 of file PolyPrimitive.cpp.
| void PolyPrimitive::GenerateTopology | ( | ) | [protected] |
Definition at line 317 of file PolyPrimitive.cpp.
| void PolyPrimitive::CalculateConnected | ( | ) | [protected] |
Definition at line 330 of file PolyPrimitive.cpp.
| void PolyPrimitive::CalculateGeometricNormals | ( | ) | [protected] |
Definition at line 373 of file PolyPrimitive.cpp.
| void PolyPrimitive::CalculateUniqueEdges | ( | ) | [protected] |
Definition at line 438 of file PolyPrimitive.cpp.
| void PolyPrimitive::UniqueEdgesFindShared | ( | pair< int, int > | edge, | |
| set< pair< int, int > > | firstpass, | |||
| set< pair< int, int > > & | stored | |||
| ) | [protected] |
Definition at line 480 of file PolyPrimitive.cpp.
| void Fluxus::PolyPrimitive::RecalculateNormalsIndexed | ( | ) | [protected] |
vector<vector<int> > Fluxus::PolyPrimitive::m_ConnectedVerts [protected] |
Definition at line 111 of file PolyPrimitive.h.
vector<dVector> Fluxus::PolyPrimitive::m_GeometricNormals [protected] |
Definition at line 112 of file PolyPrimitive.h.
vector<vector<pair<int,int> > > Fluxus::PolyPrimitive::m_UniqueEdges [protected] |
Definition at line 113 of file PolyPrimitive.h.
bool Fluxus::PolyPrimitive::m_IndexMode [protected] |
Definition at line 115 of file PolyPrimitive.h.
vector<unsigned int> Fluxus::PolyPrimitive::m_IndexData [protected] |
Definition at line 116 of file PolyPrimitive.h.
Type Fluxus::PolyPrimitive::m_Type [protected] |
Definition at line 118 of file PolyPrimitive.h.
vector<dVector>* Fluxus::PolyPrimitive::m_VertData [protected] |
Definition at line 119 of file PolyPrimitive.h.
vector<dVector>* Fluxus::PolyPrimitive::m_NormData [protected] |
Definition at line 120 of file PolyPrimitive.h.
vector<dColour>* Fluxus::PolyPrimitive::m_ColData [protected] |
Definition at line 121 of file PolyPrimitive.h.
vector<dVector>* Fluxus::PolyPrimitive::m_TexData [protected] |
Definition at line 122 of file PolyPrimitive.h.
1.5.1