TriangleEntity Class Reference

TODO: Document More...

#include <TriangleEntity.h>

Inheritance diagram for TriangleEntity:

Inheritance graph
[legend]
Collaboration diagram for TriangleEntity:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void deserialize (XMLNode *from)
 Read entity properties and set its in object.
void setTransformMatrix (TransformMatrix *matrix)
 Set transofrmation matrix.
void divide (float size)
 Perform patch division.
PatchSequenceEnumeratorcreatePatchSequenceEnumerator ()
 Create enumerator for entity's patches.
TriangleSetExtcomputeVertexColors ()
 Compute per-vertex colors using simple interpolation.
XMLNode serialize ()
 Entity serialization to XMLNode.
void setName (XMLNode *from, const char *implicit="entity")
 All entities in input file can have explicit name. And this method set it.
void setName (std::string name)
 Set entity name.
std::string & getName ()
 Get name of entity.

Static Public Member Functions

static Entitycreate (XMLNode *from)
 Create a instantiate of special entity class.
static bool colorFromXMLNode (XMLNode *from, XMLCSTR attName, Color &to, int wlevel=2)
 Read color value from attribute of XMLNode and create its object representation.
static void setColors (XMLNode *from, Color &em, Color &refl, Color &rad)
 Read three colors from XMLnode from specified attributs and ctore its valeus.

Protected Member Functions

void addTriangle (Triangle *triangle)
 Add triangle to entity using tranformation matrix.

Detailed Description

TODO: Document

Todo:
Document.

Definition at line 19 of file TriangleEntity.h.


Member Function Documentation

void TriangleEntity::deserialize ( XMLNode *  from  )  [virtual]

Read entity properties and set its in object.

Parameters:
from XMLNode which has tagname triangleset

Reimplemented from Entity.

static Entity* Entity::create ( XMLNode *  from  )  [static, inherited]

Create a instantiate of special entity class.

Parameters:
from XMLNode containing entity declaration.
Returns:
entity created from XMLNode

void Entity::setTransformMatrix ( TransformMatrix matrix  )  [inherited]

Set transofrmation matrix.

Attention:
Calling this method after deserialize has no effect.
Parameters:
matrix Transformation matrix to set. There is no need to keep it in memory after call of this method.

void Entity::divide ( float  size  )  [inherited]

Perform patch division.

Parameters:
size Size of the largest acceptable patch.

PatchSequenceEnumerator* Entity::createPatchSequenceEnumerator (  )  [inherited]

Create enumerator for entity's patches.

Returns:
Return instance of PatchSequenceEnumerator allocated on the heap.

TriangleSetExt* Entity::computeVertexColors (  )  [inherited]

Compute per-vertex colors using simple interpolation.

Returns:
Return instance of TriangleSetExt allocated on the heap.

XMLNode Entity::serialize (  )  [inherited]

Entity serialization to XMLNode.

Returns:
XMLNode wich is representation of entity.

void Entity::setName ( XMLNode *  from,
const char *  implicit = "entity" 
) [inherited]

All entities in input file can have explicit name. And this method set it.

Parameters:
from XMLNode wich contains entity declaration.
implicit name when in xml doesn't exist

void Entity::setName ( std::string  name  )  [inline, inherited]

Set entity name.

Parameters:
name of entity

Definition at line 99 of file Entity.h.

std::string& Entity::getName (  )  [inline, inherited]

Get name of entity.

Returns:
Name of entity

Definition at line 105 of file Entity.h.

static bool Entity::colorFromXMLNode ( XMLNode *  from,
XMLCSTR  attName,
Color to,
int  wlevel = 2 
) [static, inherited]

Read color value from attribute of XMLNode and create its object representation.

Parameters:
from XMLnode with attribute contains color value
attName name of attribute with color
to reference of object to store value
wlevel is warnings level
Returns:
treu if color is succesfuly read and stored

static void Entity::setColors ( XMLNode *  from,
Color em,
Color refl,
Color rad 
) [static, inherited]

Read three colors from XMLnode from specified attributs and ctore its valeus.

Parameters:
from XMLNode containing entity declaration.
em Emmision color value
refl Reflectiovity color value
rad Radiosity color value

void Entity::addTriangle ( Triangle triangle  )  [protected, inherited]

Add triangle to entity using tranformation matrix.

Parameters:
triangle Triangle to add.


The documentation for this class was generated from the following file:
Generated on Thu Dec 6 19:33:12 2007 for Radiosity Renderer and Visualizer by  doxygen 1.5.2