#include <Face.h>
Inheritance diagram for Teddy::Models::Face:
Public Methods | |
Face () | |
Face constructor. More... | |
virtual | ~Face () |
Virtual destructor. More... | |
virtual void | add (const float x, const float y, const float z) |
Insert a vertex to the face, component version. More... | |
virtual void | add (Vertex *v) |
Insert a vertex to the face, pointer version. More... | |
virtual void | append (const float x, const float y, const float z) |
Insert a vertex to the face - pointer version, reverse order. More... | |
virtual void | append (Vertex *v) |
Insert a vertex to the face - pointer version, reverse order. More... | |
virtual void | draw (Projection *p) |
Drawing a Face Element. More... | |
virtual void | smooth (float max_smoothing_angle) |
Face Element is a polygon. The polygon is defined by edge vertices. Care must be taken to insert or append (and maintain) vertices in counterclockwise (IIRC) order for backfaceculling to work.
Definition at line 45 of file Face.h.
|
Face constructor.
Definition at line 44 of file Face.cpp. Referenced by smooth. |
|
Virtual destructor.
|
|
Insert a vertex to the face, pointer version.
Reimplemented from Teddy::Models::Element. Definition at line 56 of file Face.cpp. References Teddy::Models::Element::vertices. |
|
Insert a vertex to the face, component version.
Reimplemented from Teddy::Models::Element. Definition at line 63 of file Face.cpp. References Teddy::Models::Element::vertices. |
|
Insert a vertex to the face - pointer version, reverse order.
Reimplemented from Teddy::Models::Element. Definition at line 71 of file Face.cpp. References Teddy::Models::Element::vertices. |
|
Insert a vertex to the face - pointer version, reverse order.
Reimplemented from Teddy::Models::Element. Definition at line 78 of file Face.cpp. References Teddy::Models::Element::vertices. |
|
Implements Teddy::Models::Element. Definition at line 86 of file Face.cpp. References Teddy::SysSupport::dmsg, Teddy::Models::Element::EL_HAS_ELEMENT_NORMAL, Teddy::Models::Element::EL_USE_ELEMENT_NORMAL, Teddy::MixIn::Options::isEnabled, Teddy::SysSupport::M_MAT, Teddy::Models::Element::normal, and Teddy::Models::Element::vertices. |
|
Smooth face normals. Adjacent faces which normal difference is less or equal than max smoothing angle participate to the smoothed vertex normals. If the specified max smoothing angle is less or equal to zero, smoothing will not be done. If all adjacent faces either have normal difference more than the max smoothing angle or have equal normal, the face will remain Flat. This process calculates a normal for each vertex in the Face. If the existing Vertex has no normal set, the normal will set to existing Vertex. If the Vertex normal is already set to the same value, the Vertex will not be changed. If the Vertex has a different normal set it means that the Vertex is shared with some other Face which has already been processed. In this case a new Vertex will be created, and it will point to the old Vertex, or parent of the old Vertex, if it has such. The new normal will be set to the new Vertex. Reimplemented from Teddy::Models::Element. Definition at line 136 of file Face.cpp. References Teddy::MixIn::Options::disable, Teddy::SysSupport::dmsg, Teddy::Models::Element::EL_HAS_ELEMENT_NORMAL, Teddy::Models::Element::EL_USE_ELEMENT_NORMAL, Teddy::Models::Element::EL_USE_VERTEX_NORMALS, Teddy::SysSupport::emsg, Teddy::MixIn::Options::enable, Face, FACE_NORMAL_EPSILON, Teddy::Models::Element::getNormal, Teddy::MixIn::Options::isDisabled, Teddy::SysSupport::M_MAT, Teddy::SysSupport::M_VERT, Teddy::Models::Element::makeNormal, Teddy::Models::Element::normal, Vector, Teddy::Models::Element::vertices, and Teddy::Models::Element::VX_HAS_NORMAL. |