Inheritance diagram for Eaagles::BasicGL::LcPolygon:


Public Types | |
| enum | { A = 0, B = 1, C = 2, D = 3 } |
Public Member Functions | |
| LcPolygon () | |
| const osg::Vec3 * | getNormal () const |
| void | setNormal (const osg::Vec3 &nn) |
| bool | calcNormal () |
| bool | arePlaneCoeffValid () const |
| const osg::Vec4 * | getPlaneCoeff () const |
| bool | calcPlaneCoeff () |
| LCreal | calcZ (const osg::Vec2 &point) const |
| unsigned int | getLayer () const |
| void | setLayer (const unsigned int newLayer) |
| virtual void | drawFunc () |
Static Public Member Functions | |
| static bool | calcNormal (osg::Vec3 &norm, const osg::Vec3 v[3]) |
| static bool | calcPlaneCoeff (osg::Vec4 &cc, const osg::Vec3 v[3]) |
| static LCreal | calcZ (const osg::Vec2 &point, const osg::Vec4 &coeff) |
Private Attributes | |
| osg::Vec4 | coeff |
| bool | coeffValid |
| osg::Vec3 | norm |
| unsigned int | layerValue |
General purpose polygon
| Eaagles::BasicGL::LcPolygon::LcPolygon | ( | ) |
Constructor. Initializes the coefficients of the plane equation (a vector of type osg::Vec4) to (0, 0, 0, 0); sets 'coeffValid' indicating if the coefficients are valid and sets the normal to the polygon 'norm' (type osg::Vec3) to (1, 0, 0).
| const osg::Vec3* Eaagles::BasicGL::LcPolygon::getNormal | ( | ) | const [inline] |
Returns the vector normal to this polygon. Calling calcNormal() will compute the normal vector for this polygon.
| void Eaagles::BasicGL::LcPolygon::setNormal | ( | const osg::Vec3 & | nn | ) | [inline] |
Sets the normal to the polygon to nn.
| bool Eaagles::BasicGL::LcPolygon::calcNormal | ( | ) |
Computes the vector normal to the polygon.
| bool Eaagles::BasicGL::LcPolygon::calcNormal | ( | osg::Vec3 & | norm, | |
| const osg::Vec3 | v[3] | |||
| ) | [static] |
Computes the normal vector 'norm' for the plane defined by the three vertices 'v'. Returns true if norm is valid.
| bool Eaagles::BasicGL::LcPolygon::arePlaneCoeffValid | ( | ) | const [inline] |
Returns true if the coefficients of the plane equation are valid.
| const osg::Vec4* Eaagles::BasicGL::LcPolygon::getPlaneCoeff | ( | ) | const [inline] |
Returns the plane equation coefficients for the plane containing this polygon. Calling calcPlaneCoeff() will compute these coefficents for this polygon.
| bool Eaagles::BasicGL::LcPolygon::calcPlaneCoeff | ( | ) |
Computes the plane equation coefficient for the polygon.
| bool Eaagles::BasicGL::LcPolygon::calcPlaneCoeff | ( | osg::Vec4 & | cc, | |
| const osg::Vec3 | v[3] | |||
| ) | [static] |
Computes the plane equation coefficients for the plane defined by the three vertices v. This returns true if the coefficients are valid.
| LCreal Eaagles::BasicGL::LcPolygon::calcZ | ( | const osg::Vec2 & | point | ) | const |
Compute the Z value of the polygon. The plane equation coefficients must be valid.
| LCreal Eaagles::BasicGL::LcPolygon::calcZ | ( | const osg::Vec2 & | point, | |
| const osg::Vec4 & | coeff | |||
| ) | [static] |
Computes the Z value for a point 'p', located on the plane defined by the coefficients 'coeff'.
| unsigned int Eaagles::BasicGL::LcPolygon::getLayer | ( | ) | const [inline] |
Returns the layer value.
| void Eaagles::BasicGL::LcPolygon::setLayer | ( | const unsigned int | newLayer | ) |
Sets the layer value to newLayer.
| void Eaagles::BasicGL::LcPolygon::drawFunc | ( | ) | [virtual] |
osg::Vec4 Eaagles::BasicGL::LcPolygon::coeff [private] |
Coefficients of the plane equation.
bool Eaagles::BasicGL::LcPolygon::coeffValid [private] |
'coeff' numbers are valid
osg::Vec3 Eaagles::BasicGL::LcPolygon::norm [private] |
normal to the polygon
unsigned int Eaagles::BasicGL::LcPolygon::layerValue [private] |
Layer value.
1.5.0