#include <Entity.h>
Inheritance diagram for Entity:
Public Member Functions | |
Entity () | |
virtual | ~Entity () |
Entity (const Entity &) | |
Deep copy. | |
Entity & | operator= (const Entity &) |
Deep copy. | |
void | setTransformMatrix (TransformMatrix *matrix) |
Set transofrmation matrix. | |
virtual void | deserialize (XMLNode *from) |
Entity deserialization from XMLNode. | |
void | divide (float size) |
Perform patch division. | |
PatchSequenceEnumerator * | createPatchSequenceEnumerator () |
Create enumerator for entity's patches. | |
TriangleSetExt * | computeVertexColors () |
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 Entity * | create (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. |
Definition at line 26 of file Entity.h.
Entity::Entity | ( | ) |
virtual Entity::~Entity | ( | ) | [virtual] |
Entity::Entity | ( | const Entity & | ) |
Deep copy.
static Entity* Entity::create | ( | XMLNode * | from | ) | [static] |
Create a instantiate of special entity class.
from | XMLNode containing entity declaration. |
void Entity::setTransformMatrix | ( | TransformMatrix * | matrix | ) |
Set transofrmation matrix.
matrix | Transformation matrix to set. There is no need to keep it in memory after call of this method. |
virtual void Entity::deserialize | ( | XMLNode * | from | ) | [virtual] |
Entity deserialization from XMLNode.
from | XMLNode which contains entity declaration |
Reimplemented in BarrelEntity, CuboidEntity, GlobeEntity, TeapotEntity, and TriangleEntity.
void Entity::divide | ( | float | size | ) |
Perform patch division.
size | Size of the largest acceptable patch. |
PatchSequenceEnumerator* Entity::createPatchSequenceEnumerator | ( | ) |
Create enumerator for entity's patches.
TriangleSetExt* Entity::computeVertexColors | ( | ) |
Compute per-vertex colors using simple interpolation.
XMLNode Entity::serialize | ( | ) |
void Entity::setName | ( | XMLNode * | from, | |
const char * | implicit = "entity" | |||
) |
All entities in input file can have explicit name. And this method set it.
from | XMLNode wich contains entity declaration. | |
implicit | name when in xml doesn't exist |
void Entity::setName | ( | std::string | name | ) | [inline] |
std::string& Entity::getName | ( | ) | [inline] |
static bool Entity::colorFromXMLNode | ( | XMLNode * | from, | |
XMLCSTR | attName, | |||
Color & | to, | |||
int | wlevel = 2 | |||
) | [static] |
Read color value from attribute of XMLNode and create its object representation.
from | XMLnode with attribute contains color value | |
attName | name of attribute with color | |
to | reference of object to store value | |
wlevel | is warnings level |
Read three colors from XMLnode from specified attributs and ctore its valeus.
from | XMLNode containing entity declaration. | |
em | Emmision color value | |
refl | Reflectiovity color value | |
rad | Radiosity color value |
void Entity::addTriangle | ( | Triangle * | triangle | ) | [protected] |