Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

model::Face Class Reference
[The PCG model layer]

A Face class. More...

#include <Face.h>

Collaboration diagram for model::Face:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Face ()
 Face (Vertex *vertex1, Vertex *vertex2)
 Face (Vertex *vertex1, Vertex *vertex2, Vertex *vertex3)
 Face (Vertex *vertex1, Vertex *vertex2, Vertex *vertex3, Vertex *vertex4)
 ~Face ()
 Face (const Face &other)
Faceoperator= (const Face &other)
int getCount ()
void setVertex (int iIndex, Vertex *vertex)
void setVertices (Vertex *vertex1, Vertex *vertex2)
void setVertices (Vertex *vertex1, Vertex *vertex2, Vertex *vertex3)
void setVertices (Vertex *vertex1, Vertex *vertex2, Vertex *vertex3, Vertex *vertex4)
VertexgetVertex (int iIndex)
vector< Vertex * > getVertices ()
IvVector3 computeNormal ()
bool operator== (const Face &other) const
bool operator!= (const Face &other) const

Private Attributes

Vertexm_vertices
int m_iCount

Detailed Description

A Face class.

Constition of Vertex's.

See also:
Vertex

Definition at line 33 of file Face.h.


Constructor & Destructor Documentation

model::Face::Face  )  [inline]
 

Definition at line 43 of file Face.h.

00043 {};

Face::Face Vertex vertex1,
Vertex vertex2
 

Write brief comment for Face here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Face here.

Remarks:
Write remarks for Face here.
See also:
Separate items with the '|' character.

Definition at line 27 of file Face.cpp.

References setVertices().

00027                                            {
00028         setVertices(vertex1, vertex2);
00029 }

Here is the call graph for this function:

Face::Face Vertex vertex1,
Vertex vertex2,
Vertex vertex3
 

Write brief comment for Face here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
vertex3 Description of parameter vertex3.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Face here.

Remarks:
Write remarks for Face here.
See also:
Separate items with the '|' character.

Definition at line 55 of file Face.cpp.

References setVertices().

00055                                                             {
00056         setVertices(vertex1, vertex2, vertex3);
00057 }

Here is the call graph for this function:

Face::Face Vertex vertex1,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4
 

Write brief comment for Face here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
vertex3 Description of parameter vertex3.
vertex4 Description of parameter vertex4.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Face here.

Remarks:
Write remarks for Face here.
See also:
Separate items with the '|' character.

Definition at line 86 of file Face.cpp.

References setVertices().

00086                                                                              {
00087         setVertices(vertex1, vertex2, vertex3, vertex4);
00088 }

Here is the call graph for this function:

model::Face::~Face  )  [inline]
 

Definition at line 47 of file Face.h.

00047 {};

Face::Face const Face other  ) 
 

Write brief comment for Face here.

Parameters:
other Description of parameter other.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for Face here.

Remarks:
Write remarks for Face here.
See also:
Separate items with the '|' character.

Definition at line 108 of file Face.cpp.

References m_iCount, and m_vertices.

00108                             {
00109     m_vertices = other.m_vertices;
00110         m_iCount = other.m_iCount;
00111 }  


Member Function Documentation

IvVector3 Face::computeNormal  ) 
 

Write brief comment for computeNormal here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for computeNormal here.

Remarks:
Write remarks for computeNormal here.
See also:
Separate items with the '|' character.

Definition at line 307 of file Face.cpp.

00307                               {
00308         return IvVector3();
00309 }

int Face::getCount  ) 
 

Write brief comment for getCount here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getCount here.

Remarks:
Write remarks for getCount here.
See also:
Separate items with the '|' character.

Definition at line 395 of file Face.cpp.

00395                    {
00396         return m_iCount;
00397 }

Vertex * Face::getVertex int  iIndex  ) 
 

Write brief comment for getVertex here.

Parameters:
iIndex Description of parameter iIndex.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getVertex here.

Remarks:
Write remarks for getVertex here.
See also:
Separate items with the '|' character.

Definition at line 285 of file Face.cpp.

References m_vertices.

Referenced by functions::Importer::readAttributes(), pcggui::Render(), and model::Model::save().

00285                                   {
00286         return m_vertices[iIndex];
00287 }

vector< Vertex * > Face::getVertices  ) 
 

Write brief comment for getVertices here.

Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for getVertices here.

Remarks:
Write remarks for getVertices here.
See also:
Separate items with the '|' character.

Definition at line 417 of file Face.cpp.

00417                                   {
00418         return m_vertices;
00419 }

bool Face::operator!= const Face other  )  const
 

Write brief comment for operator != here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator != here.

Remarks:
Write remarks for operator != here.
See also:
Separate items with the '|' character.

Definition at line 365 of file Face.cpp.

References m_iCount, and m_vertices.

00366 {
00367         if(other.m_vertices[0] == m_vertices[0] 
00368         && other.m_vertices[1] == m_vertices[1] 
00369         && other.m_vertices[2] == m_vertices[2]
00370         && other.m_vertices[3] == m_vertices[3]
00371         && other.m_iCount == m_iCount) {
00372         return false;
00373         }
00374     return true;
00375 }  

Face & Face::operator= const Face other  ) 
 

Write brief comment for operator = here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator = here.

Remarks:
Write remarks for operator = here.
See also:
Separate items with the '|' character.

Definition at line 134 of file Face.cpp.

References m_iCount, and m_vertices.

00135 {
00136     // if same object
00137     if ( this == &other )
00138         return *this;
00139         
00140     m_vertices = other.m_vertices;
00141         m_iCount = other.m_iCount;
00142 
00143     return *this;
00144 }  

bool Face::operator== const Face other  )  const
 

Write brief comment for operator == here.

Parameters:
other Description of parameter other.
Returns:
Write description of return value here.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for operator == here.

Remarks:
Write remarks for operator == here.
See also:
Separate items with the '|' character.

Definition at line 332 of file Face.cpp.

References m_iCount, and m_vertices.

00333 {
00334     if(other.m_vertices[0] == m_vertices[0] 
00335         && other.m_vertices[1] == m_vertices[1] 
00336         && other.m_vertices[2] == m_vertices[2]
00337         && other.m_vertices[3] == m_vertices[3]
00338         && other.m_iCount == m_iCount) {
00339         return true;
00340         }
00341     return false;  
00342 }   

void Face::setVertex int  iIndex,
Vertex vertex
 

Write brief comment for setVertex here.

Parameters:
iIndex Description of parameter iIndex.
vertex Description of parameter vertex.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setVertex here.

Remarks:
Write remarks for setVertex here.
See also:
Separate items with the '|' character.

Definition at line 167 of file Face.cpp.

References m_vertices.

00167                                                {
00168                 m_vertices[iIndex] = vertex;
00169 }

void Face::setVertices Vertex vertex1,
Vertex vertex2,
Vertex vertex3,
Vertex vertex4
 

Write brief comment for setVertices here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
vertex3 Description of parameter vertex3.
vertex4 Description of parameter vertex4.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setVertices here.

Remarks:
Write remarks for setVertices here.
See also:
Separate items with the '|' character.

Definition at line 256 of file Face.cpp.

References m_iCount, and m_vertices.

00256                                                                                          {
00257         m_iCount = 4;
00258         m_vertices.push_back(vertex1);
00259         m_vertices.push_back(vertex2);
00260         m_vertices.push_back(vertex3);
00261         m_vertices.push_back(vertex4);
00262 }

void Face::setVertices Vertex vertex1,
Vertex vertex2,
Vertex vertex3
 

Write brief comment for setVertices here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
vertex3 Description of parameter vertex3.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setVertices here.

Remarks:
Write remarks for setVertices here.
See also:
Separate items with the '|' character.

Definition at line 222 of file Face.cpp.

References m_iCount, and m_vertices.

00222                                                                         {
00223         m_iCount = 3;
00224         m_vertices.push_back(vertex1);
00225         m_vertices.push_back(vertex2);
00226         m_vertices.push_back(vertex3);
00227 }

void Face::setVertices Vertex vertex1,
Vertex vertex2
 

Write brief comment for setVertices here.

Parameters:
vertex1 Description of parameter vertex1.
vertex2 Description of parameter vertex2.
Exceptions:
<exception class> Description of criteria for throwing this exception.
Write detailed description for setVertices here.

Remarks:
Write remarks for setVertices here.
See also:
Separate items with the '|' character.

Definition at line 192 of file Face.cpp.

References m_iCount, and m_vertices.

Referenced by pcggui::CovertScene(), Face(), and model::Model::load().

00192                                                        {
00193         m_iCount = 2;
00194         m_vertices.push_back(vertex1);
00195         m_vertices.push_back(vertex2);
00196 }


Member Data Documentation

int model::Face::m_iCount [private]
 

Definition at line 40 of file Face.h.

Referenced by Face(), operator!=(), operator=(), operator==(), and setVertices().

Vertex* model::Face::m_vertices [private]
 

Definition at line 36 of file Face.h.

Referenced by Face(), getVertex(), operator!=(), operator=(), operator==(), setVertex(), and setVertices().


The documentation for this class was generated from the following files:
Generated on Tue Apr 17 09:40:02 2007 for PCG Library by  doxygen 1.3.9.1