Dag
node class for NURBS surfaces.
Synopsis
#include <AlSurfaceNode.h>
class AlSurfaceNode : public AlDagNode
AlSurfaceNode();
virtual ~AlSurfaceNode();
virtual AlObject* copyWrapper() const;
statusCode create( AlSurface * );
virtual AlObjectType type() const;
AlSurface* surface() const;
AlSurface* surface(AlTM&) const;
int curvePrecision() const;
statusCode setCurvePrecision( int precision );
int patchPrecision() const;
statusCode setPatchPrecision( int precision );
Description
AlSurfaceNode is the
class used to access and manipulate surfaces within the DAG. This class
behaves like other DAG nodes (see AlDagNode for
a description of the usage and purpose of DAG nodes) and in addition
allows users to add curves on surfaces and access the geometry of
the surface via the surface() method. The surface() method returns
a pointer to an AlSurface object, which provides the user with the
methods used to modify the geometry of the surface. Surfaces can
be created from scratch by calling the AlSurfaceNode::create() method,
or read in from a wire file (see AlUniverse documentation).
AlSurfaceNode::AlSurfaceNode()
Description
Constructs
an AlSurfaceNode wrapper object.
AlSurfaceNode::~AlSurfaceNode()
Description
Deletes
an AlSurfaceNode wrapper object.
AlObject* AlSurfaceNode::copyWrapper()
const
Description
Returns
an exact duplicate of this AlSurfaceNode wrapper.
statusCode AlSurfaceNode::create(
AlSurface *newSurface )
Description
Allocates the DAG node
and geometry required for this object. This method must be called
once and only once before any other method and only if the surface
has been allocated by the user (that is, not read in from a wire
file). It is an error to call this method twice or if the object
has been read in from a wire file.
Arguments
< newSurface - the
surface to create this surface node for
Return Codes
sSuccess - the surface
node was created
sInvalidArgument - ’newSurface’
was NULL or invalid
sFailure - the surface
node was not created
AlObjectType AlSurfaceNode::type()
const
Description
Returns
the class identifier kSurfaceNodeType.
AlSurface* AlSurfaceNode::surface()
const
Description
Returns
a pointer to the surface data structure which can be used to access
the geometry of the surface.
AlSurface* AlSurfaceNode::surface(AlTM&
tm) const
Description
Returns a pointer to the
surface data structure that can be used to access the geometry of the
surface. The AlTM will be updated with the groupNode’s TM if a
childNode exists.
Arguments
< tm - the AlTM to
update with the group node’s TM
int AlSurfaceNode::curvePrecision()
const
Description
Obtains
the curve precision for the surface. -1 is returned if the surface
is invalid.
statusCode AlSurfaceNode::setCurvePrecision(
int precision )
Description
Sets the curve precision
for the surface.
Arguments
< precision - the
new curve precision (range is 1-129)
Return code
sSuccess - the curve
precision was set
sInvalidArgument - value
for curve precision was invalid
sInvalidObject - the
surface node was invalid
int AlSurfaceNode::patchPrecision()
const
Description
Obtains
the patch precision for the surface. -1 is returned if the surface
is invalid.
statusCode AlSurfaceNode::setPatchPrecision(
int precision )
Description
Sets the patch precision
for the surface.
Arguments
< precision - the
new patch precision (range is 2-64)
Return code
sSuccess - the patch
precision was set
sInvalidArgument - value
for patch precision was invalid
sInvalidObject - the
surface node was invalid