9 #ifndef CMZN_GRAPHICS_HPP__ 
   10 #define CMZN_GRAPHICS_HPP__ 
   12 #include "zinc/types/scenecoordinatesystem.hpp" 
   13 #include "zinc/graphics.h" 
   14 #include "zinc/element.hpp" 
   15 #include "zinc/field.hpp" 
   16 #include "zinc/glyph.hpp" 
   17 #include "zinc/font.hpp" 
   18 #include "zinc/material.hpp" 
   19 #include "zinc/spectrum.hpp" 
   20 #include "zinc/tessellation.hpp" 
   27 class GraphicsContours;
 
   30 class GraphicsStreamlines;
 
   31 class GraphicsSurfaces;
 
   32 class Graphicslineattributes;
 
   33 class Graphicspointattributes;
 
   34 class Graphicssamplingattributes;
 
   57     explicit Graphics(cmzn_graphics_id graphics_id) : id(graphics_id)
 
   65         cmzn_graphics_id temp_id = cmzn_graphics_access(graphics.id);
 
   68             cmzn_graphics_destroy(&
id);
 
   78             cmzn_graphics_destroy(&
id);
 
  165         return Field(cmzn_graphics_get_coordinate_field(
id));
 
  178         return cmzn_graphics_set_coordinate_field(
id, coordinateField.
getId());
 
  188         return Field(cmzn_graphics_get_data_field(
id));
 
  199         return cmzn_graphics_set_data_field(
id, dataField.
getId());
 
  210         return cmzn_graphics_get_render_line_width(
id);
 
  226         return cmzn_graphics_set_render_line_width(
id, width);
 
  237         return cmzn_graphics_get_render_point_size(
id);
 
  253         return cmzn_graphics_set_render_point_size(
id, size);
 
  264         return static_cast<RenderPolygonMode>(cmzn_graphics_get_render_polygon_mode(
id));
 
  277         return cmzn_graphics_set_render_polygon_mode(
id,
 
  278             static_cast<cmzn_graphics_render_polygon_mode>(renderPolygonMode));
 
  296         return static_cast<SelectMode>(cmzn_graphics_get_select_mode(
id));
 
  311         return cmzn_graphics_set_select_mode(
id, static_cast<cmzn_graphics_select_mode>(selectMode));
 
  321         return Field(cmzn_graphics_get_subgroup_field(
id));
 
  335         return cmzn_graphics_set_subgroup_field(
id, subgroupField.
getId());
 
  347         return Field(cmzn_graphics_get_texture_coordinate_field(
id));
 
  361         return cmzn_graphics_set_texture_coordinate_field(
id, textureCoordinateField.
getId());
 
  371         return Material(cmzn_graphics_get_material(
id));
 
  382         return cmzn_graphics_set_material(
id, material.
getId());
 
  419         return Material(cmzn_graphics_get_selected_material(
id));
 
  430         return cmzn_graphics_set_selected_material(
id, material.
getId());
 
  440         return Spectrum(cmzn_graphics_get_spectrum(
id));
 
  451         return cmzn_graphics_set_spectrum(
id, spectrum.
getId());
 
  462         return Tessellation(cmzn_graphics_get_tessellation(
id));
 
  474         return cmzn_graphics_set_tessellation(
id, tessellation.
getId());
 
  484         return Field(cmzn_graphics_get_tessellation_field(
id));
 
  499         return cmzn_graphics_set_tessellation_field(
id, tessellationField.
getId());
 
  509         return cmzn_graphics_get_visibility_flag(
id);
 
  521         return cmzn_graphics_set_visibility_flag(
id, visibilityFlag);
 
  543         return cmzn_graphics_set_scenecoordinatesystem(
id,
 
  544             static_cast<cmzn_scenecoordinatesystem>(coordinateSystem));
 
  569         return cmzn_graphics_set_field_domain_type(
id, static_cast<cmzn_field_domain_type>(domainType));
 
  580         return cmzn_graphics_get_name(
id);
 
  594         return cmzn_graphics_set_name(
id, name);
 
  607         return cmzn_graphics_set_element_face_type(
id, static_cast<cmzn_element_face_type>(faceType));
 
  628         return cmzn_graphics_is_exterior(
id);
 
  639         return cmzn_graphics_set_exterior(
id, exterior);
 
  701         : 
