Inheritance diagram for Eaagles::BasicGL::Clip3D:


Public Member Functions | |
| Clip3D () | |
| void | setClippingBox (const float xmin, const float xmax, const float ymin, const float ymax, const LCreal zmin=-FLT_MAX, const float LCreal=FLT_MAX) |
| LcPolygon * | clip (const LcPolygon &inPoly) const |
| unsigned int | clip (osg::Vec3 *const out, osg::Vec3 *const outNorm, osg::Vec2 *const outTCoord, const osg::Vec3 *const in, const osg::Vec3 *const inNorm, const osg::Vec2 *const inTCoord, const unsigned int num) const |
Static Public Member Functions | |
| static unsigned int | polyClip2Halfspace (osg::Vec3 *const q, osg::Vec3 *const qn, osg::Vec2 *const qt, const osg::Vec3 *const p, const osg::Vec3 *const pn, const osg::Vec2 *const pt, const unsigned int n, const unsigned int index, const LCreal k, const bool clipUpperPlane) |
Private Attributes | |
| LCreal | x0 |
| LCreal | x1 |
| LCreal | y0 |
| LCreal | y1 |
| LCreal | z0 |
| LCreal | z1 |
3D polygon clipping
| Eaagles::BasicGL::Clip3D::Clip3D | ( | ) |
| void Eaagles::BasicGL::Clip3D::setClippingBox | ( | const float | xmin, | |
| const float | xmax, | |||
| const float | ymin, | |||
| const float | ymax, | |||
| const LCreal | zmin = -FLT_MAX, |
|||
| const float | LCreal = FLT_MAX | |||
| ) |
Sets the limits of the clipping box.
clip() -- Clips the convex polygon 'inPoly' to the clipping box defined by setClippingBox(). The function returns a pointer to a new, clipped polygon, which has been pre-ref()'d, or zero if the whole 'inPoly' polygon is outside of the clipping box.
| unsigned int Eaagles::BasicGL::Clip3D::clip | ( | osg::Vec3 *const | out, | |
| osg::Vec3 *const | outNorm, | |||
| osg::Vec2 *const | outTCoord, | |||
| const osg::Vec3 *const | in, | |||
| const osg::Vec3 *const | inNorm, | |||
| const osg::Vec2 *const | inTCoord, | |||
| const unsigned int | num | |||
| ) | const |
clip() -- Clips the convex polygon 'in', which contains 'num' vertices, to the clipping box defined by setBox(). The function returns the number of vertices in the clipped polygon or zero if the whole polygon is outside of the clipping box. The vertices of the clipped polygon are returned in the user provided output arrays, which must be of at least size 'num'.
| unsigned int Eaagles::BasicGL::Clip3D::polyClip2Halfspace | ( | osg::Vec3 *const | q, | |
| osg::Vec3 *const | qn, | |||
| osg::Vec2 *const | qt, | |||
| const osg::Vec3 *const | p, | |||
| const osg::Vec3 *const | pn, | |||
| const osg::Vec2 *const | pt, | |||
| const unsigned int | n, | |||
| const unsigned int | index, | |||
| const LCreal | k, | |||
| const bool | clipUpperPlane | |||
| ) | [static] |
polyClip2Halfspace() -- clips one coordinate of a convex polygon p against an upper or lower plane. The clipped polygon is returned in q. The number of vertices in the clipped polygon is returned by the function.
LCreal Eaagles::BasicGL::Clip3D::x0 [private] |
left and right
LCreal Eaagles::BasicGL::Clip3D::x1 [private] |
LCreal Eaagles::BasicGL::Clip3D::y0 [private] |
top and bottom
LCreal Eaagles::BasicGL::Clip3D::y1 [private] |
LCreal Eaagles::BasicGL::Clip3D::z0 [private] |
near and far
LCreal Eaagles::BasicGL::Clip3D::z1 [private] |
1.5.0