Developer Documentation
|
#include <ACG/Geometry/Types/Plane.hh>
Public Types | |
enum | IntersectionTarget { Line, LineSegment, Ray } |
typedef VectorT< Scalar, 3 > | Vec3 |
typedefs | |
typedef VectorT< Scalar, 4 > | Vec4 |
typedef Matrix4x4T< Scalar > | Mat4x4 |
Public Member Functions | |
PlaneT (Scalar _a=0, Scalar _b=0, Scalar _c=0, Scalar _d=0) | |
constructor: coefficients | |
PlaneT (const Vec3 &_o, const Vec3 &_n) | |
constructor: origin and normal | |
PlaneT (const Vec3 &_v0, const Vec3 &_v1, const Vec3 &_v2) | |
constructor: 3 points | |
Vec3 | normal () const |
normal vector | |
const Vec4 & | coeffs () const |
coeffitients | |
Scalar | distance (const Vec3 &_v) const |
signed distance point-plane | |
bool | operator() (const Vec3 &_v) const |
predicate: above plane | |
bool | intersect_line (const Vec3 &_v0, const Vec3 &_v1, Vec3 &_v, Scalar &_t) const |
bool | intersect_ray (const Vec3 &_v0, const Vec3 &_v1, Vec3 &_v, Scalar &_t) const |
bool | intersect_linesegment (const Vec3 &_v0, const Vec3 &_v1, Vec3 &_v, Scalar &_t) const |
bool | intersect (const Vec3 &_v0, const Vec3 &_v1, Vec3 &_v, Scalar &_t, IntersectionTarget _target) const |
General intersection function. More... | |
bool | affine_transformation (const Mat4x4 &_M) |
affine transformation of the plane | |
void | affine_transformation_precomp (const Mat4x4 &_M_inverseTransposed) |
affine transformation of the plane (M^{-T} precomputed) | |
Private Member Functions | |
void | HNF () |
Private Attributes | |
Vec4 | coeffs_ |
This class stores a plane in normal form and provides useful algorithms for left/right test, itersection, and so on.
|
inline |
General intersection function.
General intersection between a line/ray and the plane.
_v0 | start vector of the ray |
_v1 | end vector of the ray |
_v | returned intersection point |
_t | returned relative distance from the interection to _v0 compared to _v1 |
_target | type of intersection to test |