7 #ifndef __FWMATH_PLANEFUNCTIONS_HPP__ 8 #define __FWMATH_PLANEFUNCTIONS_HPP__ 11 #include "fwMath/IntrasecTypes.hpp" 12 #include "fwMath/VectorFunctions.hpp" 13 #include "fwMath/LineFunctions.hpp" 14 #include "fwMath/config.hpp" 15 #include "fwMath/MatrixFunctions.hpp" 17 #include <fwCore/base.hpp> 22 static const double EPSILON = 0.001;
27 FWMATH_API fwPlane getPlane(
const fwVec3d & _point1,
const fwVec3d & _point2,
const fwVec3d & _point3);
34 FWMATH_API fwPlane getPlane(
const fwVec3d& _normal,
const fwVec3d& _point);
44 FWMATH_API
void setValues(fwPlane& _plane,
const fwVec3d & _point1,
const fwVec3d & _point2,
const fwVec3d & _point3);
51 FWMATH_API fwVec3d
getNormal(
const fwPlane& _plane);
57 FWMATH_API
void setNormal(fwPlane& _plane,
const fwVec3d& _normal);
63 FWMATH_API
double getDistance(
const fwPlane& _plane);
70 FWMATH_API
void setDistance(fwPlane& _plane,
const double _distance);
78 FWMATH_API
bool intersect(
const fwPlane& _fwPlane,
const fwLine & _line, fwVec3d& _point);
86 FWMATH_API
bool isInHalfSpace(
const fwPlane& _plane,
const fwVec3d& _point);
94 FWMATH_API
void transform(fwPlane& _plane,
const fwMatrix4x4& _matrix);
102 FWMATH_API
void offset(fwPlane& _plane,
double _offset);
112 FWMATH_API
bool operator==(fwPlane& plane1, fwPlane& plane2);
FWMATH_API bool isInHalfSpace(const fwPlane &_plane, const fwVec3d &_point)
Compute if a point is in a half plane.
FWMATH_API double getDistance(const fwPlane &_plane)
Get the distance from origin for the given plan (_plane).
FWMATH_API void offset(fwPlane &_plane, double _offset)
Add an offset at the distance of origin which define the plane (_plane).
FWMATH_API void setValues(fwPlane &_plane, const fwVec3d &_point1, const fwVec3d &_point2, const fwVec3d &_point3)
Initialize a plane _plane with three points (_point1, _point2, _point3). It computes the plane's norm...
FWMATH_API void setDistance(fwPlane &_plane, const double _distance)
Set the distance from origin (_distance) for the given plan (_plane).
FWMATH_API void setNormal(fwPlane &_plane, const fwVec3d &_normal)
Set the normal of the given plane _plane.
The namespace fwMath contains classes which provide the implementation of several mathematic function...
FWMATH_API fwVec3d getNormal(const fwPlane &_plane)
Return the normal of the given plane _plane.
FWMATH_API void transform(fwPlane &_plane, const fwMatrix4x4 &_matrix)
Apply a transformation to a plane. The transformation is defined by a matrix 4x4. ...
FWMATH_API bool intersect(const fwLine &_ray, double _radius, const fwVec3d &_point)
Compute the projection of a point in a given direction and test if this intersection is inside a give...