Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ACG::Geometry::PlaneT< Scalar > Class Template Reference

#include <ACG/Geometry/Types/Plane.hh>

Public Types

enum  IntersectionTarget { Line, LineSegment, Ray }
typedef VectorT< Scalar, 3 > Vec3
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 Vec4coeffs () const
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_

Detailed Description

template<typename Scalar>
class ACG::Geometry::PlaneT< Scalar >

This class stores a plane in normal form and provides useful algorithms for left/right test, itersection, and so on.

Definition at line 88 of file PlaneT.hh.

Member Function Documentation

template<typename Scalar >
bool ACG::Geometry::PlaneT< Scalar >::intersect ( const Vec3 _v0,
const Vec3 _v1,
Vec3 _v,
Scalar &  _t,
IntersectionTarget  _target 
) const

General intersection function.

General intersection between a line/ray and the plane.

_v0start vector of the ray
_v1end vector of the ray
_vreturned intersection point
_treturned relative distance from the interection to _v0 compared to _v1
_targettype of intersection to test
true if an intersection was found

Definition at line 170 of file PlaneT.hh.

The documentation for this class was generated from the following file: