Module managing all glyphs.
More...
#include <glyph.hpp>
Module managing all glyphs.
Module managing all glyphs. Note that no glyphs exist on start-up, so most users will need to define standard glyphs early in their program, and after defining standard materials to pick up coloured standard glyphs.
- See Also
- Glyphmodule::defineStandardGlyphs
int OpenCMISS::Zinc::Glyphmodule::beginChange |
( |
| ) |
|
|
inline |
GlyphAxes OpenCMISS::Zinc::Glyphmodule::createGlyphAxes |
( |
const Glyph & |
axisGlyph, |
|
|
double |
axisWidth |
|
) |
| |
|
inline |
Create a glyph which drawing 3-D axes repeating the supplied axis glyph on three axes with the given axis width.
- Parameters
-
axisGlyph | A glyph to repeat on each of 3 axes. |
axisWidth | The width of each axis glyph when drawn at unit length; a fraction of 1 to give an appropriate arrow head size. Typically 0.1 for glyph 'axis', 0.25 for glyph 'arrow_solid'. Must be non-negative. |
- Returns
- Handle to new glyph, or NULL/invalid handle on failure.
Create a glyph which draws a colour bar for the spectrum with ticks and value labels. The glyph dynamically updates to match the current range and definition of the spectrum. Note it only shows a single component.
- Parameters
-
spectrum | The spectrum to be displayed on the colour bar. |
- Returns
- Handle to new glyph, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Glyphmodule::defineStandardGlyphs |
( |
| ) |
|
|
inline |
Defines a selection of standard glyphs for visualising points, vectors etc. Graphics for all standard glyphs fit in a unit cube which:
- for orientable glyphs e.g. line, arrow, cylinder: span [0,1] on axis 1, and [-0.5,0.5] on axes 2 and 3 (except line which has no width).
- are otherwise centred at 0,0,0 for all other glyphs. These consist of: "arrow", "arrow_solid" = line and solid arrows from (0,0,0) to (1,0,0) with arrowhead 1/3 of length and unit width. Shaft diameter is 1/3 unit. "axis", "axis_solid" = variants of arrows with arrowhead 1/10 of length. Shaft diameter is 1/3 unit. "cone", "cone_solid" = cone descending from unit diameter circle in 2-3 plane at (0,0,0) to a point at (1,0,0). Solid variant has base closed. "cross" = lines from -0.5 to +0.5 on each axis through (0,0,0). "cube_solid", "cube_wireframe" = solid and wireframe (line) unit cubes aligned with primary axes and centred at (0,0,0). "cylinder", "cylinder_solid" = a unit diameter cylinder, centre line from (0,0,0) to (1,0,0). Solid variant has ends closed. "diamond" = an octohedron created as a sphere with 4 divisions around, so lit like a sphere rather than faceted. "line" = a line from (0,0,0) to (1,0,0). "point" = a single pixel at (0,0,0). "sheet" = a unit square surface in 1-2 plane, centred at (0,0,0). "sphere" = a unit diameter sphere centred at (0,0,0). In addition there are 8 glyphs showing unit 3-D axes with various labels: "axes", "axes_123", "axes_xyz", "axes_colour" - using glyph "axis" and axis width 0.1. "axes_solid", "axes_solid_123", "axes_solid_xyz", "axes_solid_colour"
- using glyph "arrow_solid" and axis width 0.25. Note that the colour axes find standard materials "red", "green" and "blue" for the 3 axes but are not created if those materials are not defined.
- See Also
- Materialmodule::defineStandardMaterials All the above standard glyphs also have unique types enumeration.
-
Glyph::ShapeType
Note if any glyphs of the predefined name already exist prior to calling this function, the standard glyph is not created. All glyphs created by this function have IS_MANAGED set to 1. Circular glyphs including sphere, cylinders, cones and solid arrow and axis get their circle divisions from the tessellation specified in the graphics. If not already set, the default glyph is set to "point" by this function.
- Returns
- OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Glyphmodule::endChange |
( |
| ) |
|
|
inline |
Decrement cache level or end caching of changes for the glyph module. Call glyphmodule begin change method before making multiple changes and call this afterwards. When change level is restored to zero, cached change messages are sent out to clients.
- See Also
- Glyphmodule::beginChange
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
Glyph OpenCMISS::Zinc::Glyphmodule::findGlyphByName |
( |
const char * |
name | ) |
|
|
inline |
Find the glyph with the specified name, if any.
- Parameters
-
name | The name of the glyph. |
- Returns
- Handle to glyph, or NULL/invalid handle if not found or failed.
Glyph OpenCMISS::Zinc::Glyphmodule::getDefaultPointGlyph |
( |
| ) |
|
|
inline |
Get the default glyph used for new point graphics, if any.
- Returns
- Handle to glyph, or NULL/invalid handle if none or failed.
cmzn_glyphmodule_id OpenCMISS::Zinc::Glyphmodule::getId |
( |
| ) |
const |
|
inline |
Return the C handle of the Glyphmodule object.
- Returns
- C handle of Glyphmodule if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Glyphmodule::isValid |
( |
| ) |
const |
|
inline |
Check if this is a valid Glyphmodule object.
- Returns
- Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Glyphmodule::setDefaultPointGlyph |
( |
const Glyph & |
glyph | ) |
|
|
inline |
The documentation for this class was generated from the following file: