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

Attributes object specifying how lines are visualised. More...

#include <graphics.hpp>

Public Types

enum  ShapeType {
  SHAPE_TYPE_INVALID = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_INVALID, SHAPE_TYPE_LINE = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_LINE, SHAPE_TYPE_RIBBON = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_RIBBON, SHAPE_TYPE_CIRCLE_EXTRUSION = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_CIRCLE_EXTRUSION,
  SHAPE_TYPE_SQUARE_EXTRUSION = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_SQUARE_EXTRUSION
}
 

Public Member Functions

 Graphicslineattributes (cmzn_graphicslineattributes_id line_attributes_id)
 
 Graphicslineattributes (const Graphicslineattributes &lineAttributes)
 
Graphicslineattributesoperator= (const Graphicslineattributes &graphicslineattributes)
 
bool isValid () const
 
int getBaseSize (int valuesCount, double *valuesOut)
 
int setBaseSize (int valuesCount, const double *valuesIn)
 
Field getOrientationScaleField ()
 
int setOrientationScaleField (const Field &orientationScaleField)
 
int getScaleFactors (int valuesCount, double *valuesOut)
 
int setScaleFactors (int valuesCount, const double *valuesIn)
 
ShapeType getShapeType ()
 
int setShapeType (ShapeType shapeType)
 

Protected Attributes

cmzn_graphicslineattributes_id id
 

Detailed Description

Attributes object specifying how lines are visualised.

Attributes object specifying how lines are visualised in the graphics including shape/profile and scaling.

See Also
Graphics::getGraphicslineattributes

Member Enumeration Documentation

The shape or profile of graphics generated for lines.

Enumerator
SHAPE_TYPE_INVALID 

Unspecified shape type.

SHAPE_TYPE_LINE 

Specified line graphics to be drawn as single pixel lines

SHAPE_TYPE_RIBBON 

Specified line graphics to be drawn as ribbons

SHAPE_TYPE_CIRCLE_EXTRUSION 

Specified line graphics to be drawn as extruded circle/ellipse.

SHAPE_TYPE_SQUARE_EXTRUSION 

Specified line graphics to be drawn as extruded square/rectangle.

Member Function Documentation

int OpenCMISS::Zinc::Graphicslineattributes::getBaseSize ( int  valuesCount,
double *  valuesOut 
)
inline

Gets the base size of the extrusion section, one value for each lateral axis.

See Also
Graphicslineattributes::setBaseSize.
Parameters
valuesCountThe number of base size values to request, starting with the first lateral axis. If fewer values have been set it is padded with the last base size value. 1 to 2 values can be obtained.
valuesOutArray to receive base sizes. Must be big enough to contain the specified number of values.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
Field OpenCMISS::Zinc::Graphicslineattributes::getOrientationScaleField ( )
inline

Gets the orientation scale field from the graphics line attributes. This controls lateral scaling and orientation of line extrusions.

See Also
Graphicslineattributes::setOrientationScaleField
Returns
Handle to orientation scale field, or NULL/invalid handle if none or failed.
int OpenCMISS::Zinc::Graphicslineattributes::getScaleFactors ( int  valuesCount,
double *  valuesOut 
)
inline

Gets the scale factors used in sizing the extrusion section, one value for each lateral axis.

See Also
Graphicslineattributes::setScaleFactors.
Parameters
valuesCountThe number of scale_factors to request, starting with the first lateral axis. If fewer values have been set it is padded with the last scale factor value. 1 to 2 values can be obtained.
valuesOutArray to receive scale factors. Must be big enough to contain the specified number of values.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
ShapeType OpenCMISS::Zinc::Graphicslineattributes::getShapeType ( )
inline

Gets the shape or profile of graphics generated for lines.

See Also
Graphicspointattributes::setGlyphRepeatMode
Returns
The current shape type.
bool OpenCMISS::Zinc::Graphicslineattributes::isValid ( ) const
inline

Check if this is a valid Graphicslineattributes object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Graphicslineattributes::setBaseSize ( int  valuesCount,
const double *  valuesIn 
)
inline

Sets the base size of the extrusion section, one value for each lateral axis. 1 to 2 values can be set. For a unit section profile, the final size in each lateral direction is: base_size + scale_factor * field_scalar where field_scalar is determined from the orientation_scale_field.

See Also
Graphicslineattributes::setOrientationScaleField. The default base size is zero. Note: for lines (circle_extrusion shape) only one value is currently used; the second value is constrained to equal the first value.
Parameters
valuesCountThe number of base size values to set, starting with the first lateral axis. If fewer values are set than the number of axes, the last value is assumed for subsequent axes. Hence a single value can be used to set a diameter for a unit circle profile.
valuesInArray of base sizes with the number of values specified.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicslineattributes::setOrientationScaleField ( const Field orientationScaleField)
inline

Sets the orientation scale field in the graphics line attributes. This controls lateral scaling and orientation of line extrusions. Note: Currently it is only used to supply a scalar field for scaling cylinders and with default scale factor of 1 it gives its diameter. Soon we will offer more options for controlling extrusions.

Parameters
orientationScaleFieldThe orientation scale field to set.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicslineattributes::setScaleFactors ( int  valuesCount,
const double *  valuesIn 
)
inline

Sets the scale factors used in sizing the extrusion section, one value for each lateral axis. 1 to 2 values can be set. For a unit section profile, the final size in each lateral direction is: base_size + scale_factor * field_scalar where field_scalar is determined from the orientation_scale_field.

See Also
Graphicslineattributes::setOrientationScaleField. Scale factor values default to 1. Note: for lines (circle_extrusion shape) only one value is currently used; the second value is constrained to equal the first value.
Parameters
valuesCountThe number of scale factor values to set, starting with the first lateral axis. If fewer values are set than the number of axes, the last value is assumed for subsequent axes. Hence a single value applies to all axes.
valuesInArray of scale factors with the number of values specified.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicslineattributes::setShapeType ( ShapeType  shapeType)
inline

Sets the shape or profile of graphics generated for lines: LINE, RIBBON, CIRCLE_EXTRUSION or SQUARE_EXTRUSION. Note: only LINE and CIRCLE_EXTRUSION are supported for LINES type; all shapes are supported for STREAMLINES.

See Also
Graphicslineattributes::ShapeType
Parameters
shapeTypeThe new shape type enumeration.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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