Graphics(reinterpret_cast<cmzn_graphics_id>(contours_id))
 
  711         return Field(cmzn_graphics_contours_get_isoscalar_field(reinterpret_cast<cmzn_graphics_contours_id>(
id)));
 
  723         return cmzn_graphics_contours_set_isoscalar_field(reinterpret_cast<cmzn_graphics_contours_id>(
id), field.
getId());
 
  740         return cmzn_graphics_contours_get_list_isovalues(reinterpret_cast<cmzn_graphics_contours_id>(
id),
 
  741             valuesCount, valuesOut);
 
  753         return cmzn_graphics_contours_set_list_isovalues(reinterpret_cast<cmzn_graphics_contours_id>(
id),
 
  754             valuesCount, valuesIn);
 
  766         return cmzn_graphics_contours_get_range_first_isovalue(
 
  767             reinterpret_cast<cmzn_graphics_contours_id>(
id));
 
  779         return cmzn_graphics_contours_get_range_last_isovalue(
 
  780             reinterpret_cast<cmzn_graphics_contours_id>(
id));
 
  792         return cmzn_graphics_contours_get_range_number_of_isovalues(
 
  793             reinterpret_cast<cmzn_graphics_contours_id>(
id));
 
  809         return cmzn_graphics_contours_set_range_isovalues(reinterpret_cast<cmzn_graphics_contours_id>(
id),
 
  810             numberOfValues, firstIsovalue, lastIsovalue);
 
  834         : 
Graphics(reinterpret_cast<cmzn_graphics_id>(lines_id))
 
  861         : 
Graphics(reinterpret_cast<cmzn_graphics_id>(points_id))
 
  890         : 
Graphics(reinterpret_cast<cmzn_graphics_id>(streamlines_id))
 
  917         return Field(cmzn_graphics_streamlines_get_stream_vector_field(reinterpret_cast<cmzn_graphics_streamlines_id>(
id)));
 
  931         return cmzn_graphics_streamlines_set_stream_vector_field(reinterpret_cast<cmzn_graphics_streamlines_id>(
id), field.
getId());
 
  943             cmzn_graphics_streamlines_get_track_direction(reinterpret_cast<cmzn_graphics_streamlines_id>(
id)));
 
  956         return cmzn_graphics_streamlines_set_track_direction(reinterpret_cast<cmzn_graphics_streamlines_id>(
id),
 
  957             static_cast<cmzn_graphics_streamlines_track_direction>(trackDirection));
 
  967         return cmzn_graphics_streamlines_get_track_length(reinterpret_cast<cmzn_graphics_streamlines_id>(
id));
 
  980         return cmzn_graphics_streamlines_set_track_length(reinterpret_cast<cmzn_graphics_streamlines_id>(
id), length);
 
 1001         : 
