Attributes object specifying how points are visualised.
More...
#include <graphics.hpp>
|
cmzn_graphicspointattributes_id | id |
|
Attributes object specifying how points are visualised.
Attributes object specifying how points are visualised in the graphics including glyph, scaling, labels and font.
- See Also
- Graphics::getGraphicspointattributes
int OpenCMISS::Zinc::Graphicspointattributes::getBaseSize |
( |
int |
valuesCount, |
|
|
double * |
valuesOut |
|
) |
| |
|
inline |
Gets the base size of the point glyph, up to 3 values, one for each axis.
- See Also
- Graphicspointattributes::setBaseSize.
- Parameters
-
valuesCount | The number of base size values to request, starting with the first axis. If fewer values have been set it is padded with the last base size value. 1 to 3 values can be obtained. |
valuesOut | Array 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.
Font OpenCMISS::Zinc::Graphicspointattributes::getFont |
( |
| ) |
|
|
inline |
Gets the font in the graphics point attributes used to draw the label field.
- Returns
- Handle to font, or NULL/invalid handle if none or failed.
Glyph OpenCMISS::Zinc::Graphicspointattributes::getGlyph |
( |
| ) |
|
|
inline |
Gets the glyph in the graphics point attributes used to visualise points.
- Returns
- Handle to glyph, or NULL/invalid handle if none or failed.
int OpenCMISS::Zinc::Graphicspointattributes::getGlyphOffset |
( |
int |
valuesCount, |
|
|
double * |
valuesOut |
|
) |
| |
|
inline |
Gets the offset from the point coordinates to where the glyph origin is drawn, in glyph units along the glyph local axes.
- See Also
- Graphicspointattributes::setGlyphOffset.
- Parameters
-
valuesCount | The number of offset values to request, up to 3. |
valuesOut | Array to receive offset values, starting with the first axis. 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::Graphicspointattributes::getLabelField |
( |
| ) |
|
|
inline |
Gets the label field from the graphics point attributes.
- Returns
- Handle to label field, or NULL/invalid handle if none or failed.
int OpenCMISS::Zinc::Graphicspointattributes::getLabelOffset |
( |
int |
valuesCount, |
|
|
double * |
valuesOut |
|
) |
| |
|
inline |
char* OpenCMISS::Zinc::Graphicspointattributes::getLabelText |
( |
int |
labelNumber | ) |
|
|
inline |
Get static label text to be shown near each glyph.
- See Also
- Graphicspointattributes::setLabelText
- Parameters
-
labelNumber | The label_number to get, from 1 to 3. |
- Returns
- Allocated string containing label text, or NULL if none or error. Up to caller to free using cmzn_deallocate().
Field OpenCMISS::Zinc::Graphicspointattributes::getOrientationScaleField |
( |
| ) |
|
|
inline |
Gets the orientation scale field from the graphics point attributes. This controls scaling and orientation of point glyphs.
- See Also
- Graphicspointattributes::setOrientationScaleField
- Returns
- Handle to orientation scale field, or NULL/invalid handle if none or failed.
int OpenCMISS::Zinc::Graphicspointattributes::getScaleFactors |
( |
int |
valuesCount, |
|
|
double * |
valuesOut |
|
) |
| |
|
inline |
Sets the scale factors used in sizing the point glyph, up to 3 values, one for each axis.
- See Also
- Graphicspointattributes::setScaleFactors.
- Parameters
-
valuesCount | The number of scale_factors to request, starting with the first axis. If fewer values have been set it is padded with the last scale factor value. 1 to 3 values can be obtained. |
valuesOut | Array 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.
Field OpenCMISS::Zinc::Graphicspointattributes::getSignedScaleField |
( |
| ) |
|
|
inline |
bool OpenCMISS::Zinc::Graphicspointattributes::isValid |
( |
| ) |
const |
|
inline |
int OpenCMISS::Zinc::Graphicspointattributes::setBaseSize |
( |
int |
valuesCount, |
|
|
const double * |
valuesIn |
|
) |
| |
|
inline |
Sets the base size of the point glyph, up to 3 values, one for each axis. For a unit sized glyph, the final size in each direction is: base_size + scale_factor * field_scalar where field_scalar is determined from the orientation_scale_field.
- See Also
- Graphicspointattributes::setOrientationScaleField. The default base size is zero. Tip: to visualise a 2- or 3-component vector orientation_scale_field, use a base size of 0,D,D with scale factors 1,0,0. This ensures the length equals the magnitude and the glyph is fixed to size D on the orthogonal axes.
- Parameters
-
valuesCount | The number of base size values to set, starting with the first 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 the diameter for a unit sphere glyph. |
valuesIn | Array of base sizes with the number of values specified. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setFont |
( |
const Font & |
font | ) |
|
|
inline |
int OpenCMISS::Zinc::Graphicspointattributes::setGlyph |
( |
const Glyph & |
glyph | ) |
|
|
inline |
int OpenCMISS::Zinc::Graphicspointattributes::setGlyphOffset |
( |
int |
valuesCount, |
|
|
const double * |
valuesIn |
|
) |
| |
|
inline |
Sets the offset from the point coordinates to where the glyph origin is drawn, in glyph units along the glyph local axes.
- See Also
- Graphicspointattributes::setOrientationScaleField. Tip: offset values can give the effect of moving the centre point / origin of the glyph: just pass in negative coordinates for the new origin.
- Parameters
-
valuesCount | The number of offset values to set, up to 3. |
valuesIn | Array of offset values, starting with the first axis. If fewer than 3 then zero is assumed for all other offset values. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setLabelField |
( |
const Field & |
labelField | ) |
|
|
inline |
Sets the label field in the graphics point attributes. A string representation of this field's value (if defined) is drawn with the current font at the glyph offset.
- Parameters
-
labelField | The label field to set. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setLabelOffset |
( |
int |
valuesCount, |
|
|
const double * |
valuesIn |
|
) |
| |
|
inline |
int OpenCMISS::Zinc::Graphicspointattributes::setLabelText |
( |
int |
labelNumber, |
|
|
const char * |
labelText |
|
) |
| |
|
inline |
Set static label text to be shown near each glyph. The number of labels depends on the glyph repeat mode, one label per glyph for REPEAT_MODE_AXES, one label for REPEAT_MODE_NONE and REPEAT_MODE_MIRROR. Note the label field value is written for the first label only, prefixed by the first static label text.
- See Also
- Graphicspointattributes::setGlyphRepeatMode
- Parameters
-
labelNumber | The label_number to set, from 1 to 3. |
labelText | The string to set as static label text. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setOrientationScaleField |
( |
const Field & |
orientationScaleField | ) |
|
|
inline |
Sets the orientation scale field in the graphics point attributes. This controls scaling and orientation of point glyphs. Only fields with the following numbers of components are allowed, with the prescribed behaviour: 1 : default orientation in line with local x, y and z axes, with scalar value equally applied in all 3 axes. 2 : 2-D vector giving orientation of 1st axis. 2nd vector is 90 degrees anticlockwise in 2-D plane, and 3rd vector is v1 (x) v2. Scale in all directions is magnitude of vector; use a zero scale factor to not scale in any axis. 3 : 3-D vector giving orientation of first axis. 2nd vector is arbitrary normal to this, and 3rd vector is v1 (x) v2. Scale in all directions is magnitude of vector; use a zero scale factor to not scale in any axis. 4 : 2 2-D vectors each giving orientation and scale (from magnitude) of 1st and 2nd axes. 3rd axis is v1 (x) v2 including scale from its magnitude. 6 : 2 3-D vectors each giving orientation and scale (from magnitude) of 1st and 2nd axes. 3rd axis is v1 (x) v2 including scale from its magnitude. 9 : 3 3-D vectors giving orientation and scale (from magnitude) of all 3 axes, in a right-handed sense. Note the signed scale field provides additional scaling and orientation reversal for negative values.
- See Also
- Graphicspointattributes::setSignedScaleField
- Parameters
-
orientationScaleField | The orientation scale field to set. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setScaleFactors |
( |
int |
valuesCount, |
|
|
const double * |
valuesIn |
|
) |
| |
|
inline |
Sets the scale factors used in sizing the point glyph, up to 3 values, one for each axis. For a unit sized glyph, the final size in each direction is: base_size + scale_factor * field_scalar where field_scalar is determined from the orientation_scale_field.
- See Also
- Graphicspointattributes::setOrientationScaleField. Scale factor values default to 1. Tip: to visualise a 2- or 3-component vector orientation_scale_field, use a base size of 0,D,D with scale factors 1,0,0. This ensures the length equals the magnitude and the glyph is fixed to size D on the orthogonal axes.
- Parameters
-
valuesCount | The number of scale factor values to set, starting with the first 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. |
valuesIn | Array of scale factors with the number of values specified. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Graphicspointattributes::setSignedScaleField |
( |
const Field & |
signedScaleField | ) |
|
|
inline |
Sets the signed scale field in the graphics point attributes. Can have from 1 to 3 components which multiply the scaling from the orientation scale field on the corresponding axis. Note special behaviour applies when used with the GLYPH_REPEAT_MODE_MIRROR mode: If value is negative on the first axis, the origin of the glyph is moved to the end of the first axis and its direction is reversed. This is commonly used to draw stress and strain with mirrored arrow-like glyphs pointing inward for compression, and outward for tension. Do this by passing a single eigenvalue (of stress or strain tensor) as the signed_scale and the corresponding eigenvector as the orientation_scale field, with repeat mirror. Use a separate points graphics for each eigenvalue.
- See Also
- Graphicspointattributes::setGlyphRepeatMode
- Parameters
-
signedScaleField | The signed scale field to set. |
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
The documentation for this class was generated from the following file: