9 #ifndef CMZN_GLYPH_HPP__ 10 #define CMZN_GLYPH_HPP__ 12 #include "opencmiss/zinc/glyph.h" 13 #include "opencmiss/zinc/context.hpp" 14 #include "opencmiss/zinc/material.hpp" 15 #include "opencmiss/zinc/spectrum.hpp" 24 class Glyphmodulenotifier;
48 explicit Glyph(cmzn_glyph_id in_glyph_id) :
53 id(cmzn_glyph_access(glyph.id))
58 cmzn_glyph_id temp_id = cmzn_glyph_access(glyph.id);
61 cmzn_glyph_destroy(&
id);
71 cmzn_glyph_destroy(&
id);
224 return cmzn_glyph_get_name(
id);
235 return cmzn_glyph_set_name(
id, name);
246 return (0 != cmzn_glyph_is_managed(
id));
263 return cmzn_glyph_set_managed(
id, static_cast<int>(value));
282 inline bool operator==(
const Glyph& a,
const Glyph& b)
301 inline cmzn_glyph_axes_id getDerivedId()
303 return reinterpret_cast<cmzn_glyph_axes_id
>(id);
309 explicit GlyphAxes(cmzn_glyph_axes_id axes_id)
310 :
Glyph(reinterpret_cast<cmzn_glyph_id>(axes_id))
320 return cmzn_glyph_axes_get_axis_width(getDerivedId());
333 return cmzn_glyph_axes_set_axis_width(getDerivedId(), axisWidth);
345 return cmzn_glyph_axes_get_axis_label(getDerivedId(), axisNumber);
357 return cmzn_glyph_axes_set_axis_label(getDerivedId(), axisNumber, label);
368 return Material(cmzn_glyph_axes_get_axis_material(getDerivedId(), axisNumber));
382 return cmzn_glyph_axes_set_axis_material(getDerivedId(), axisNumber, material.
getId());
389 return GlyphAxes(cmzn_glyph_cast_axes(
id));
407 inline cmzn_glyph_colour_bar_id getDerivedId()
409 return reinterpret_cast<cmzn_glyph_colour_bar_id
>(id);
416 :
Glyph(reinterpret_cast<cmzn_glyph_id>(colour_bar_id))
426 int getAxis(
int valuesCount,
double *valuesOut)
428 return cmzn_glyph_colour_bar_get_axis(getDerivedId(), valuesCount, valuesOut);
441 int setAxis(
int valuesCount,
const double *valuesIn)
443 return cmzn_glyph_colour_bar_set_axis(getDerivedId(), valuesCount, valuesIn);
455 return cmzn_glyph_colour_bar_get_centre(getDerivedId(), valuesCount, valuesOut);
471 return cmzn_glyph_colour_bar_set_centre(getDerivedId(), valuesCount, valuesIn);
482 return cmzn_glyph_colour_bar_get_extend_length(getDerivedId());
495 return cmzn_glyph_colour_bar_set_extend_length(getDerivedId(), extendLength);
505 return cmzn_glyph_colour_bar_get_label_divisions(getDerivedId());
518 return cmzn_glyph_colour_bar_set_label_divisions(getDerivedId(), labelDivisions);
528 return Material(cmzn_glyph_colour_bar_get_label_material(getDerivedId()));
541 return cmzn_glyph_colour_bar_set_label_material(getDerivedId(), material.
getId());
552 return cmzn_glyph_colour_bar_get_number_format(getDerivedId());
568 return cmzn_glyph_colour_bar_set_number_format(getDerivedId(), numberFormat);
580 return cmzn_glyph_colour_bar_get_side_axis(getDerivedId(), valuesCount, valuesOut);
596 return cmzn_glyph_colour_bar_set_side_axis(getDerivedId(), valuesCount, valuesIn);
606 return Spectrum(cmzn_glyph_colour_bar_get_spectrum(getDerivedId()));
616 return cmzn_glyph_colour_bar_get_tick_length(getDerivedId());
629 return cmzn_glyph_colour_bar_set_tick_length(getDerivedId(), tickLength);
648 cmzn_glyphiterator_id id;
661 id(cmzn_glyphiterator_access(glyphiterator.id))
666 cmzn_glyphiterator_id temp_id = cmzn_glyphiterator_access(glyphiterator.id);
669 cmzn_glyphiterator_destroy(&
id);
679 cmzn_glyphiterator_destroy(&
id);
702 return Glyph(cmzn_glyphiterator_next(
id));
717 cmzn_glyphmodule_id id;
725 explicit Glyphmodule(cmzn_glyphmodule_id in_glyphmodule_id) :
726 id(in_glyphmodule_id)
730 id(cmzn_glyphmodule_access(glyphModule.id))
735 cmzn_glyphmodule_id temp_id = cmzn_glyphmodule_access(glyphModule.id);
738 cmzn_glyphmodule_destroy(&
id);
748 cmzn_glyphmodule_destroy(&
id);
783 return cmzn_glyphmodule_begin_change(
id);
797 return cmzn_glyphmodule_end_change(
id);
812 return GlyphAxes(reinterpret_cast<cmzn_glyph_axes_id>(
813 cmzn_glyphmodule_create_glyph_axes(
id, axisGlyph.
getId(), axisWidth)));
827 cmzn_glyphmodule_create_glyph_colour_bar(
id, spectrum.
getId())));
844 return Glyphiterator(cmzn_glyphmodule_create_glyphiterator(
id));
892 return cmzn_glyphmodule_define_standard_glyphs(
id);
903 return Glyph(cmzn_glyphmodule_find_glyph_by_name(
id, name));
914 return Glyph(cmzn_glyphmodule_find_glyph_by_glyph_shape_type(
id, static_cast<cmzn_glyph_shape_type>(glyphShapeType)));
924 return Glyph(cmzn_glyphmodule_get_default_point_glyph(
id));
935 return cmzn_glyphmodule_set_default_point_glyph(
id, glyph.
getId());
946 inline Glyph createStaticGlyphFromGraphics(
const Graphics& graphics);
967 cmzn_glyphmoduleevent_id id;
975 explicit Glyphmoduleevent(cmzn_glyphmoduleevent_id in_glyphmodule_event_id) :
976 id(in_glyphmodule_event_id)
980 id(cmzn_glyphmoduleevent_access(glyphmoduleEvent.id))
985 cmzn_glyphmoduleevent_id temp_id = cmzn_glyphmoduleevent_access(glyphmoduleEvent.id);
987 cmzn_glyphmoduleevent_destroy(&
id);
996 cmzn_glyphmoduleevent_destroy(&
id);
1031 return cmzn_glyphmoduleevent_get_glyph_change_flags(
id, glyph.
getId());
1043 return cmzn_glyphmoduleevent_get_summary_glyph_change_flags(
id);
1063 static void C_callback(cmzn_glyphmoduleevent_id glyphmoduleevent_id,
void *callbackVoid)
1065 Glyphmoduleevent glyphmoduleevent(cmzn_glyphmoduleevent_access(glyphmoduleevent_id));
1067 (*callback)(glyphmoduleevent);
1089 cmzn_glyphmodulenotifier_id id;
1098 id(in_glyphmodulenotifier_id)
1102 id(cmzn_glyphmodulenotifier_access(glyphmoduleNotifier.id))
1107 cmzn_glyphmodulenotifier_id temp_id = cmzn_glyphmodulenotifier_access(glyphmoduleNotifier.id);
1110 cmzn_glyphmodulenotifier_destroy(&
id);
1120 cmzn_glyphmodulenotifier_destroy(&
id);
1139 cmzn_glyphmodulenotifier_id
getId()
const 1156 return cmzn_glyphmodulenotifier_set_callback(
id, callback.C_callback, static_cast<void*>(&callback));
1167 return cmzn_glyphmodulenotifier_clear_callback(
id);
1178 return Glyphmodule(cmzn_context_get_glyphmodule(
id));
Definition: glyph.hpp:168
Material getAxisMaterial(int axisNumber)
Definition: glyph.hpp:366
char * getAxisLabel(int axisNumber)
Definition: glyph.hpp:343
A specialised glyph type which renders 3-D axes.
Definition: glyph.hpp:293
int endChange()
Definition: glyph.hpp:795
Definition: glyph.hpp:131
bool isManaged()
Definition: glyph.hpp:244
Definition: glyph.hpp:166
Definition: glyph.hpp:174
Definition: glyph.hpp:208
int defineStandardGlyphs()
Definition: glyph.hpp:890
Glyphmodulenotifier createGlyphmodulenotifier()
Definition: glyph.hpp:1171
Definition: glyph.hpp:172
GlyphColourBar castColourBar()
Definition: glyph.hpp:634
Definition: glyph.hpp:190
bool isValid() const
Definition: glyph.hpp:1129
Definition: glyph.hpp:139
Definition: glyph.hpp:170
Glyph findGlyphByGlyphShapeType(Glyph::ShapeType glyphShapeType)
Definition: glyph.hpp:912
double getTickLength()
Definition: glyph.hpp:614
cmzn_material_id getId() const
Definition: material.hpp:83
RepeatMode
Definition: glyph.hpp:127
Glyphmodule getGlyphmodule()
Definition: glyph.hpp:1176
int ChangeFlags
Definition: glyph.hpp:121
Definition: glyph.hpp:182
GlyphAxes createGlyphAxes(const Glyph &axisGlyph, double axisWidth)
Definition: glyph.hpp:810
Definition: glyph.hpp:194
Definition: glyph.hpp:192
int getAxis(int valuesCount, double *valuesOut)
Definition: glyph.hpp:426
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:741
Definition: glyph.hpp:200
Definition: glyph.hpp:106
int setManaged(bool value)
Definition: glyph.hpp:261
Definition: glyph.hpp:184
Definition: glyph.hpp:202
A glyph is a static graphics object used to visualise a point in space.
Definition: glyph.hpp:37
Definition: glyph.hpp:162
Definition: glyph.hpp:188
Glyph findGlyphByName(const char *name)
Definition: glyph.hpp:901
Definition: glyph.hpp:178
Manages individual user notification of changes with a glyph module.
Definition: glyph.hpp:1086
int setAxisMaterial(int axisNumber, const Material &material)
Definition: glyph.hpp:380
ChangeFlag
Definition: glyph.hpp:98
Zinc materials specify colouring of graphics.
Definition: material.hpp:29
int getSideAxis(int valuesCount, double *valuesOut)
Definition: glyph.hpp:578
Definition: glyph.hpp:204
Definition: glyph.hpp:104
Definition: glyph.hpp:129
cmzn_glyphmodule_id getId() const
Definition: glyph.hpp:767
int setAxisWidth(double axisWidth)
Definition: glyph.hpp:331
int setDefaultPointGlyph(const Glyph &glyph)
Definition: glyph.hpp:933
Definition: glyph.hpp:143
cmzn_glyphmoduleevent_id getId() const
Definition: glyph.hpp:1015
int setNumberFormat(const char *numberFormat)
Definition: glyph.hpp:566
int setLabelDivisions(int labelDivisions)
Definition: glyph.hpp:516
bool isValid() const
Definition: glyph.hpp:757
char * getNumberFormat()
Definition: glyph.hpp:550
char * getName()
Definition: glyph.hpp:222
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:656
int beginChange()
Definition: glyph.hpp:781
ShapeType
Definition: glyph.hpp:160
bool isValid() const
Definition: glyph.hpp:688
double getExtendLength()
Definition: glyph.hpp:480
Module managing all glyphs.
Definition: glyph.hpp:714
Definition: glyph.hpp:186
bool isValid() const
Definition: glyph.hpp:1005
A specialised glyph type which draws a cylindrical colour bar.
Definition: glyph.hpp:399
Definition: glyph.hpp:112
Definition: glyph.hpp:210
Spectrum getSpectrum()
Definition: glyph.hpp:604
double getAxisWidth()
Definition: glyph.hpp:318
int setAxisLabel(int axisNumber, const char *label)
Definition: glyph.hpp:355
Definition: glyph.hpp:102
An iterator for looping through all the glyphs in a glyphmodule.
Definition: glyph.hpp:644
Definition: glyph.hpp:108
Material getLabelMaterial()
Definition: glyph.hpp:526
int getCentre(int valuesCount, double *valuesOut)
Definition: glyph.hpp:453
Definition: glyph.hpp:206
Definition: glyph.hpp:180
int clearCallback()
Definition: glyph.hpp:1165
int setCentre(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:469
Glyph::ChangeFlags getSummaryGlyphChangeFlags() const
Definition: glyph.hpp:1041
Glyphiterator createGlyphiterator()
Definition: glyph.hpp:842
Glyph next()
Definition: glyph.hpp:700
GlyphColourBar createGlyphColourBar(const Spectrum &spectrum)
Definition: glyph.hpp:824
int setSideAxis(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:594
Definition: glyph.hpp:110
int setExtendLength(double extendLength)
Definition: glyph.hpp:493
GlyphAxes castAxes()
Definition: glyph.hpp:387
int setTickLength(double tickLength)
Definition: glyph.hpp:627
Glyph getDefaultPointGlyph()
Definition: glyph.hpp:922
The OpenCMISS namespace.
Definition: context.hpp:20
Definition: glyph.hpp:135
Definition: glyph.hpp:100
cmzn_glyph_id getId() const
Definition: glyph.hpp:90
Information about changes to glyphs in the glyph module.
Definition: glyph.hpp:964
int getLabelDivisions()
Definition: glyph.hpp:503
Definition: glyph.hpp:198
Glyph::ChangeFlags getGlyphChangeFlags(const Glyph &glyph) const
Definition: glyph.hpp:1029
int setLabelMaterial(const Material &material)
Definition: glyph.hpp:539
Definition: glyph.hpp:164
Definition: glyph.hpp:176
bool isValid() const
Definition: glyph.hpp:80
Definition: glyph.hpp:212
int setCallback(Glyphmodulecallback &callback)
Definition: glyph.hpp:1154
Base class functor for glyph module notifier callbacks.
Definition: glyph.hpp:1056
int setName(const char *name)
Definition: glyph.hpp:233
int setAxis(int valuesCount, const double *valuesIn)
Definition: glyph.hpp:441
cmzn_glyphmodulenotifier_id getId() const
Definition: glyph.hpp:1139
Definition: glyph.hpp:196