Graphics(reinterpret_cast<cmzn_graphics_id>(surfaces_id))
 
 1040     cmzn_graphicslineattributes_id id;
 
 1046         id(line_attributes_id)
 
 1050         id(cmzn_graphicslineattributes_access(lineAttributes.id))
 
 1055         cmzn_graphicslineattributes_id temp_id = cmzn_graphicslineattributes_access(graphicslineattributes.id);
 
 1057             cmzn_graphicslineattributes_destroy(&
id);
 
 1064         cmzn_graphicslineattributes_destroy(&
id);
 
 1107         return cmzn_graphicslineattributes_get_base_size(
id, valuesCount, valuesOut);
 
 1130         return cmzn_graphicslineattributes_set_base_size(
id, valuesCount, valuesIn);
 
 1142         return Field(cmzn_graphicslineattributes_get_orientation_scale_field(
id));
 
 1157         return cmzn_graphicslineattributes_set_orientation_scale_field(
id, orientationScaleField.
getId());
 
 1174         return cmzn_graphicslineattributes_get_scale_factors(
id, valuesCount, valuesOut);
 
 1198         return cmzn_graphicslineattributes_set_scale_factors(
id, valuesCount, valuesIn);
 
 1209         return static_cast<ShapeType>(cmzn_graphicslineattributes_get_shape_type(
id));
 
 1224         return cmzn_graphicslineattributes_set_shape_type(
id, static_cast<cmzn_graphicslineattributes_shape_type>(shapeType));
 
 1244     cmzn_graphicspointattributes_id id;
 
 1250         id(point_attributes_id)
 
 1254         id(cmzn_graphicspointattributes_access(pointAttributes.id))
 
 1259         cmzn_graphicspointattributes_id temp_id = cmzn_graphicspointattributes_access(graphicspointattributes.id);
 
 1261             cmzn_graphicspointattributes_destroy(&
id);
 
 1268         cmzn_graphicspointattributes_destroy(&
id);
 
 1294         return cmzn_graphicspointattributes_get_base_size(
id, valuesCount, valuesOut);
 
 1317         return cmzn_graphicspointattributes_set_base_size(
id, valuesCount, valuesIn);
 
 1327         return Font(cmzn_graphicspointattributes_get_font(
id));
 
 1338         return cmzn_graphicspointattributes_set_font(
id, font.
getId());
 
 1348         return Glyph(cmzn_graphicspointattributes_get_glyph(
id));
 
 1359         return cmzn_graphicspointattributes_set_glyph(
id, glyph.
getId());
 
 1374         return cmzn_graphicspointattributes_get_glyph_offset(
id, valuesCount, valuesOut);
 
 1391         return cmzn_graphicspointattributes_set_glyph_offset(
id, valuesCount, valuesIn);
 
 1402         return static_cast<Glyph::RepeatMode>(cmzn_graphicspointattributes_get_glyph_repeat_mode(
id));
 
 1415         return cmzn_graphicspointattributes_set_glyph_repeat_mode(
id,
 
 1416             static_cast<enum cmzn_glyph_repeat_mode>(glyphRepeatMode));
 
 1428         return static_cast<Glyph::ShapeType>(cmzn_graphicspointattributes_get_glyph_shape_type(
id));
 
 1442         return cmzn_graphicspointattributes_set_glyph_shape_type(
id,
 
 1443             static_cast<cmzn_glyph_shape_type>(shapeType));
 
 1453         return Field(cmzn_graphicspointattributes_get_label_field(
id));
 
 1466         return cmzn_graphicspointattributes_set_label_field(
id, labelField.
getId());
 
 1480         return cmzn_graphicspointattributes_get_label_offset(
id, valuesCount, valuesOut);
 
 1495         return cmzn_graphicspointattributes_set_label_offset(
id, valuesCount, valuesIn);
 
 1508         return cmzn_graphicspointattributes_get_label_text(
id, labelNumber);
 
 1524         return cmzn_graphicspointattributes_set_label_text(
id, labelNumber, labelText);
 
 1536         return Field(cmzn_graphicspointattributes_get_orientation_scale_field(
id));
 
 1568         return cmzn_graphicspointattributes_set_orientation_scale_field(
id, orientationScaleField.
getId());
 
 1585         return cmzn_graphicspointattributes_get_scale_factors(
id, valuesCount, valuesOut);
 
 1609         return cmzn_graphicspointattributes_set_scale_factors(
id, valuesCount, valuesIn);
 
 1620         return Field(cmzn_graphicspointattributes_get_signed_scale_field(
id));
 
 1642         return cmzn_graphicspointattributes_set_signed_scale_field(
id, signedScaleField.
getId());
 
 1662     cmzn_graphicssamplingattributes_id id;
 
 1668         id(sampling_attributes_id)
 
 1672         id(cmzn_graphicssamplingattributes_access(samplingAttributes.id))
 
 1677         cmzn_graphicssamplingattributes_id temp_id = cmzn_graphicssamplingattributes_access(graphicssamplingattributes.id);
 
 1679             cmzn_graphicssamplingattributes_destroy(&
id);
 
 1686         cmzn_graphicssamplingattributes_destroy(&
id);
 
 1707         return Field(cmzn_graphicssamplingattributes_get_density_field(
id));
 
 1721         return cmzn_graphicssamplingattributes_set_density_field(
id, densityField.
getId());
 
 1734         return cmzn_graphicssamplingattributes_get_location(
id, valuesCount, valuesOut);
 
 1749         return cmzn_graphicssamplingattributes_set_location(
id, valuesCount, valuesIn);
 
 1771         return cmzn_graphicssamplingattributes_set_element_point_sampling_mode(
id,
 
 1772             static_cast<cmzn_element_point_sampling_mode>(samplingMode));
 
int setSignedScaleField(const Field &signedScaleField)
Definition: graphics.hpp:1640
 
int setListIsovalues(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:751
 
enum Scenecoordinatesystem getScenecoordinatesystem()
Definition: graphics.hpp:529
 
int setTextureCoordinateField(const Field &textureCoordinateField)
Definition: graphics.hpp:359
 
enum RenderPolygonMode getRenderPolygonMode()
Definition: graphics.hpp:262
 
Glyph::ShapeType getGlyphShapeType()
Definition: graphics.hpp:1426
 
Graphicspointattributes getGraphicspointattributes()
Definition: graphics.hpp:1647
 
int setShapeType(ShapeType shapeType)
Definition: graphics.hpp:1222
 
Attributes object specifying how lines are visualised. 
Definition: graphics.hpp:1037
 
Lines visualise 1-D elements in the model. 
Definition: graphics.hpp:824
 
int setElementPointSamplingMode(Element::PointSamplingMode samplingMode)
Definition: graphics.hpp:1769
 
int getScaleFactors(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1583
 
int setRenderPolygonMode(RenderPolygonMode renderPolygonMode)
Definition: graphics.hpp:275
 
Definition: graphics.hpp:124
 
char * getLabelText(int labelNumber)
Definition: graphics.hpp:1506
 
cmzn_tessellation_id getId() const 
Definition: tessellation.hpp:81
 
int setScaleFactors(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1607
 
Field getOrientationScaleField()
Definition: graphics.hpp:1140
 
Surfaces visualise 2-D elements in the model. 
Definition: graphics.hpp:991
 
Definition: graphics.hpp:112
 
int setVisibilityFlag(bool visibilityFlag)
Definition: graphics.hpp:519
 
int setTrackDirection(TrackDirection trackDirection)
Definition: graphics.hpp:954
 
int setMaterial(const Material &material)
Definition: graphics.hpp:380
 
Base field type: an abstraction of a mathematical field. 
Definition: field.hpp:46
 
int setName(const char *name)
Definition: graphics.hpp:592
 
int setGlyphOffset(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1389
 
bool isValid() const 
Definition: graphics.hpp:1276
 
Field getCoordinateField()
Definition: graphics.hpp:163
 
int getLocation(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1732
 
int setTessellation(const Tessellation &tessellation)
Definition: graphics.hpp:472
 
SelectMode
Definition: graphics.hpp:110
 
Scenecoordinatesystem
Definition: scenecoordinatesystem.hpp:26
 
int setLocation(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1747
 
bool isValid() const 
Definition: graphics.hpp:1694
 
int getListIsovalues(int valuesCount, double *valuesOut)
Definition: graphics.hpp:738
 
int setOrientationScaleField(const Field &orientationScaleField)
Definition: graphics.hpp:1566
 
int setSpectrum(const Spectrum &spectrum)
Definition: graphics.hpp:449
 
Material getSelectedMaterial()
Definition: graphics.hpp:417
 
Definition: graphics.hpp:97
 
Material getMaterial()
Definition: graphics.hpp:369
 
Container/manager for graphics visualising a region. 
Definition: scene.hpp:34
 
Definition: graphics.hpp:1090
 
Definition: graphics.hpp:114
 
cmzn_material_id getId() const 
Definition: material.hpp:83
 
RepeatMode
Definition: glyph.hpp:97
 
Definition: graphics.hpp:903
 
bool isValid() const 
Definition: graphics.hpp:1072
 
int setRangeIsovalues(int numberOfValues, double firstIsovalue, double lastIsovalue)
Definition: graphics.hpp:807
 
Points graphics visualise discrete locations in the model. 
Definition: graphics.hpp:851
 
double getRangeFirstIsovalue()
Definition: graphics.hpp:764
 
Field getDataField()
Definition: graphics.hpp:186
 
Definition: graphics.hpp:118
 
int setTrackLength(double length)
Definition: graphics.hpp:978
 
Glyph::RepeatMode getGlyphRepeatMode()
Definition: graphics.hpp:1400
 
GraphicsContours castContours()
Definition: graphics.hpp:1005
 
Definition: graphics.hpp:137
 
int setScenecoordinatesystem(Scenecoordinatesystem coordinateSystem)
Definition: graphics.hpp:541
 
int getScaleFactors(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1172
 
char * getName()
Definition: graphics.hpp:578
 
Field getStreamVectorField()
Definition: graphics.hpp:915
 
Field getLabelField()
Definition: graphics.hpp:1451
 
Base graphics type: produces 3-D graphics visualising domains and fields. 
Definition: graphics.hpp:45
 
cmzn_spectrum_id getId() const 
Definition: spectrum.hpp:638
 
Font getFont()
Definition: graphics.hpp:1325
 
Spectrum getSpectrum()
Definition: graphics.hpp:438
 
A glyph is a static graphics object used to visualise a point in space. 
Definition: glyph.hpp:35
 
Definition: graphics.hpp:141
 
int setBaseSize(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1315
 
int setSelectedMaterial(const Material &material)
Definition: graphics.hpp:428
 
cmzn_field_id getId() const 
Definition: field.hpp:98
 
double getRangeLastIsovalue()
Definition: graphics.hpp:777
 
ShapeType getShapeType()
Definition: graphics.hpp:1207
 
Zinc materials specify colouring of graphics. 
Definition: material.hpp:29
 
TrackDirection getTrackDirection()
Definition: graphics.hpp:940
 
Element::FaceType getElementFaceType()
Definition: graphics.hpp:616
 
int getBaseSize(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1292
 
int setTessellationField(const Field &tessellationField)
Definition: graphics.hpp:497
 
int setBaseSize(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1128
 
int getRangeNumberOfIsovalues()
Definition: graphics.hpp:790
 
int setDataField(const Field &dataField)
Definition: graphics.hpp:197
 
RenderPolygonMode
Definition: graphics.hpp:95
 
DomainType
Definition: field.hpp:190
 
int setLabelField(const Field &labelField)
Definition: graphics.hpp:1464
 
Definition: graphics.hpp:1086
 
int setSelectMode(SelectMode selectMode)
Definition: graphics.hpp:309
 
Field getSubgroupField()
Definition: graphics.hpp:319
 
GraphicsPoints castPoints()
Definition: graphics.hpp:1015
 
Element::PointSamplingMode getElementPointSamplingMode()
Definition: graphics.hpp:1757
 
int setGlyphShapeType(Glyph::ShapeType shapeType)
Definition: graphics.hpp:1440
 
bool isExterior()
Definition: graphics.hpp:626
 
ShapeType
Definition: graphics.hpp:1080
 
Zinc Spectrum maps values of graphics data fields to colours. 
Definition: spectrum.hpp:581
 
Definition: graphics.hpp:99
 
int setRenderLineWidth(double width)
Definition: graphics.hpp:224
 
ShapeType
Definition: glyph.hpp:130
 
bool getVisibilityFlag()
Definition: graphics.hpp:507
 
Definition: graphics.hpp:143
 
int setOrientationScaleField(const Field &orientationScaleField)
Definition: graphics.hpp:1155
 
Field getTessellationField()
Definition: graphics.hpp:482
 
Field::DomainType getFieldDomainType()
Definition: graphics.hpp:553
 
Definition: graphics.hpp:101
 
Definition: graphics.hpp:1088
 
Graphicslineattributes getGraphicslineattributes()
Definition: graphics.hpp:1229
 
Attributes object specifying how points are visualised. 
Definition: graphics.hpp:1241
 
The tessellation controls the number of polygons or line segments. 
Definition: tessellation.hpp:28
 
int setFieldDomainType(Field::DomainType domainType)
Definition: graphics.hpp:567
 
int getBaseSize(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1105
 
int setFont(const Font &font)
Definition: graphics.hpp:1336
 
Definition: graphics.hpp:122
 
int setLabelText(int labelNumber, const char *labelText)
Definition: graphics.hpp:1522
 
cmzn_font_id getId() const 
Definition: font.hpp:103
 
Graphicssamplingattributes getGraphicssamplingattributes()
Definition: graphics.hpp:1777
 
Glyph getGlyph()
Definition: graphics.hpp:1346
 
GraphicsLines castLines()
Definition: graphics.hpp:1010
 
int setSubgroupField(const Field &subgroupField)
Definition: graphics.hpp:333
 
PointSamplingMode
Definition: element.hpp:329
 
int setElementFaceType(Element::FaceType faceType)
Definition: graphics.hpp:605
 
GraphicsStreamlines castStreamlines()
Definition: graphics.hpp:1020
 
Streamlines visualise the path of a fluid particle tracking along a vector field. ...
Definition: graphics.hpp:880
 
Definition: graphics.hpp:901
 
GraphicsSurfaces castSurfaces()
Definition: graphics.hpp:1025
 
TrackDirection
Definition: graphics.hpp:899
 
int setGlyphRepeatMode(Glyph::RepeatMode glyphRepeatMode)
Definition: graphics.hpp:1413
 
int getLabelOffset(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1478
 
int setRenderPointSize(double size)
Definition: graphics.hpp:251
 
int setExterior(bool exterior)
Definition: graphics.hpp:637
 
double getRenderPointSize()
Definition: graphics.hpp:235
 
int getGlyphOffset(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1372
 
Definition: graphics.hpp:135
 
Definition: graphics.hpp:1084
 
Type
Definition: graphics.hpp:131
 
int setScaleFactors(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1196
 
Field getOrientationScaleField()
Definition: graphics.hpp:1534
 
double getTrackLength()
Definition: graphics.hpp:965
 
enum SelectMode getSelectMode()
Definition: graphics.hpp:294
 
bool isValid() const 
Definition: graphics.hpp:87
 
Field getDensityField()
Definition: graphics.hpp:1705
 
Field getTextureCoordinateField()
Definition: graphics.hpp:345
 
Field getSignedScaleField()
Definition: graphics.hpp:1618
 
Definition: graphics.hpp:139
 
cmzn_glyph_id getId() const 
Definition: glyph.hpp:88
 
Definition: graphics.hpp:1082
 
Graphics attributes object specifying how points are sampled in elements. 
Definition: graphics.hpp:1659
 
int setLabelOffset(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1493
 
The contours derived graphics type. 
Definition: graphics.hpp:691
 
int setCoordinateField(const Field &coordinateField)
Definition: graphics.hpp:176
 
Field getIsoscalarField()
Definition: graphics.hpp:709
 
FaceType
Definition: element.hpp:270
 
int setIsoscalarField(const Field &field)
Definition: graphics.hpp:721
 
Definition: graphics.hpp:905
 
Font object controlling attributes of rendering text. 
Definition: font.hpp:26
 
Scene getScene()
Definition: scene.hpp:529
 
Tessellation getTessellation()
Definition: graphics.hpp:460
 
cmzn_graphics_id getId() const 
Definition: graphics.hpp:153
 
Definition: graphics.hpp:133
 
int setGlyph(const Glyph &glyph)
Definition: graphics.hpp:1357
 
int setDensityField(const Field &densityField)
Definition: graphics.hpp:1719
 
double getRenderLineWidth()
Definition: graphics.hpp:208
 
int setStreamVectorField(const Field &field)
Definition: graphics.hpp:929