|
ACF $AcfVersion:0$
|
Definition of a plane in 3D space. More...
#include <CPlane3d.h>
Public Member Functions | |
| CPlane3d () | |
| Default constructor. | |
| CPlane3d (const CVector3d &point, const CVector3d &normal) | |
| Construct plane from point and normal vector. | |
| CPlane3d (const CVector3d &p1, const CVector3d &p2, const CVector3d &p3) | |
| Construct plane from three points. | |
| const CVector3d & | GetPoint () const |
| Get point on the plane. | |
| void | SetPoint (const CVector3d &point) |
| Set point on the plane. | |
| const CVector3d & | GetNormal () const |
| Get normal vector of the plane. | |
| void | SetNormal (const CVector3d &normal) |
| Set normal vector of the plane. | |
| double | GetSignedDistance (const CVector3d &point) const |
| Calculate signed distance from point to plane. | |
| double | GetDistance (const CVector3d &point) const |
| Calculate absolute distance from point to plane. | |
| CVector3d | GetProjection (const CVector3d &point) const |
| Project point onto the plane. | |
| bool | Contains (const CVector3d &point, double tolerance=I_BIG_EPSILON) const |
| Check if point lies on the plane (within tolerance). | |
| bool | Serialize (iser::IArchive &archive) |
| Serialize this plane to specified archive. | |
| bool | operator== (const CPlane3d &plane) const |
| bool | operator!= (const CPlane3d &plane) const |
Definition of a plane in 3D space.
Plane is stored as a point on the plane and a normal vector. The plane equation is: dot(normal, (p - point)) = 0
Definition at line 18 of file CPlane3d.h.
|
inline |
Default constructor.
Creates a plane at origin with normal pointing along Z axis.
Definition at line 101 of file CPlane3d.h.
Construct plane from point and normal vector.
| point | A point on the plane. |
| normal | Normal vector (will be normalized internally). |
Definition at line 108 of file CPlane3d.h.
Construct plane from three points.
Points should not be collinear.
| p1 | First point on plane. |
| p2 | Second point on plane. |
| p3 | Third point on plane. |
|
inline |
Check if point lies on the plane (within tolerance).
Definition at line 158 of file CPlane3d.h.
References GetDistance().
|
inline |
Calculate absolute distance from point to plane.
Definition at line 145 of file CPlane3d.h.
References GetSignedDistance().
Referenced by Contains(), and i3d::Geometry::GetDistance().
|
inline |
Get normal vector of the plane.
Definition at line 127 of file CPlane3d.h.
|
inline |
Get point on the plane.
Definition at line 115 of file CPlane3d.h.
Project point onto the plane.
Definition at line 151 of file CPlane3d.h.
References GetSignedDistance().
|
inline |
Calculate signed distance from point to plane.
Positive if point is on the side of normal, negative otherwise.
Definition at line 139 of file CPlane3d.h.
References imath::TVector< Size, Element >::GetDotProduct().
Referenced by GetDistance(), GetProjection(), and i3d::Geometry::IsOnPositiveSide().
|
inline |
Definition at line 170 of file CPlane3d.h.
|
inline |
Definition at line 164 of file CPlane3d.h.
| bool i3d::CPlane3d::Serialize | ( | iser::IArchive & | archive | ) |
Serialize this plane to specified archive.
|
inline |
Set normal vector of the plane.
The normal will be normalized internally.
Definition at line 133 of file CPlane3d.h.
References i3d::CVector3d::GetNormalized().
|
inline |
Set point on the plane.
Definition at line 121 of file CPlane3d.h.