Public Member Functions
EnvelopeWeight Class Reference

Detailed Description

An envelope weight is a specialized kind of ClusterProperty used to store the weights for each point on an envelope.

You can use this class to access the deformer objects that control the shape of the envelope.

Since:
5.0

#include <xsi_envelopeweight.h>

Inheritance diagram for EnvelopeWeight:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  EnvelopeWeight ()
  ~EnvelopeWeight ()
  EnvelopeWeight (const CRef &in_ref)
  EnvelopeWeight (const EnvelopeWeight &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
EnvelopeWeight operator= (const EnvelopeWeight &in_obj)
EnvelopeWeight operator= (const CRef &in_ref)
CRefArray  GetDeformers () const
CStatus  SetValues (const CRef &in_deformer, const LONG *in_pVertices, const float *in_pValues, LONG in_nVertices)
CStatus  SetValues (const CRef &in_deformer, const float *in_pValues, LONG in_nValues, LONG in_nOffset=0)

Constructor & Destructor Documentation

Default constructor.

Default destructor.

EnvelopeWeight ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
EnvelopeWeight ( const EnvelopeWeight in_obj )

Copy constructor.

Parameters:
in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassID class type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from ClusterProperty.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from ClusterProperty.

EnvelopeWeight& operator= ( const EnvelopeWeight in_obj )

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_obj constant class object.
Returns:
The new EnvelopeWeight object.
EnvelopeWeight& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_ref constant class object.
Returns:
The new EnvelopeWeight object.

Reimplemented from ClusterProperty.

CRefArray GetDeformers ( ) const

Returns the deformers of the envelope that control the shape of the envelope.

Returns:
Array of references to the X3DObject deformers.
CStatus SetValues ( const CRef in_deformer,
const LONG *  in_pVertices,
const float *  in_pValues,
LONG  in_nVertices 
)

Sets the vertex weight values for a given deformer affecting the underlying envelope. This function sets the values directly on the property and the operation is not undoable.

For large data sets, you can use an offset index to set the values in chunks. The offset is used for indexing into in_pVertices which allows you to optimize the memory allocation required for setting the vertex weight values.

Parameters:
in_deformer The envelope deformer objects.
in_pVertices Array of size equal to in_nVertices containing the vertex indices to set.
in_pValues Array of size equal to in_nVertices containing the weight values.
in_nVertices Number of vertices in in_pVertices.
Returns:
CStatus::OK Success.
CStatus::InvalidArgument Returns an error if in_nVertices is greater than the number of weights for the specified deformer or smaller than zero. Also returns an error if in_pVertices or in_pValues are invalid.
See also:
CClusterPropertyBuilder, CGeometryAccessor::GetClusterProperties, Material::GetClusterProperties
Since:
5.0
CStatus SetValues ( const CRef in_deformer,
const float *  in_pValues,
LONG  in_nValues,
LONG  in_nOffset = 0 
)

Sets the vertex weight values for a given deformer affecting the underlying envelope. This function sets the vertex elements in the order specified by in_pValues. Values are set directly on the property and the operation is not undoable.

For large data sets, you can use an offset index to set the values in chunks. The offset is used for indexing into cluster elements which allows you to optimize the memory allocation required for setting the element values.

Parameters:
in_deformer The envelope deformer objects.
in_pValues Array of size equal to in_nValues containing the weight values.
in_nValues Number of values in in_pValues.
in_nOffset Specifies the starting index in the vertex elements of the cluster.
Returns:
CStatus::OK Success.
CStatus::InvalidArgument Returns an error if in_nVertices is greater than the number of weights for the specified deformer or smaller than zero. Also returns an error if in_pValues is invalid.
See also:
CClusterPropertyBuilder, CGeometryAccessor::GetClusterProperties, Material::GetClusterProperties
Since:
5.0

The documentation for this class was generated from the following file: