AlCommandRef
Interface to construction history command constructors, AlContact - Interface to Alias contact information.
Synopsis
#include <AlContact.h>
class AlCommandRef : public AlObject
AlCommandRef();
virtual ~AlCommandRef();
virtual AlObjectType type() const;
AlCommandRef* asCommandRefPtr();
AlCommandRef* nextRef();
AlCommandRef* prevRef();
statusCode nextRefD();
statusCode prevRefD();
AlDagNode* dagNode();
AlCurveOnSurface* curveOnSurface();
AlContact* contact();
class AlContact : public AlObject
AlContact();
virtual ~AlContact();
statusCode deleteObject();
virtual AlObjectType type() const;
AlContact* asContactPtr();
statusCode create();
statusCode appendContact( AlContact * );
int numberContacts() const;
AlContact* nextContact();
AlContact* prevContact();
statusCode nextContactD();
statusCode prevContactD();
AlContactType contactType() const;
// These are different values common to the various contact types
// derived classes are not used since this would result in about 6
// new classes, each with a single method.
// These could be added later
//
statusCode calculate( AlDagNode *dagNode, double tolerance = 0, boolean
adjustTolerance = FALSE );
boolean areEqual( AlDagNode *dagNodeThis, AlContact *contactOther,
AlDagNode *dagNodeOther) const;
AlTrimCurve* trimCurve();
AlCurveOnSurface* curveOnSurface();
int freeCurveIndex();
double curveOnSurfaceParam() const;
double paramValue() const;
double nonisoparamMin() const;
double nonisoparamMax() const;
// currently unimplemented - return NULL
AlCurve* curve();
AlCurve* curveUV();
Description
Two classes are defined here. The first, AlContact, is used to access Alias contact information. It can be used in conjunction with commands to describe a constructor curve. The second class, AlCommandRef, is used to access the constructor references for the command.
Summary
AlContact::AlContact()
Description
Constructor for a contact wrapper.
AlContact::~AlContact()
Description
Destructor for a contact wrapper.
AlObjectType AlContact::type() const
Description
Returns kContactType
AlContact *AlContact::asContactPtr()
Description
Safe downcast to AlContact
statusCode AlContact::create()
Description
Creates a contact (to be used along with a reference).
Note: you will have to call deleteObject() on this contact in your destructor or the memory will be lost. Contacts are often used in conjunction with commands to describe a constructor curve. In Alias, the contacts are the individual curves selected in the command history.
Return codes
sSuccess - the contact was created
sInsufficientMemory - no memory
statusCode AlContact::deleteObject()
Description
Deletes a contact object. See the note in create().
Return codes
sSuccess - the contact was deleted
sInvalidObject - the contact was invalid
AlContact* AlContact::nextContact()
Description
Returns the contact of the next contact curve.
AlContact* AlContact::prevContact()
Description
Returns the contact of the previous contact curve.
statusCode AlContact::nextContactD()
Description
Returns the contact of the next contact curve.
Return codes
sSuccess - the wrapper points to the next contact
sFailure - there is no next contact
sInvalidObject - the object is invalid
statusCode AlContact::prevContactD()
Description
Returns the contact of the previous contact curve.
Return codes
sSuccess - the wrapper points to the next contact
sFailure - there is no next contact
sInvalidObject - the object is invalid
statusCode AlContact::appendContact( AlContact *addcontact )
Description
Considering the current contact to be the head in a list, add the given contact to this list.
Arguments
< addcontact - the contact to add
Return codes
sInvalidArgument - contact was invalid
sObjectInvalid - the current contact was invalid
sSuccess - the contact was added
int AlContact::numberContacts() const
Description
Considering the current contact to be the head of a list, return the number of contacts in this list. Returns 0 on error.
AlContactType AlContact::contactType() const
Description
Returns the type of this contact. From this type, the appropriate information can be determined by using the methods trimCurve(), freeCurve(), curveOnSurface(), curveOnSurfaceParam(), isoparamValue(), nonisoparamMin() or nonisoparamMax().
This method returns one of the following
kContactInvalid, kContactIsoparamU/V, kContactCurveOnSurface, kContactTrimEdge or kContactFreeCurve.
AlTrimCurve* AlContact::trimCurve()
Description
If this is a kContactTrimEdge, then this returns the selected trim edge.
AlCurveOnSurface* AlContact::curveOnSurface()
Description
If this is a kContactCurveOnSurface, then this returns the selected curve on surface.
double AlContact::paramValue() const
Description
Returns the Isoparametric value or Curve On Surface parameter
double AlContact::nonisoparamMin() const
Description
Returns the non iso-parameter minimum.
double AlContact::nonisoparamMax() const
Description
Returns the non iso-parameter maximum.
AlCurve *AlContact::curve()
Description
Returns the resulting contact line (in XYZ coordinates). Note that if this curve is allocated, an deleteObject() must be used to delete it.
AlCurve *AlContact::curveUV()
Description
Returns the resulting contact line (in UV coordinates). Note that if this curve is allocated, an deleteObject() must be used to delete it.
statusCode AlContact::calculate( AlDagNode *dagNode, double tolerance, boolean adjustTolerance )
Description
Calculate the geometry describing the contact. If transform is not set, the tolerance will be adjusted (so specify the world space tolerance).
Arguments
< dagNode - picked dagNode
< tolerance - error tolerance (0 indicates use default)
< adjustTolerance
Return codes
sSuccess - worked
sFailure - didn't work
sInvalidArgument - dagNode was NULL
boolean AlContact::areEqual( AlDagNode *dagNodeThis,AlContact *contactOther, AlDagNode *dagNodeOther) const
Description
Return TRUE if the two contact descriptions are equal
Arguments
this - the first contact to compare
dagNodeThis - the dagnode of this contact
contactOther - the other contact
dagNodeOther - its dagnode
aliasdocs@aw.sgi.com
Copyright © 1996, Alias|Wavefront, a Silicon Graphics Company. All rights
reserved.