| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/facet.h>

Public Types | |
| enum | WindingRule { FirstWindingRule, Odd, NonZero, Positive, Negative, AbsGreaterOne, LastWindingRule } |
| enum | EdgeFlagAttitude { FirstEdgeFlagAttitude, NoForce, ForceGeneration, ForceNoGeneration, LastEdgeFlagAttitude } |
| enum | Category { NotConvex = 1, NotConvexDegenerate = 2, ConvexDegenerate = 3, ConvexCCW = 4, ConvexCW = 5 } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (WindingRule) | |
| VRS_SERIALIZABLE_CLASS_ENUM (EdgeFlagAttitude) | |
| Facet (Iterator< Vector > *boundaryVertices=NULL, Iterator< Vector > *boundaryNormals=NULL, Iterator< Vector > *boundaryTexture=NULL, Iterator< Color > *boundaryColors=NULL, WindingRule windingRule=Facet::Odd, EdgeFlagAttitude edgeFlagAttitude=Facet::NoForce) | |
| void | setEdgeFlagAttitude (EdgeFlagAttitude edgeFlagAttitude) |
| EdgeFlagAttitude | getEdgeFlagAttitude () const |
| void | setWindingRule (WindingRule windingRule) |
| WindingRule | getWindingRule () const |
| void | insertLoop (unsigned int position, Iterator< Vector > *vertex=NULL, Iterator< Vector > *normals=NULL, Iterator< Vector > *texture=NULL, Iterator< Color > *color=NULL) |
| void | removeLoop (unsigned int loop) |
| unsigned int | loops () const |
| Iterator< Vector > * | vertexLoop (unsigned int loop) const |
| Iterator< Vector > * | normalLoop (unsigned int loop) const |
| Iterator< Vector > * | textureLoop (unsigned int loop) const |
| Iterator< Color > * | colorLoop (unsigned int loop) const |
| Category | category () const |
| Vector | normal () const |
| Calculates the polygon normal. | |
| virtual Bounds | boundingBox () const |
| Shapes define their bounding box in model coordinates. | |
| virtual void | modified () |
| VRS_TYPEINFO (Facet, Shape) | |
| VRS_SERIALIZABLE (Facet) | |
Classes | |
| struct | Loop |
If the FaceStyle attribute has the default value (CounterClockwise), then vertices of the outer boundary loop must be given counterclockwise for a normal generation that matches the left-handed coordinate system in VRS. This means for example that if the viewer is looking to the positive z-axis and the facet shall face to the the viewer (such that an implicit normal (0, 0, -1) is calculated), you have to specify the vertices of the outer boundary loop in counterclockwise order.
| enum VRS::Facet::Category |
| VRS::Facet::Facet | ( | Iterator< Vector > * | boundaryVertices = NULL, |
|
| Iterator< Vector > * | boundaryNormals = NULL, |
|||
| Iterator< Vector > * | boundaryTexture = NULL, |
|||
| Iterator< Color > * | boundaryColors = NULL, |
|||
| WindingRule | windingRule = Facet::Odd, |
|||
| EdgeFlagAttitude | edgeFlagAttitude = Facet::NoForce | |||
| ) |
| VRS::Facet::VRS_SERIALIZABLE_CLASS_ENUM | ( | WindingRule | ) |
| VRS::Facet::VRS_SERIALIZABLE_CLASS_ENUM | ( | EdgeFlagAttitude | ) |
| void VRS::Facet::setEdgeFlagAttitude | ( | EdgeFlagAttitude | edgeFlagAttitude | ) |
| EdgeFlagAttitude VRS::Facet::getEdgeFlagAttitude | ( | ) | const |
| void VRS::Facet::setWindingRule | ( | WindingRule | windingRule | ) |
| WindingRule VRS::Facet::getWindingRule | ( | ) | const |
| void VRS::Facet::insertLoop | ( | unsigned int | position, | |
| Iterator< Vector > * | vertex = NULL, |
|||
| Iterator< Vector > * | normals = NULL, |
|||
| Iterator< Vector > * | texture = NULL, |
|||
| Iterator< Color > * | color = NULL | |||
| ) |
| void VRS::Facet::removeLoop | ( | unsigned int | loop | ) |
| unsigned int VRS::Facet::loops | ( | ) | const |
A facet is specified by at least one vertex loop. The first loop describes the boundary polygon. All other loops describe inner loops, i.e., holes in the polygon. A loop's vertices are given by the vertex iterator. Colors, texture, and normals are managed in the same way, these iterators are optional.
Returns the iterators for the data of a given loop. If the data is not available, NULL is returned.
| Category VRS::Facet::category | ( | ) | const |
Returns the category of the facet's outer loop: `ConvexCW': It is convex and the vertices form a clockwise oriented polygon. `ConvexCCW': It is convex and the vertices form a counterclockwise oriented polygon. `ConvexDegenerated': All vertices are on the same line, but they are monotonically increasing and decreasing (lexicographic order). `NotConvexDegenerated': The facet is not convex, and its vertices are on the same line, but they are not monotonically increasing and decreasing. `NotConvex': The facet is not degenerated and not convex.
WARNING: seems to have bugs, i.e., cannot distinguish between NotConvexDegenerate and ConvexDegenerate resp. ConvexCCW and ConvexCW.
| Vector VRS::Facet::normal | ( | ) | const |
Calculates the polygon normal.
The direction of the normal is chosen so that it points into the half space from which the outer loop appears counterclockwise.
| virtual Bounds VRS::Facet::boundingBox | ( | ) | const [virtual] |
| virtual void VRS::Facet::modified | ( | ) | [virtual] |
Reimplemented from VRS::SharedObj.
| VRS::Facet::VRS_SERIALIZABLE | ( | Facet | ) |