#include <Vertex.h>
Public Member Functions | |
| Vertex () | |
| Default constructor. | |
| Vertex (IvVector3 *vCoordinates) | |
| Constructor taking a coordinates vector. | |
| Vertex (float fX, float fY, float fZ) | |
| Constructor taking 3 floats as coorninates. | |
| ~Vertex () | |
| Default deconstructor. | |
| Vertex (const Vertex &other) | |
| Copy constructor. | |
| Vertex & | operator= (const Vertex &other) |
| Copy assignmed. | |
| IvVector3 * | getCoordinates () |
| Get coordinates. | |
| void | setCoordinates (IvVector3 *vCoordinates) |
| Set coordinates. | |
| void | setCoordinates (float fX, float fY, float fZ) |
| Sets the coordinates. | |
| void | updateCoordinates (float fX, float fY, float fZ) |
| Sets the coordinates. | |
| IvVector3 * | getNormal () |
| Get normal. | |
| void | setNormal (IvVector3 *vNormal) |
| Sets the normal. | |
| void | setNormal (float fX, float fY, float fZ) |
| Sets the normal. | |
| void | setIndex (int index) |
| Sets the index. | |
| int | getIndex () |
| Get the index. | |
| void | translate (IvVector3 *vTargetPos) |
| Translates the Vertex. | |
| void | rotate (float fAngleX, float fAngleY, float fAngleZ) |
| Rotate the Vertex. | |
| bool | operator== (const Vertex &other) const |
| Comparition operator. | |
| bool | operator!= (const Vertex &other) const |
| Comparition operator. | |
Private Attributes | |
| IvVector3 * | m_vCoordinates |
| Vector holding the coordinates of the vertex. | |
| IvVector3 * | m_vNormal |
| int | m_index |
A data holding class for a Vertex. It has functions to calculate rotation and translation.
Definition at line 22 of file Vertex.h.
|
|
Default constructor. Creates a empty Vertex Definition at line 35 of file Vertex.h. 00035 {};
|
|
|
Constructor taking a coordinates vector. A constructor that takes a vector and creates a vertex with the vector as it's coordinates.
Definition at line 16 of file Vertex.cpp. References m_index, and setCoordinates(). 00016 {
00017 setCoordinates(vCoordinates);
00018 m_index = 0;
00019 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Constructor taking 3 floats as coorninates.
Definition at line 36 of file Vertex.cpp. References m_index, and setCoordinates(). 00036 {
00037 setCoordinates(fX,fY,fZ);
00038 m_index = 0;
00039 }
|
Here is the call graph for this function:

|
|
Default deconstructor. It does nothing. Definition at line 46 of file Vertex.h. 00046 {};
|
|
|
Copy constructor. Copying all the variables to the new Vertex.
Definition at line 50 of file Vertex.cpp. References m_index. 00050 : 00051 m_vCoordinates( other.m_vCoordinates ), 00052 m_vNormal( other.m_vNormal ) 00053 { 00054 m_index = 0; 00055 }
|
|
|
Get coordinates. Returns the coordiantes of the Vertex.
Definition at line 136 of file Vertex.cpp. Referenced by model::Model::getModelVertexs(), pcggui::Render(), and model::Model::save(). 00136 {
00137 return m_vCoordinates;
00138 }
|
|
|
Get the index. Returns the index of the Vertex.
Definition at line 272 of file Vertex.cpp. Referenced by pcggui::Render(), and model::Model::save(). 00272 {
00273 return m_index;
00274 }
|
|
|
Get normal. Returns the normal of the Vertex.
Definition at line 148 of file Vertex.cpp. Referenced by pcggui::Render(), and model::Model::save(). 00148 {
00149 return m_vNormal;
00150 }
|
|
|
Comparition operator. Compare two Vertexs to see if they are not equal.
Definition at line 244 of file Vertex.cpp. References m_vCoordinates, and m_vNormal. 00245 {
00246 if(other.m_vCoordinates == m_vCoordinates && other.m_vNormal == m_vNormal) {
00247 return false;
00248 }
00249 return true;
00250 }
|
|
|
Copy assignmed. Copying all the variables to the new Vertex.
Definition at line 66 of file Vertex.cpp. References m_vCoordinates, and m_vNormal. 00067 {
00068 // if same object
00069 if ( this == &other )
00070 return *this;
00071
00072 m_vCoordinates = other.m_vCoordinates;
00073 m_vNormal = other.m_vNormal;
00074
00075 return *this;
00076 }
|
|
|
Comparition operator. Compare two Vertexs to see if thay are equal.
Definition at line 225 of file Vertex.cpp. References m_vCoordinates, and m_vNormal. 00226 {
00227 if(other.m_vCoordinates == m_vCoordinates && other.m_vNormal == m_vNormal) {
00228 return true;
00229 }
00230 return false;
00231 }
|
|
||||||||||||||||
|
Rotate the Vertex. Changes the normal of the vertex giving 3 angles.
Definition at line 208 of file Vertex.cpp. References m_vNormal. 00208 {
00209 IvMatrix33 euler = IvMatrix33();
00210 euler.Rotation(fAngleZ, fAngleY, fAngleX);
00211 m_vNormal = &(*m_vNormal * euler);
00212 }
|
|
||||||||||||||||
|
Sets the coordinates. Sets the coordinates of the Vertex giving 3 floats.
Definition at line 92 of file Vertex.cpp. References m_vCoordinates. 00092 {
00093 m_vCoordinates = new IvVector3(fX,fY,fZ);
00094 }
|
|
|
Set coordinates. Sets the coordnates of the Vertex giving a vector.
Definition at line 104 of file Vertex.cpp. References m_vCoordinates. Referenced by pcggui::CovertScene(), model::Model::load(), and Vertex(). 00104 {
00105 m_vCoordinates = vCoordinates;
00106 }
|
|
|
Sets the index. Sets the index of the Vertex giving a int.
Definition at line 260 of file Vertex.cpp. References m_index. Referenced by model::Model::addVertex(). 00260 {
00261 m_index = index;
00262 }
|
|
||||||||||||||||
|
Sets the normal. Sets the normal of the Vertex giving 3 floats.
Definition at line 178 of file Vertex.cpp. References m_vNormal. 00178 {
00179 m_vNormal = new IvVector3(fX,fY,fZ);
00180 }
|
|
|
Sets the normal. Sets the normal of the Vertex giving a vector.
Definition at line 160 of file Vertex.cpp. References m_vNormal. Referenced by pcggui::CovertScene(), model::Model::load(), functions::Importer::readAttributes(), and pcggui::Render(). 00160 {
00161 m_vNormal = vNormal;
00162 }
|
|
|
Translates the Vertex. Giving a vector the Vertex is translated as denoted by the vector.
Definition at line 190 of file Vertex.cpp. References m_vCoordinates. 00190 {
00191 m_vCoordinates=&(*m_vCoordinates + *vTargetpos);
00192 }
|
|
||||||||||||||||
|
Sets the coordinates. Sets the coordinates of the Vertex giving 3 floats.
Definition at line 122 of file Vertex.cpp. References m_vCoordinates. Referenced by model::Model::updateVertices(). 00122 {
00123 m_vCoordinates->x = fX;
00124 m_vCoordinates->y = fY;
00125 m_vCoordinates->z = fZ;
00126 }
|
|
|
Definition at line 27 of file Vertex.h. Referenced by setIndex(), and Vertex(). |
|
|
Vector holding the coordinates of the vertex.
Definition at line 25 of file Vertex.h. Referenced by operator!=(), operator=(), operator==(), setCoordinates(), translate(), and updateCoordinates(). |
|
|
Definition at line 26 of file Vertex.h. Referenced by operator!=(), operator=(), operator==(), rotate(), and setNormal(). |
1.3.9.1