Interface to Alias construction
planes.
Synopsis
#include <AlConstructionPlane.h>
class AlConstructionPlane : public AlConstructionEntity
AlConstructionPlane();
virtual ~AlConstructionPlane();
virtual AlObject* copyWrapper() const;
virtual AlObjectType type() const;
statusCode create( AlPoint *, AlPoint *, AlPoint * );
statusCode create( AlPoint *, AlPoint *, double[3] );
statusCode create( double[3], double[3], double[3]);
AlPoint * first();
AlPoint * second();
AlPoint * third();
statusCode scale( double&, double& );
statusCode setScale( double, double );
statusCode rotate( double&, double&, double& );
statusCode translate( double&, double&, double& );
statusCode transformationMatrix( double[4][4] );
statusCode origin( double&, double&, double& );
statusCode axes( double[3], double[3], double[3] );
Description
This class provides functionality
for creating, manipulating and querying Alias construction
planes. Construction planes can be specified several ways.
- 3 Points - The first 2 points specify
the X axis. The first and last points specify a line that is used
in the cross product with the x axis to provide the Z axis. Once
the Z is known, the Y axis is calculated internally.
- 2 points and a normal - The first 2 points
specify the X axis. The normal is the Z axis to the plane.
- 2 points in the form of doubles and a
normal. The first 2 points specify the X axis. The normal is the
Z axis to the plane.
This class provides access
to the points used to create the construction plane (end may be NULL
depending on the specification), transformation and axes information.
AlConstructionPlane::AlConstructionPlane()
Description
Null constructor.
AlConstructionPlane::~AlConstructionPlane()
Description
Null destructor.
AlObject *AlConstructionPlane::copyWrapper()
const
Description
Returns an exact copy
of the generic wrapper.
statusCode AlConstructionPlane::create(
AlPoint *first, AlPoint *second, AlPoint *third )
Description
Create a construction
plane specified by 3 points. The first 2 points specific the X axis. The
first and last point specify a line that is used in the cross product
with the X axis to calculate the Z axis.
Return Codes
sSuccess - the construction
plane was created
sFailure - the method
failed
sInvalidArgument - first,
second, or third are either NULL or invalid or at least 2 point
to the same Alias object
sAlreadyCreated - object
is already created
statusCode AlConstructionPlane::create(
AlPoint *first, AlPoint *second, double normal[3] )
Description
Create a construction
plane with 2 points that specify the X axis and a normal (Z axis).
Return Codes
sSuccess - the construction
plane was created
sFailure - the method
failed
sAlreadyCreated - object
already created
sInvalidArgument - one
of first, second or normal is NULL, or first and second are NULL or
equal
statusCode AlConstructionPlane::create(
double[3] first, double[3] second, double[3] normal)
Description
Create a construction
plane with 2 points that specify the X axis and a normal (Z axis).
Return Codes
sSuccess - the construction
plane was created
sFailure - the method
failed
sAlreadyCreated - object
already created
sInvalidArgument - one
of first, second or normal is NULL, or first and second are NULL or
equal
AlPoint *AlConstructionPlane::first()
Description
Returns the first point
of the construction plane. NULL is returned if the method failed.
AlPoint *AlConstructionPlane::second()
Description
Returns the second point
of the construction plane. NULL is returned if the method failed.
AlPoint *AlConstructionPlane::third()
Description
Returns the third point
of the construction plane. NULL is returned if the method failed or
if the construction plane was not specified by 3 points.
AlObjectType AlConstructionPlane::type()
const
Description
Returns the class identifier
kConstructionPlaneType.
statusCode AlConstructionPlane::scale(
double& x, double& y )
Description
Returns the current scale
of the construction plane. Planes only have an x,y scale.
Arguments
> x,y - the scale
in x,y
Return Codes
sSuccess - the scale
was found
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::rotate(
double& x, double& y, double& z )
Description
Returns the rotation
of the construction plane.
Arguments
> x,y,z - the rotation
Return Codes
sSuccess - the rotation
was found
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::translate(
double&, double&, double& )
Description
Returns the translation
of the construction plane.
Arguments
> x,y,z - the translation
Return Codes
sSuccess - the translation
was found
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::setScale(
double x, double y )
Description
Sets the scale for the
construction plane.
Return Codes
sSuccess - the scale
was set
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::transformationMatrix(
double matrix[4][4] )
Description
Returns the transformation
matrix of the construction plane.
Arguments
> matrix - the matrix
Return Codes
sSuccess - the transformation
matrix was returned
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::origin(
double& x, double& y, double& z )
Description
Returns the origin for
the construction plane.
Arguments
> x,y,z - the origin
Return Codes
sSuccess - the origin
was returned
sFailure - the method
failed
sInvalidObject - the
object is invalid
statusCode AlConstructionPlane::axes(
double x[3], double y[3], double z[3] )
Description
Returns the x,y,z axes
for the construction plane.
Arguments
> x,y,z - the axes
found
Return Codes
sSuccess - the axes were
returned
sFailure - the method
failed
sInvalidArgument - x,y
or z is NULL
sInvalidObject - the
object is invalid