#include <AlSurfaceCV.h>
class AlSurfaceCV : public AlObject , public AlClusterable , public AlAnimatable
, public AlSettable , public AlPickable
virtual ~AlSurfaceCV();
virtual AlObject* copyWrapper() const;
virtual AlAnimatable* asAnimatablePtr();
virtual AlSettable* asSettablePtr();
virtual AlClusterable* asClusterablePtr();
virtual AlPickable* asPickablePtr();
AlObjectType type() const;
AlSurfaceCV* asSurfaceCVPtr();
AlSurfaceCV* nextInU() const;
AlSurfaceCV* nextInV() const;
AlSurfaceCV* prevInU() const;
AlSurfaceCV* prevInV() const;
statusCode nextInUD();
statusCode nextInVD();
statusCode prevInUD();
statusCode prevInVD();
int multiplicityInU() const;
int multiplicityInV() const;
statusCode worldPosition( double&, double&, double&, double& ) const;
statusCode affectedPosition( const AlTM&, double&, double&, double&,
double& ) const;
statusCode unaffectedPosition( double&, double&, double&, double& )
const;
statusCode setMultiplicity( int, int );
statusCode setWorldPosition( double, double, double, boolean );
statusCode setWorldPosition( double, double, double, AlTM );
statusCode setUnaffectedPosition( double, double, double, double );
AlSurface* surface() const;
statusCode blindData( int, long&, const char *& );
statusCode setBlindData( int, long, const char * );
statusCode removeBlindData( int );
statusCode applyIteratorToCVsInU( AlIterator* iter, int &rc );
statusCode applyIteratorToCVsInV( AlIterator* iter, int &rc );
statusCode doUpdates( boolean newState = TRUE );
There are methods to query and set the multiplicity of a CV, and method to query the world position and the "unaffected" position of a CV. The "unaffected" position of a CV is its position BEFORE any transformations (from its parent dag node or from affecting clusters) have been applied to it. There is also a method to access the clusters that affect a CV. Methods setWorldPosition are used for setting either the unaffected or affected(clusters) position of a CV.
For more information on CVs please see AlCurveCV.
Summary
AlAnimatable *AlSurfaceCV::asAnimatablePtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. AlSettable *AlSurfaceCV::asSettablePtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. AlClusterable *AlSurfaceCV::asClusterablePtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. AlPickable *AlSurfaceCV::asPickablePtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. AlSurfaceCV::~AlSurfaceCV()
Description
Deletes an AlSurfaceCV wrapper object. AlObject* AlSurfaceCV::copyWrapper() const
Description
Return an exact duplicate of this AlSurfaceCV wrapper. AlObjectType AlSurfaceCV::type() const
Description
Returns the class identifier 'kSurfaceCVType'. AlSurfaceCV *AlSurfaceCV::asSurfaceCVPtr()
Description
This virtual function returns a non-null pointer to itself, indicating that it is safe to cast to an object of this class. AlSurfaceCV* AlSurfaceCV::nextInU() const
Description
Returns a pointer to the next AlSurfaceCV in the u direction. Otherwise, returns NULL if there is no next surface CV or the CV is inactive. statusCode AlSurfaceCV::nextInUD()
Description
Destructively points this wrapper to the next AlSurfaceCV in the u direction. Return codes
sSuccess - the wrapper points to the next CV AlSurfaceCV* AlSurfaceCV::nextInV() const
Description
Returns a pointer to the next AlSurfaceCV in the v direction. Otherwise, returns NULL if there is no next surface CV or the CV is inactive. Return codes
sSuccess - the wrapper points to the next CV statusCode AlSurfaceCV::nextInVD()
Description
Destructively points the wrapper to the next AlSurfaceCV in the v direction. Return codes
sSuccess - the wrapper points to the next CV AlSurfaceCV* AlSurfaceCV::prevInU() const
Description
Returns a pointer to the previous AlSurfaceCV in the u direction. Otherwise, returns NULL if there is no previous surface CV or the CV is inactive. statusCode AlSurfaceCV::prevInUD()
Description
Destructively points the wrapper to the previous AlSurfaceCV in the u direction. Return codes
sSuccess - the wrapper points to the previous CV AlSurfaceCV* AlSurfaceCV::prevInV() const
Description
Returns a pointer to the previous AlSurfaceCV in the v direction. Otherwise, returns NULL if there is no previous surface CV or the CV is inactive. statusCode AlSurfaceCV::prevInVD()
Description
Destructively points the wrapper to the previous AlSurfaceCV in the v direction. Return codes
sSuccess - the wrapper points to the previous CV int AlSurfaceCV::multiplicityInU() const
Description
Returns the multiplicity of this surface CV in the u direction. The returned value is always 1, 2 or 3. -1 is returned if the surfaceCV is invalid. int AlSurfaceCV::multiplicityInV() const
Description
Returns the multiplicity of this surface CV in the v direction. The returned value is always 1, 2 or 3. -1 is returned if the surfaceCV is invalid. statusCode AlSurfaceCV::worldPosition( double &x, double &y,double &z, double &w) const
Description
Returns the position of this surface CV in world space. This position includes the transformations of all dag nodes above this surface and the effects of all clusters. Arguments
> double &x - the world position in the x direction Return codes
sSuccess - the world position was retrieved statusCode AlSurfaceCV::affectedPosition( const AlTM& tm, double &x, double &y,double &z, double &w) const
Description
Returns the position of this surface CV modified by the AlTM. Arguments
< AlTM& tm - the transformation matrix generated while walking the dag. Return codes
sSuccess - the affected position was retrieved statusCode AlSurfaceCV::unaffectedPosition( double &x, double &y,double &z, double &w ) const
Description
Returns the position of this surface CV PRIOR TO ANY TRANSFORMATIONS (hence "unaffected"). Arguments
> double &x - the unaffected position in the x direction Return codes
sSuccess - the unaffected position was retrieved statusCode AlSurfaceCV::setMultiplicity( int u, int v )
Description
Sets the multiplicity of this surface CV to the given multiplicity. The new multiplicity must be 1, 2, or 3. You cannot change the multiplicity of a corner CV of a surface that is open in either the u or v direction. Arguments
< int u - the new multiplicity in the u direction Return codes
sSuccess - the multiplicity has been properly set. statusCode AlSurfaceCV::doUpdates( boolean newState )
Description
See AlDagNode for info
statusCode AlSurfaceCV::setWorldPosition( double x, double y, double z, boolean includeWorld )
Description
Sets the world position of the CV. The CV may be in a cluster. Arguments
< double x - the new unaffected position in the x direction Return codes
sSuccess - the position was properly set. statusCode AlSurfaceCV::setWorldPosition( double x, double y, double z, AlTM tm )
Description
Sets the world position of the CV. The CV may be in a cluster. Note that this method uses the inverse of the transformation matrix that is passed in so that the calling routine does not need to generate it. Arguments
< double x - the new unaffected position in the x direction Return codes
sSuccess - the position was properly set. statusCode AlSurfaceCV::setUnaffectedPosition( double x, double y,double z, double w )
Description
Sets the unaffected position of the CV. Arguments
< double x - the new unaffected position in the x direction Return codes
sSuccess - the position was properly set. AlSurface* AlSurfaceCV::surface() const
Description
Returns a pointer to the AlSurface that this surface CV belongs to or NULL if the surface CV is no longer active. statusCode AlSurfaceCV::blindData( int user_type, long& size, const char *& data )
Description
Obtains the size and address of a block of data associated with the object. If there is no data, then the size will be zero and the address of the data is NULL. User_types between 0 and 11999 are reserved. If you would like to reserve a block of "user_types" please contact us. Arguments
< type - user type of the data desired. Return codes
sSuccess - the blind data was retrieved statusCode AlSurfaceCV::setBlindData( int user_type, long size, const char * data )
Description
Associates a block of data with the object. If a block of data is already associated with this object and this user_type, the old block is replaced by a reference to the new block. The old block of data is not deleted. Arguments
< user_type - user type of the blind data desired. Return codes
sSuccess - everything is okay. statusCode AlSurfaceCV::removeBlindData( int user_type )
Description
Removes the block of data of the given type from the object. Note that the user is still responsible for the memory associated with this block of data. Arguments
< user_type - user type of the blind desired. Return codes
sSuccess - everthing is okay statusCode AlSurfaceCV::applyIteratorToCVsInU( AlIterator* iter, int &rc )
Description
Starting at this CV, apply the iterator to all CVs in the surface in the U direction. This iterator can be combined with the applyIteratorToCVsInV iterator to create a 'superiterator' that iterates over all CVs in the surface. class iterV : public AlIterator {
" %@ public:
iterV( AlIterator* inIter ) : iter( inIter ) {};
virutal int func( AlObject* obj )
{
int rc;
if( sSuccess == obj->asSurfaceCVPtr()->applyIteratorToCVsInU( iter, rc ) )
return rc;
else
return -1;
}
" %@ private:
AlIterator* iter;
}
....
statusCode applyIteratorToSurfaceCVs( AlSurface *surf, AlIterator* iter, int &rc )
{
if( !iter || !surf )
return sInvalidArgument;
iterV doV( iter );
AlSurfaceCV* cv = surface->firstCV();
statusCode stat = cv->applyIteratorToCVsInV( &doV, rc );
delete cv;
return stat;
}
See the documentation for AlIterator.
Arguments
< iter - the iterator to apply to each CV Return codes
sSuccess - the iterator exited normally statusCode AlSurfaceCV::applyIteratorToCVsInV( AlIterator* iter, int &rc )
Description
Starting at this CV, apply the iterator to all CVs in the surface in the V direction. See the documentation for AlIterator.
Arguments
< iter - the iterator to apply to each CV Return codes
sSuccess - the iterator exited normally