etk::Plane< T > Class Template Reference

#include <Plane.hpp>

Public Member Functions

 Plane ()
 
 Plane (etk::Vector3D< T > _normal, T _intercept=0)
 
 Plane (const Plane &_obj)
 
void setNormal (const etk::Vector3D< T > &_obj)
 
void setIntercept (float _intercept)
 
void setFromPoints (const etk::Vector3D< T > &_p0, const etk::Vector3D< T > &_p1, const etk::Vector3D< T > &_p2)
 
void calculateIntercept (const etk::Vector3D< T > &_pointOnPlane)
 
void normalize ()
 
const etk::Vector3D< T > & getNormal () const
 
getIntercept () const
 
etk::Vector3D< T > intersect3 (const Plane< T > &_p2, const Plane< T > &_p3)
 
float getDistance (const etk::Vector3D< T > &_point) const
 
Plane< T > linearInterpolate (const Plane< T > &_p2, float _factor)
 
bool operator== (const Plane< T > &_obj) const
 
bool operator!= (const Plane< T > &_obj) const
 

Detailed Description

template<typename T>
class etk::Plane< T >

Plane equation template: define a plane equation.

Todo:
Validate it, this is a !!! PROTOTYPE !!!

Constructor & Destructor Documentation

§ Plane() [1/3]

template<typename T>
etk::Plane< T >::Plane ( )
inline

Constructor of a Plane.

§ Plane() [2/3]

template<typename T>
etk::Plane< T >::Plane ( etk::Vector3D< T >  _normal,
_intercept = 0 
)
inline

Constructor of a Plane.

Parameters
[in]_normalNormal of the plane
[in]_interceptInterception value of the plane

§ Plane() [3/3]

template<typename T>
etk::Plane< T >::Plane ( const Plane< T > &  _obj)
inline

Copy constructor of a Plane.

Parameters
[in]_objPlane object to copy

Member Function Documentation

§ calculateIntercept()

template<typename T>
void etk::Plane< T >::calculateIntercept ( const etk::Vector3D< T > &  _pointOnPlane)
inline

Calculate interception value with a point in the plane.

Parameters
[in]_pointOnPlanePoint in the plane

§ getDistance()

template<typename T>
float etk::Plane< T >::getDistance ( const etk::Vector3D< T > &  _point) const
inline

Get distance from a point to the plane.

Parameters
[in]_pointPoint to calculate the distance
Returns
distance of the Point

§ getIntercept()

template<typename T>
T etk::Plane< T >::getIntercept ( ) const
inline

Get intercept Value of the plane.

Returns
The Intercept value

§ getNormal()

template<typename T>
const etk::Vector3D<T>& etk::Plane< T >::getNormal ( ) const
inline

Get the normal of the plane.

Returns
Vector of the normal

§ intersect3()

template<typename T>
etk::Vector3D<T> etk::Plane< T >::intersect3 ( const Plane< T > &  _p2,
const Plane< T > &  _p3 
)
inline

Get the intersection between 3 planes.

Parameters
[in]_p2Second plane
[in]_p3Third plane
Returns
vec3(0,0,0) No Intersection find, else when find

§ linearInterpolate()

template<typename T>
Plane<T> etk::Plane< T >::linearInterpolate ( const Plane< T > &  _p2,
float  _factor 
)
inline

Create a linear interpolation of the plane with an other.

Parameters
[in]_p2Second plane
[in]_factorFactor to scale
Returns
New plane equation

§ normalize()

template<typename T>
void etk::Plane< T >::normalize ( )
inline

Normalize tha plane properties.

§ operator!=()

template<typename T>
bool etk::Plane< T >::operator!= ( const Plane< T > &  _obj) const
inline

In-Equality compare operator with an other object.

Parameters
[in]_objReference on the comparing object
Returns
true The Objects are NOT identical
false The Objects are identical

§ operator==()

template<typename T>
bool etk::Plane< T >::operator== ( const Plane< T > &  _obj) const
inline

Equality compare operator with an other object.

Parameters
[in]_objReference on the comparing object
Returns
true The Objects are identical
false The Objects are NOT identical

§ setFromPoints()

template<typename T>
void etk::Plane< T >::setFromPoints ( const etk::Vector3D< T > &  _p0,
const etk::Vector3D< T > &  _p1,
const etk::Vector3D< T > &  _p2 
)
inline

Set the plane with 3 points in the space.

Parameters
[in]_p0First point
[in]_p1Second point
[in]_p2Thrid point

§ setIntercept()

template<typename T>
void etk::Plane< T >::setIntercept ( float  _intercept)
inline

Set interception value of the plane.

Parameters
[in]_interceptValue of the intercept

§ setNormal()

template<typename T>
void etk::Plane< T >::setNormal ( const etk::Vector3D< T > &  _obj)
inline

Set the normal of the plane.

Parameters
[in]_objVector of the normal

The documentation for this class was generated from the following file:
  • framework/atria-soft/etk/etk/math/Plane.hpp