Public Member Functions
sal3d::Geometric::Plane Class Reference

Class that represents a plane in 3D space. More...

#include <Geometric.hpp>

List of all members.

Public Member Functions

 Plane ()
 Default constructor.
 Plane (const sal3d_geometric_plane &plane)
 Constructor from a C sal3d_geometric_plane.
 Plane (const Plane &plane)
 Copy Constructor.
 Plane (float A, float B, float C, float D)
 Constructor from values.
 Plane (const Point3D &p1, const Point3D &p2, const Point3D &p3)
 Constructor from 3 Point3D points.
const sal3d_geometric_plane & c_plane () const
 Get a C plane structure with the Plane values.
const float & a () const
 Get the const A term of the Plane.
float & a ()
 Get the A term of the Plane.
const float & b () const
 Get the const B term of the Plane.
float & b ()
 Get the B term of the Plane.
const float & c () const
 Get the const C term of the Plane.
float & c ()
 Get the C term of the Plane.
const float & d () const
 Get the const D term of the Plane.
float & d ()
 Get the D term of the Plane.
Movement3D alignToZ (const Point3D &point) const
 Calculates the movement needed to align Plane to Z=0.
Planeoperator= (const Plane &rhs)
 Assignment operator.
const float & operator[] (int idx) const
 Gets a const term of the Plane.
float & operator[] (int idx)
 Gets a term of the Plane.

Detailed Description

Class that represents a plane in 3D space.

This class requires linking with geometric.lib (import library for geometric.dll).


Constructor & Destructor Documentation

Default constructor.

Creates an uninitialized Plane.

sal3d::Geometric::Plane::Plane ( const sal3d_geometric_plane &  plane) [inline, explicit]

Constructor from a C sal3d_geometric_plane.

Cretes a C++ Plane object that copies the values from the C sal3d_geometric_plane.

Parameters:
[in]planeThe C plane struct.
sal3d::Geometric::Plane::Plane ( const Plane plane) [inline]

Copy Constructor.

Cretes a copy of the Plane passed as parameter.

Parameters:
[in]planeThe Plane from where to copy the values.
sal3d::Geometric::Plane::Plane ( float  A,
float  B,
float  C,
float  D 
) [inline]

Constructor from values.

Parameters:
[in]AA term in Ax+By+Cz+D=0 general plane equation.
[in]BB term in Ax+By+Cz+D=0 general plane equation.
[in]CC term in Ax+By+Cz+D=0 general plane equation.
[in]DD term in Ax+By+Cz+D=0 general plane equation.
sal3d::Geometric::Plane::Plane ( const Point3D p1,
const Point3D p2,
const Point3D p3 
) [inline]

Constructor from 3 Point3D points.

Creates a Plane from 3 points belonging to it. The vectors to calculate the plane will be taken as p1 -> p2 and p1 -> p3.

Parameters:
[in]p1First point.
[in]p2Second point.
[in]p3Third point.

References sal3d::Point3D::c_point_3d().


Member Function Documentation

const float& sal3d::Geometric::Plane::a ( ) const [inline]

Get the const A term of the Plane.

Returns:
The const A term in the Plane general equation.
float& sal3d::Geometric::Plane::a ( ) [inline]

Get the A term of the Plane.

Returns:
The A term in the Plane general equation.
Movement3D sal3d::Geometric::Plane::alignToZ ( const Point3D point) const [inline]

Calculates the movement needed to align Plane to Z=0.

Given a pivot point, this function calculates the needed rotation and translation to align the current Plane to the plane with Z=0.

Parameters:
[in]pointPoint3D used as the pivot, i.e., this point will have the same coordinates before and after the rotation.
Returns:
The Movement3D that aligns this Plane to Z=0.

References sal3d::Point3D::c_point_3d().

const float& sal3d::Geometric::Plane::b ( ) const [inline]

Get the const B term of the Plane.

Returns:
The const B term in the Plane general equation.
float& sal3d::Geometric::Plane::b ( ) [inline]

Get the B term of the Plane.

Returns:
The B term in the Plane general equation.
const float& sal3d::Geometric::Plane::c ( ) const [inline]

Get the const C term of the Plane.

Returns:
The const C term in the Plane general equation.
float& sal3d::Geometric::Plane::c ( ) [inline]

Get the C term of the Plane.

Returns:
The C term in the Plane general equation.
const sal3d_geometric_plane& sal3d::Geometric::Plane::c_plane ( ) const [inline]

Get a C plane structure with the Plane values.

Returns:
The C structure of a Plane.

Referenced by sal3d::Geometric::distanceToPlane().

const float& sal3d::Geometric::Plane::d ( ) const [inline]

Get the const D term of the Plane.

Returns:
The const D term in the Plane general equation.
float& sal3d::Geometric::Plane::d ( ) [inline]

Get the D term of the Plane.

Returns:
The D term in the Plane general equation.
Plane& sal3d::Geometric::Plane::operator= ( const Plane rhs) [inline]

Assignment operator.

Copies the values from the rhs Plane to this.

Parameters:
[in]rhsPlane to get the values from.
Returns:
A reference to this Plane.
const float& sal3d::Geometric::Plane::operator[] ( int  idx) const [inline]

Gets a const term of the Plane.

Parameters:
[in]idxThe term to return. The range is 0..3: 0: A, 1: B, 2: C, 3: D
Returns:
The term corresponding to index idx.
float& sal3d::Geometric::Plane::operator[] ( int  idx) [inline]

Gets a term of the Plane.

Parameters:
[in]idxThe term to return. The range is 0..3: 0: A, 1: B, 2: C, 3: D
Returns:
The term corresponding to index idx.

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