AlBlendPoint
 
 
 

Interface to Alias blend points.

Synopsis

#include <AlBlendPoint.h>
class AlBlendPoint :	public AlObject
enum AlConstraintContinuityType
{
	kG0,
	kG1,
	kG2,
	kG3,
	kG4
};
enum AlCurvatureType
{
	kGeometricCurv,
	kParametric
};
enum AlInterpolationDirectionType
{
	kLocation,
	kWorldSpace,
	kGeometricInterp
};
enum AlDirectionType
{
	kRay,
	kParallel
};
AlBlendPoint();
virtual		~AlBlendPoint();
virtual statusCode		deleteObject();
virtual AlObject*		copyWrapper() const;
virtual AlObjectType		type() const;
statusCode		setPoint( double , double , double  );
statusCode		point( double& , double& , double&  );
statusCode param( double& );
statusCode		tangent( double&, double&, double& );
statusCode		setTangent( double, double, double );
statusCode		interpolationDirectionType( AlInterpolationDirectionType& );
statusCode		setInterpolationDirectionType( AlInterpolationDirectionType );
statusCode		directionType( AlDirectionType& );
statusCode		setDirectionType( AlDirectionType );
statusCode		curvatureType( AlCurvatureType& );
statusCode		setCurvatureType( AlCurvatureType );
statusCode		constraintContinuityType( AlConstraintContinuityType& );
statusCode		setConstraintContinuityType( AlConstraintContinuityType );
statusCode		attachConstraint( AlSurface *, double, double );
statusCode		attachConstraint( AlCurve *, double );
statusCode		attachConstraint( AlCurveOnSurface *, double );
statusCode		disassociateConstraint();
statusCode		attachedTo( AlObject *&, double&, double& );
boolean		isSlave();
statusCode		makeMaster();
AlBlendCurve*		blendCurve();
AlBlendPoint*		next();
statusCode		nextD( AlBlendPoint * );
AlBlendPoint*		prev();
statusCode		prevD( AlBlendPoint * );

Description

Alias Blend Curves contain Alias Blend Points. Blend Points have constraints and curvature types as described in the Alias manuals. Methods for getting and setting the tangency, position, constraint continuity and the geometry the point is associated with are included.

Notes:

AlBlendPoint::AlBlendPoint()

Description

Null constructor.

AlBlendPoint::~AlBlendPoint()

Description

Null destructor.

statusCode AlBlendPoint::deleteObject()

Description

This method deletes a blend point on a blend curve. If there are two blend points left on the curve and one of them is deleted, the blend curve will also be deleted.

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the object was invalid

AlObject *AlBlendPoint::copyWrapper() const

Description

Returns an exact copy of the blend point wrapper. NULL is returned if the method fails.

AlObjectType AlBlendPoint::type() const

Description

Returns the class identifier kBlendPointType.

statusCode AlBlendPoint::setPoint( double x , double y , double z )

Description

Set the world space location of the blend point. If this curve is associated with geometry then that association is removed.

Arguments

< x,y,z - new world space location for the blend point.

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::point( double& x , double& y , double& z )

Description

Returns the world space location of the blend point

Arguments

> x,y,z - world space location of the point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::param( double& param )

Description

Return the param or ’t’ value of this point on the curve.

Note: this value will change as the Blend Curve is modified.

Arguments

> param - the param value of this point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure,

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::tangent( double& x, double& y, double& z )

Description

Returns the tangent information for the blend point. This method will only work if this blend point has a world space or geometric interpolation direction.

Arguments

> x,y,z - the tangent of the blend point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure,

sInvalidObject - the blend point is invalid

sInvalidArgument - cannot ask for tangent information since the point does not have world space or geometric interpolation set

statusCode AlBlendPoint::setTangent( double x, double y, double z )

Description

Sets the tangent for the blend point. This method will only work if this blend point has a world space or geometric interpolation direction.

Arguments

< x,y,z - the new tangent for the point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - cannot set tangent information since the point is not using world space or geometric interpolation or the tangent vector did not have a direction (0, 0 0).

statusCode AlBlendPoint::constraintContinuityType(AlBlendPoint::AlConstraintContinuityType& cc )

Description

Returns the type of constraint continuity that is being used by this blend point. This method works only if we are using location or geometric interpolation directions at this point.

Arguments

> cc - constraint continuity of the blend curve

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using location

or geometric interpolation directions

statusCode AlBlendPoint::setConstraintContinuityType( AlConstraintContinuityType cc )

Description

Sets the type of constraint continuity of this blend point. This method works only if we are using location or geometric interpolation directions at this point.

Arguments:

< cc - constraint continuity of the blend curve

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using location or geometric interpolation directions

statusCode AlBlendPoint::interpolationDirectionType(AlBlendPoint::AlInterpolationDirectionType& id)

Description

Returns the interpolation direction of the blend point.

Arguments

> id - interpolation direction of the blend point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::setInterpolationDirectionType( AlInterpolationDirectionType id )

