OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Tessellation Class Reference

The tessellation controls the number of polygons or line segments. More...

#include <tessellation.hpp>

Public Member Functions

 Tessellation (cmzn_tessellation_id in_tessellation_id)
 
 Tessellation (const Tessellation &tessellation)
 
Tessellationoperator= (const Tessellation &tessellation)
 
bool isValid () const
 
cmzn_tessellation_id getId () const
 
bool isManaged ()
 
int setManaged (bool value)
 
int getCircleDivisions ()
 
int setCircleDivisions (int circleDivisions)
 
char * getName ()
 
int setName (const char *name)
 
int getMinimumDivisions (int valuesCount, int *valuesOut)
 
int setMinimumDivisions (int valuesCount, const int *valuesIn)
 
int getRefinementFactors (int valuesCount, int *valuesOut)
 
int setRefinementFactors (int valuesCount, const int *valuesIn)
 

Protected Attributes

cmzn_tessellation_id id
 

Detailed Description

The tessellation controls the number of polygons or line segments.

The tessellation controls the number of polygons or line segments used to draw element surfaces and lines, and circular forms in graphics; the density of point sampling and the piecewise linear approximation of elements generally.

Member Function Documentation

int OpenCMISS::Zinc::Tessellation::getCircleDivisions ( )
inline

Gets the number of line segments used to approximate circles in graphics produced with this tessellation. This applies to lines with a circle profile, and to sphere, cylinder and other glyphs with circular features.

Returns
The number of circle divisions, or 0 on error.
cmzn_tessellation_id OpenCMISS::Zinc::Tessellation::getId ( ) const
inline

Return the C handle of the Tessellation object.

Returns
C handle of Tessellation if this objects is valid, 0 otherwise.
int OpenCMISS::Zinc::Tessellation::getMinimumDivisions ( int  valuesCount,
int *  valuesOut 
)
inline

Gets the minimum number of line segments used to approximate curves in each element dimension for coarse tessellation.

See Also
Tessellation::setMinimumDivisions
Parameters
valuesCountThe size of the minimum_divisions array to fill. Values for dimensions beyond the size set use the last divisions value.
valuesOutArray to receive numbers of divisions.
Returns
The actual number of minimum divisions values that have been explicitly set using Tessellation::setMinimumDivisions. This can be more than the number requested, so a second call may be needed with a larger array. Returns 0 on error.
char* OpenCMISS::Zinc::Tessellation::getName ( )
inline

Return an allocated string containing tessellation name.

Returns
allocated string containing tessellation name, or NULL on failure. Up to caller to free using cmzn_deallocate().
int OpenCMISS::Zinc::Tessellation::getRefinementFactors ( int  valuesCount,
int *  valuesOut 
)
inline

Gets the refinements to be used in product with the minimum divisions to approximate curves in each element dimension for fine tessellation.

See Also
Tessellation::setRefinementFactors
Parameters
valuesCountThe size of the refinement_factors array to fill. Values for dimensions beyond the size set use the last refinement value.
valuesOutArray to receive refinement factors.
Returns
The actual number of refinement factor values that have been explicitly set using Tessellation::setRefinementFactors. This can be more than the number requested, so a second call may be needed with a larger array. Returns 0 on error.
bool OpenCMISS::Zinc::Tessellation::isManaged ( )
inline

Get managed status of tessellation in its owning tessellation module.

See Also
Tessellation::setManaged
Returns
1 (true) if tessellation is managed, otherwise 0 (false).
bool OpenCMISS::Zinc::Tessellation::isValid ( ) const
inline

Check if this is a valid Tessellation object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Tessellation::setCircleDivisions ( int  circleDivisions)
inline

Sets the number of line segments used to approximate circles in graphics produced with this tessellation. This applies to lines with a circle profile, and to sphere, cylinder and other glyphs with circular features.

Parameters
circleDivisionsThe number of line segments used to approximate a a circle, at least 3, but larger even numbers are recommended.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Tessellation::setManaged ( bool  value)
inline

Set managed status of tessellation in its owning tessellation module. If set (managed) the tessellation will remain indefinitely in the tessellation module even if no external references are held. If not set (unmanaged) the tessellation will be automatically removed from the module when no longer referenced externally, effectively marking it as pending destruction. All new objects are unmanaged unless stated otherwise.

Parameters
valueThe new value for the managed flag: true or false.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Tessellation::setMinimumDivisions ( int  valuesCount,
const int *  valuesIn 
)
inline

Sets the minimum number of line segments used to approximate curves in each element dimension of tessellation. Intended to be used where coarse tessellation is acceptable, e.g. where fields vary linearly over elements. The default minimum_divisions value for new tessellations is 1, size 1. Note: The value set for the last dimension applies to all higher dimensions.

Parameters
valuesCountThe size of the valuesIn array, >= 1.
valuesInArray of number of divisions (>=1) for each dimension, with the last number in array applying to all higher dimensions.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Tessellation::setName ( const char *  name)
inline

Set/change name for tessellation. Must be unique in the tessellation module.

Parameters
namename to be set to the tessellation
Returns
status OpenCMISS::Zinc::OK if successfully set/change name for tessellation, any other value on failure.
int OpenCMISS::Zinc::Tessellation::setRefinementFactors ( int  valuesCount,
const int *  valuesIn 
)
inline

Sets the refinements to be used in product with the minimum divisions to approximate curves in each element dimension for fine tessellation. The refinement factors are applied whenever the basis functions of the graphics coordinate field (replaced by tessellation field if specified) are non-linear anywhere. If there is no tessellation field or if it matches the coordinate field, a non-linear coordinate system also triggers refinement. The default refinement_factors value for new tessellations is 1, size 1. Note: The value set for the last dimension applies to all higher dimensions.

See Also
Tessellation::setMinimumDivisions
Parameters
valuesCountThe size of the refinement_factors array, >= 1.
valuesInArray of number of fine subdivisions (>=1) per minimum_division for each dimension, with the last number in array applying to all higher dimensions.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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