Interface to Alias subdivision objects.
#include <AlSubdivNode.h>
class AlSubdiv : public AlObject
AlSubdiv();
virtual ~AlSubdiv();
statusCode deleteObject() override;
AlObject* copyWrapper() const override;
AlObjectType type() const override;
int numberOfVertices() const;
statusCode vertices( double* vertices );
struct AlFaceInfo
{
int vertsNum;
int* vertsIds;
};
int numberOfFaces() const;
statusCode faces( AlFaceInfo* faces );
struct AlCreasedInfo
{
int faceId;
int elementId;
double creaseWeight;
};
int numberOfCreasedEdges() const;
statusCode creasedEdges( AlCreasedInfo* creasedEdges );
AlSubdivNode* subdivNode();
static AlSubdiv* create( int numVerts, const double* verts,
int numFaces, AlFaceInfo* faces,
int numCreasedEdges, AlCreasedInfo* creasedEdges );
statusCode transform( double[4][4] ) const;
statusCode boundingBox( double* min, double* max ) const;AlSubdiv is the interface to subdivision objects and their data in Alias. This class lets you create and manipulate subdivision objects. The following properties are used throughout the mesh class.
Vertices are passed by this class using an array of floating point values. A vertex consists of three values: x, y, and z. Refer to the definition of triangles for a description of the relationship between vertices and triangles (see AlMesh).
Constructs an AlSubdiv wrapper object.
Deletes an AlSubdiv wrapper object. Note that this destructor does not delete the associated subdivision object. To properly remove a node or geometry from the DAG use AlDagNode::deleteObject() (see AlDagNode).
Deletes the underlying subdivision node.
Makes a copy of the AlSubdiv wrapper.
Returns -1 cast to AlObjectType.
Returns the number of vertices in the subdivision object.
Sets each element of the vertices array to a pointer to an array of coordinates. Memory for the vertices array should be allocated by the caller.
Returns the number of faces in this subdivision object.
For each face in the subdivision object, it returns the number of vertices and the ID of each vertex. Memory for the AlFaceInfo array should be allocated by the caller.
Returns the number of creased edges in this subdivision object.
Fills in face ID, element ID and crease weight for each creased edge in the subdivision object. Memory for creased edge information structures should be allocated by the caller.
Returns a wrapper for the group node containing this subdivision node.
This adds a subdivision node beside the Alias root node.
Transforms the mesh by the matrix 'tm'.
Retrieves the bounding box of the subdivision object. The 'min' and 'max' arguments are arrays that contain the min or max x, y, and z values.
Layers the given shader to the subdiv. If the subdiv already has shaders they will be kept and the passed shader will be add (layered). The subdiv must have a subdiv node for this method to succeed.
< shader - The shader which will be layered on the subdiv's limit surfaces.
sSuccess - the shader was successfully layered on the subdiv.
sInvalidArgument - 'shader' was invalid.
sFailure - the shader was not assigned due to invalid data.
sInvalidObject - this subdiv object is in an invalid state.
Layers the given shader to the subdiv. If the subdiv already has shaders they will be kept and the passed shader will be added (layered). The subdiv must have a subdiv node for this method to succeed.
< shader - The shader which will be layered on the subdiv's limit surfaces.
sSuccess - the shader was successfully layered on the subdiv.
sInvalidArgument - 'shader' was invalid.
sFailure - the shader was not assigned due to invalid data.
sInvalidObject - this subdiv object is in an invalid state.
Assigns the given Switch Shader to the subdiv. If the subdiv already has shaders they will be removed from the subdiv. The subdiv must have a subdiv node for this method to succeed.
< switchShader - The Switch Shader which will be assigned to the subdiv.
sSuccess - the shader was successfully layered on the subdiv.
sInvalidArgument - 'shader' was invalid.
sFailure - the shader was not assigned due to invalid data.
sInvalidObject - this subdiv object is in an invalid state.
Layers the given shader to the subdiv. If the subdiv already has shaders they will be kept and the passed shader will be added (layered). The subdiv must have a subdiv node for this method to succeed.
< shader - The shader which will be layered on the subdiv's limit surfaces.
sSuccess - the shader was successfully layered on the subdiv.
sInvalidArgument - 'shader' was invalid.
sFailure - the shader was not assigned due to invalid data.
sInvalidObject - this subdiv object is in an invalid state.