Description

Sets the interpolation direction of the blend point.

Arguments

< id - interpolation direction of the blend point

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::directionType(AlBlendPoint::AlDirectionType& dt)

Description

Returns the direction type that is being used by this blend point. This method works only if we are using world space or geometric interpolation directions at this point.

Arguments

> dt - the blend point’s direction type

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using world space or geometric interpolation directions

statusCode AlBlendPoint::setDirectionType( AlDirectionType dt )

Description

Sets the direction type of this blend point. This method works only if we are using world space or geometric interpolation directions at this point.

Arguments

< dt - the blend point’s direction type

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using world space or geometric interpolation directions

statusCode AlBlendPoint::curvatureType(AlBlendPoint::AlCurvatureType& ct )

Description

Returns the curvature type that is being used by this blend point. This method works only if we are using geometric interpolations of geometry and we are attached to a surface with G2 or greater continuity at this point.

Arguments

> ct - the blend point’s direction type

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using geometric interpolations of geometry and is not attached to a surface with G2 or greater continuity.

statusCode AlBlendPoint::setCurvatureType( AlCurvatureType ct )

Description

Sets the curvature type that is being used by this blend point. This method works only if we are using geometric interpolations of geometry and we are attached to a surface with G2 or greater continuity at this point.

Arguments

> ct - the blend point’s direction type

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - the blend point is not using geometric interpolations of geometry and is not attached to a surface with G2 or greater continuity.

statusCode AlBlendPoint::attachConstraint( AlSurface *surface, double u, double v )

Description

Attaches this blend point as a constraint to a surface.

Arguments

< surface - the surface to attach to

< u,v - position on surface to attach to

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - surface is NULL, or surface is invalid, or u,v is invalid for the surface.

statusCode AlBlendPoint::attachConstraint( AlCurve *curve, double t )

Description

Attaches this blend point as a constraint to a curve. To attach a blend curve to another, pass the resulting curve of the second blend curve into this method. Note: this method will fail if the AlCurve of the AlBlendCurve of this AlBlendPoint is passed in as an argument.

Arguments

< curve - the surface to attach to

< t - position on curve to attach to

Return Codes

sSuccess - the method succeeded

sFailure - internal failure, or tried to attach point

to its own curve

sInvalidObject - the blend point is invalid

sInvalidArgument - curve is NULL, or curve is invalid, or t is invalid for the curve.

statusCode AlBlendPoint::attachConstraint( AlCurveOnSurface *cos, double t )

Description

Attaches this blend point as a constraint to a curve on surface.

Arguments

< cos - the curve on surface to attach to

< t - position on curve on surface to attach to

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

sInvalidArgument - curve on surface is NULL, or curve on surface is invalid, or t is invalid for the surface.

statusCode AlBlendPoint::disassociateConstraint()

Description

Disassociates the blend point from geometry it is attached to. The position of the blend curve is not changed by this method

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

statusCode AlBlendPoint::attachedTo( AlObject *&obj, double& p1, double& p2 )

Description

Returns the object and point of attachment parameterization value.

Arguments

> obj - the object the blend point is attached to. > p1, p2 - if the object is a surface, both p1 and p2 is set to the u, v values of the point of attachment. If the object is a curve or curve on surface, p1 is set to the ’t’ value of the point of attachment to the curve and p2 is unused and set to 0.

Return Codes

sSuccess - the method succeeded

sFailure - internal failure

sInvalidObject - the blend point is invalid

boolean AlBlendPoint::isSlave()

Description

Returns TRUE if this is a slave point.

statusCode AlBlendPoint::makeMaster()

Description

If the current point is a slave, this method will make it a master.

Return Codes

sSuccess - the method succeeded

sFailure - internal failure or point is already a master

sInvalidObject - the blend point is invalid

AlBlendCurve* AlBlendPoint::blendCurve()

Description

Returns the blend curve this point is associated with.

AlBlendPoint* AlBlendPoint::next()

Description

Returns the next blend point in the blend curve.

statusCode AlBlendPoint::nextD( AlBlendPoint* blendPoint )

Description

Destructive method for returning the next blend point on the curve. sFailure is returned if there is no next blend point on the curve.

Arguments

< blendPoint - the blend point to obtain the next blend point from

Return Codes

sSuccess - the method worked

sFailure - the method failed, could be due to there being no next blend point

sInvalidObject - this blend point is invalid

AlBlendPoint* AlBlendPoint::prev()

Description

Returns the previous blend point in the blend curve.

statusCode AlBlendPoint::prevD( AlBlendPoint* blendPoint )

Description

Destructive method for returning the previous blend point on the curve. sFailure is returned if there is no previous blend point on the curve.

Arguments

< blendPoint - the blend point to obtain the previous blend point from

Return Codes

sSuccess - the method worked

sFailure - the method failed, could be due to there being no previous blend point

sInvalidObject - this blend point is invalid