9 #ifndef CMZN_GRAPHICS_HPP__ 10 #define CMZN_GRAPHICS_HPP__ 12 #include "opencmiss/zinc/types/scenecoordinatesystem.hpp" 13 #include "opencmiss/zinc/graphics.h" 14 #include "opencmiss/zinc/element.hpp" 15 #include "opencmiss/zinc/field.hpp" 16 #include "opencmiss/zinc/glyph.hpp" 17 #include "opencmiss/zinc/font.hpp" 18 #include "opencmiss/zinc/material.hpp" 19 #include "opencmiss/zinc/spectrum.hpp" 20 #include "opencmiss/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());
461 return static_cast<Type>(cmzn_graphics_get_type(
id));
472 return Tessellation(cmzn_graphics_get_tessellation(
id));
484 return cmzn_graphics_set_tessellation(
id, tessellation.
getId());
494 return Field(cmzn_graphics_get_tessellation_field(
id));
509 return cmzn_graphics_set_tessellation_field(
id, tessellationField.
getId());
519 return cmzn_graphics_get_visibility_flag(
id);
531 return cmzn_graphics_set_visibility_flag(
id, visibilityFlag);
553 return cmzn_graphics_set_scenecoordinatesystem(
id,
554 static_cast<cmzn_scenecoordinatesystem>(coordinateSystem));
579 return cmzn_graphics_set_field_domain_type(
id, static_cast<cmzn_field_domain_type>(domainType));
590 return cmzn_graphics_get_name(
id);
604 return cmzn_graphics_set_name(
id, name);
619 return cmzn_graphics_set_element_face_type(
id, static_cast<cmzn_element_face_type>(faceType));
640 return cmzn_graphics_is_exterior(
id);
651 return cmzn_graphics_set_exterior(
id, exterior);
719 inline cmzn_graphics_contours_id getDerivedId()
721 return reinterpret_cast<cmzn_graphics_contours_id
>(this->id);
728 :
Graphics(reinterpret_cast<cmzn_graphics_id>(contours_id))
738 return Field(cmzn_graphics_contours_get_isoscalar_field(this->getDerivedId()));
750 return cmzn_graphics_contours_set_isoscalar_field(this->getDerivedId(), field.
getId());
767 return cmzn_graphics_contours_get_list_isovalues(this->getDerivedId(),
768 valuesCount, valuesOut);
780 return cmzn_graphics_contours_set_list_isovalues(this->getDerivedId(),
781 valuesCount, valuesIn);
793 return cmzn_graphics_contours_get_range_first_isovalue(this->getDerivedId());
805 return cmzn_graphics_contours_get_range_last_isovalue(this->getDerivedId());
817 return cmzn_graphics_contours_get_range_number_of_isovalues(this->getDerivedId());
833 return cmzn_graphics_contours_set_range_isovalues(this->getDerivedId(),
834 numberOfValues, firstIsovalue, lastIsovalue);
858 :
Graphics(reinterpret_cast<cmzn_graphics_id>(lines_id))
885 :
Graphics(reinterpret_cast<cmzn_graphics_id>(points_id))
915 inline cmzn_graphics_streamlines_id getDerivedId()
917 return reinterpret_cast<cmzn_graphics_streamlines_id
>(this->id);
924 :
Graphics(reinterpret_cast<cmzn_graphics_id>(streamlines_id))
932 COLOUR_DATA_TYPE_INVALID = CMZN_GRAPHICS_STREAMLINES_COLOUR_DATA_TYPE_INVALID,
934 COLOUR_DATA_TYPE_FIELD = CMZN_GRAPHICS_STREAMLINES_COLOUR_DATA_TYPE_FIELD,
936 COLOUR_DATA_TYPE_MAGNITUDE = CMZN_GRAPHICS_STREAMLINES_COLOUR_DATA_TYPE_MAGNITUDE,
939 COLOUR_DATA_TYPE_TRAVEL_TIME = CMZN_GRAPHICS_STREAMLINES_COLOUR_DATA_TYPE_TRAVEL_TIME
952 TRACK_DIRECTION_INVALID = CMZN_GRAPHICS_STREAMLINES_TRACK_DIRECTION_INVALID,
954 TRACK_DIRECTION_FORWARD = CMZN_GRAPHICS_STREAMLINES_TRACK_DIRECTION_FORWARD,
956 TRACK_DIRECTION_REVERSE = CMZN_GRAPHICS_STREAMLINES_TRACK_DIRECTION_REVERSE
967 return static_cast<ColourDataType>(cmzn_graphics_streamlines_get_colour_data_type(this->getDerivedId()));
981 return cmzn_graphics_streamlines_set_colour_data_type(this->getDerivedId(),
982 static_cast<cmzn_graphics_streamlines_colour_data_type>(dataType));
993 return Field(cmzn_graphics_streamlines_get_stream_vector_field(this->getDerivedId()));
1007 return cmzn_graphics_streamlines_set_stream_vector_field(this->getDerivedId(), field.
getId());
1019 cmzn_graphics_streamlines_get_track_direction(this->getDerivedId()));
1032 return cmzn_graphics_streamlines_set_track_direction(this->getDerivedId(),
1033 static_cast<cmzn_graphics_streamlines_track_direction>(trackDirection));
1043 return cmzn_graphics_streamlines_get_track_length(this->getDerivedId());
1056 return cmzn_graphics_streamlines_set_track_length(this->getDerivedId(), length);
1077 :
Graphics(reinterpret_cast<cmzn_graphics_id>(surfaces_id))
1116 cmzn_graphicslineattributes_id id;
1124 id(line_attributes_id)
1128 id(cmzn_graphicslineattributes_access(lineAttributes.id))
1133 cmzn_graphicslineattributes_id temp_id = cmzn_graphicslineattributes_access(graphicslineattributes.id);
1135 cmzn_graphicslineattributes_destroy(&
id);
1142 cmzn_graphicslineattributes_destroy(&
id);
1160 SHAPE_TYPE_INVALID = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_INVALID,
1162 SHAPE_TYPE_LINE = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_LINE,
1164 SHAPE_TYPE_RIBBON = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_RIBBON,
1166 SHAPE_TYPE_CIRCLE_EXTRUSION = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_CIRCLE_EXTRUSION,
1168 SHAPE_TYPE_SQUARE_EXTRUSION = CMZN_GRAPHICSLINEATTRIBUTES_SHAPE_TYPE_SQUARE_EXTRUSION
1185 return cmzn_graphicslineattributes_get_base_size(
id, valuesCount, valuesOut);
1208 return cmzn_graphicslineattributes_set_base_size(
id, valuesCount, valuesIn);
1220 return Field(cmzn_graphicslineattributes_get_orientation_scale_field(
id));
1235 return cmzn_graphicslineattributes_set_orientation_scale_field(
id, orientationScaleField.
getId());
1252 return cmzn_graphicslineattributes_get_scale_factors(
id, valuesCount, valuesOut);
1276 return cmzn_graphicslineattributes_set_scale_factors(
id, valuesCount, valuesIn);
1287 return static_cast<ShapeType>(cmzn_graphicslineattributes_get_shape_type(
id));
1302 return cmzn_graphicslineattributes_set_shape_type(
id, static_cast<cmzn_graphicslineattributes_shape_type>(shapeType));
1322 cmzn_graphicspointattributes_id id;
1330 id(point_attributes_id)
1334 id(cmzn_graphicspointattributes_access(pointAttributes.id))
1339 cmzn_graphicspointattributes_id temp_id = cmzn_graphicspointattributes_access(graphicspointattributes.id);
1341 cmzn_graphicspointattributes_destroy(&
id);
1348 cmzn_graphicspointattributes_destroy(&
id);
1374 return cmzn_graphicspointattributes_get_base_size(
id, valuesCount, valuesOut);
1397 return cmzn_graphicspointattributes_set_base_size(
id, valuesCount, valuesIn);
1407 return Font(cmzn_graphicspointattributes_get_font(
id));
1418 return cmzn_graphicspointattributes_set_font(
id, font.
getId());
1428 return Glyph(cmzn_graphicspointattributes_get_glyph(
id));
1439 return cmzn_graphicspointattributes_set_glyph(
id, glyph.
getId());
1454 return cmzn_graphicspointattributes_get_glyph_offset(
id, valuesCount, valuesOut);
1471 return cmzn_graphicspointattributes_set_glyph_offset(
id, valuesCount, valuesIn);
1482 return static_cast<Glyph::RepeatMode>(cmzn_graphicspointattributes_get_glyph_repeat_mode(
id));
1495 return cmzn_graphicspointattributes_set_glyph_repeat_mode(
id,
1496 static_cast<enum cmzn_glyph_repeat_mode>(glyphRepeatMode));
1508 return static_cast<Glyph::ShapeType>(cmzn_graphicspointattributes_get_glyph_shape_type(
id));
1522 return cmzn_graphicspointattributes_set_glyph_shape_type(
id,
1523 static_cast<cmzn_glyph_shape_type>(shapeType));
1533 return Field(cmzn_graphicspointattributes_get_label_field(
id));
1546 return cmzn_graphicspointattributes_set_label_field(
id, labelField.
getId());
1560 return cmzn_graphicspointattributes_get_label_offset(
id, valuesCount, valuesOut);
1575 return cmzn_graphicspointattributes_set_label_offset(
id, valuesCount, valuesIn);
1588 return cmzn_graphicspointattributes_get_label_text(
id, labelNumber);
1604 return cmzn_graphicspointattributes_set_label_text(
id, labelNumber, labelText);
1616 return Field(cmzn_graphicspointattributes_get_orientation_scale_field(
id));
1648 return cmzn_graphicspointattributes_set_orientation_scale_field(
id, orientationScaleField.
getId());
1665 return cmzn_graphicspointattributes_get_scale_factors(
id, valuesCount, valuesOut);
1689 return cmzn_graphicspointattributes_set_scale_factors(
id, valuesCount, valuesIn);
1700 return Field(cmzn_graphicspointattributes_get_signed_scale_field(
id));
1722 return cmzn_graphicspointattributes_set_signed_scale_field(
id, signedScaleField.
getId());
1742 cmzn_graphicssamplingattributes_id id;
1750 id(sampling_attributes_id)
1754 id(cmzn_graphicssamplingattributes_access(samplingAttributes.id))
1759 cmzn_graphicssamplingattributes_id temp_id = cmzn_graphicssamplingattributes_access(graphicssamplingattributes.id);
1761 cmzn_graphicssamplingattributes_destroy(&
id);
1768 cmzn_graphicssamplingattributes_destroy(&
id);
1789 return Field(cmzn_graphicssamplingattributes_get_density_field(
id));
1803 return cmzn_graphicssamplingattributes_set_density_field(
id, densityField.
getId());
1816 return cmzn_graphicssamplingattributes_get_location(
id, valuesCount, valuesOut);
1831 return cmzn_graphicssamplingattributes_set_location(
id, valuesCount, valuesIn);
1853 return cmzn_graphicssamplingattributes_set_element_point_sampling_mode(
id,
1854 static_cast<cmzn_element_point_sampling_mode>(samplingMode));
1861 return Glyph(cmzn_glyphmodule_create_static_glyph_from_graphics(
id, graphics.
getId()));
int setSignedScaleField(const Field &signedScaleField)
Definition: graphics.hpp:1720
int setListIsovalues(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:778
enum Scenecoordinatesystem getScenecoordinatesystem()
Definition: graphics.hpp:539
int setTextureCoordinateField(const Field &textureCoordinateField)
Definition: graphics.hpp:359
enum RenderPolygonMode getRenderPolygonMode()
Definition: graphics.hpp:262
Glyph::ShapeType getGlyphShapeType()
Definition: graphics.hpp:1506
Graphicspointattributes getGraphicspointattributes()
Definition: graphics.hpp:1727
int setShapeType(ShapeType shapeType)
Definition: graphics.hpp:1300
Attributes object specifying how lines are visualised.
Definition: graphics.hpp:1113
Lines visualise 1-D elements in the model.
Definition: graphics.hpp:848
int setElementPointSamplingMode(Element::PointSamplingMode samplingMode)
Definition: graphics.hpp:1851
int getScaleFactors(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1663
int setRenderPolygonMode(RenderPolygonMode renderPolygonMode)
Definition: graphics.hpp:275
Definition: graphics.hpp:124
char * getLabelText(int labelNumber)
Definition: graphics.hpp:1586
cmzn_tessellation_id getId() const
Definition: tessellation.hpp:112
int setScaleFactors(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1687
Field getOrientationScaleField()
Definition: graphics.hpp:1218
Surfaces visualise 2-D elements in the model.
Definition: graphics.hpp:1067
Definition: graphics.hpp:112
int setVisibilityFlag(bool visibilityFlag)
Definition: graphics.hpp:529
int setTrackDirection(TrackDirection trackDirection)
Definition: graphics.hpp:1030
int setMaterial(const Material &material)
Definition: graphics.hpp:380
Base field type: an abstraction of a mathematical field.
Definition: field.hpp:51
int setName(const char *name)
Definition: graphics.hpp:602
int setGlyphOffset(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1469
bool isValid() const
Definition: graphics.hpp:1356
Field getCoordinateField()
Definition: graphics.hpp:163
int getLocation(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1814
int setTessellation(const Tessellation &tessellation)
Definition: graphics.hpp:482
SelectMode
Definition: graphics.hpp:110
Scenecoordinatesystem
Definition: scenecoordinatesystem.hpp:26
int setLocation(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1829
bool isValid() const
Definition: graphics.hpp:1776
int getListIsovalues(int valuesCount, double *valuesOut)
Definition: graphics.hpp:765
int setOrientationScaleField(const Field &orientationScaleField)
Definition: graphics.hpp:1646
int setSpectrum(const Spectrum &spectrum)
Definition: graphics.hpp:449
Material getSelectedMaterial()
Definition: graphics.hpp:417
Definition: graphics.hpp:97
Glyph createStaticGlyphFromGraphics(const Graphics &graphics)
Definition: graphics.hpp:1859
Material getMaterial()
Definition: graphics.hpp:369
Container/manager for graphics visualising a region.
Definition: scene.hpp:38
Definition: graphics.hpp:114
cmzn_material_id getId() const
Definition: material.hpp:83
RepeatMode
Definition: glyph.hpp:127
bool isValid() const
Definition: graphics.hpp:1150
int setRangeIsovalues(int numberOfValues, double firstIsovalue, double lastIsovalue)
Definition: graphics.hpp:831
Points graphics visualise discrete locations in the model.
Definition: graphics.hpp:875
double getRangeFirstIsovalue()
Definition: graphics.hpp:791
Field getDataField()
Definition: graphics.hpp:186
Definition: graphics.hpp:118
int setTrackLength(double length)
Definition: graphics.hpp:1054
Glyph::RepeatMode getGlyphRepeatMode()
Definition: graphics.hpp:1480
GraphicsContours castContours()
Definition: graphics.hpp:1081
Definition: graphics.hpp:137
int setScenecoordinatesystem(Scenecoordinatesystem coordinateSystem)
Definition: graphics.hpp:551
int getScaleFactors(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1250
char * getName()
Definition: graphics.hpp:588
Field getStreamVectorField()
Definition: graphics.hpp:991
Field getLabelField()
Definition: graphics.hpp:1531
Base graphics type: produces 3-D graphics visualising domains and fields.
Definition: graphics.hpp:45
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:741
Font getFont()
Definition: graphics.hpp:1405
Spectrum getSpectrum()
Definition: graphics.hpp:438
int setColourDataType(ColourDataType dataType)
Definition: graphics.hpp:979
A glyph is a static graphics object used to visualise a point in space.
Definition: glyph.hpp:37
Definition: graphics.hpp:141
int setBaseSize(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1395
int setSelectedMaterial(const Material &material)
Definition: graphics.hpp:428
cmzn_field_id getId() const
Definition: field.hpp:103
double getRangeLastIsovalue()
Definition: graphics.hpp:803
ShapeType getShapeType()
Definition: graphics.hpp:1285
Zinc materials specify colouring of graphics.
Definition: material.hpp:29
TrackDirection getTrackDirection()
Definition: graphics.hpp:1016
Element::FaceType getElementFaceType()
Definition: graphics.hpp:628
int getBaseSize(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1372
int setTessellationField(const Field &tessellationField)
Definition: graphics.hpp:507
int setBaseSize(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1206
int getRangeNumberOfIsovalues()
Definition: graphics.hpp:815
int setDataField(const Field &dataField)
Definition: graphics.hpp:197
RenderPolygonMode
Definition: graphics.hpp:95
DomainType
Definition: field.hpp:210
int setLabelField(const Field &labelField)
Definition: graphics.hpp:1544
int setSelectMode(SelectMode selectMode)
Definition: graphics.hpp:309
Field getSubgroupField()
Definition: graphics.hpp:319
GraphicsPoints castPoints()
Definition: graphics.hpp:1091
Element::PointSamplingMode getElementPointSamplingMode()
Definition: graphics.hpp:1839
int setGlyphShapeType(Glyph::ShapeType shapeType)
Definition: graphics.hpp:1520
bool isExterior()
Definition: graphics.hpp:638
ShapeType
Definition: graphics.hpp:1158
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:656
Definition: graphics.hpp:99
int setRenderLineWidth(double width)
Definition: graphics.hpp:224
ColourDataType getColourDataType()
Definition: graphics.hpp:965
ShapeType
Definition: glyph.hpp:160
bool getVisibilityFlag()
Definition: graphics.hpp:517
Definition: graphics.hpp:143
int setOrientationScaleField(const Field &orientationScaleField)
Definition: graphics.hpp:1233
Field getTessellationField()
Definition: graphics.hpp:492
Field::DomainType getFieldDomainType()
Definition: graphics.hpp:563
Definition: graphics.hpp:101
Graphicslineattributes getGraphicslineattributes()
Definition: graphics.hpp:1307
Attributes object specifying how points are visualised.
Definition: graphics.hpp:1319
The tessellation controls the number of polygons or line segments.
Definition: tessellation.hpp:30
int setFieldDomainType(Field::DomainType domainType)
Definition: graphics.hpp:577
int getBaseSize(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1183
int setFont(const Font &font)
Definition: graphics.hpp:1416
Definition: graphics.hpp:122
int setLabelText(int labelNumber, const char *labelText)
Definition: graphics.hpp:1602
ColourDataType
Definition: graphics.hpp:930
cmzn_font_id getId() const
Definition: font.hpp:103
Graphicssamplingattributes getGraphicssamplingattributes()
Definition: graphics.hpp:1864
Glyph getGlyph()
Definition: graphics.hpp:1426
GraphicsLines castLines()
Definition: graphics.hpp:1086
int setSubgroupField(const Field &subgroupField)
Definition: graphics.hpp:333
PointSamplingMode
Definition: element.hpp:162
int setElementFaceType(Element::FaceType faceType)
Definition: graphics.hpp:617
GraphicsStreamlines castStreamlines()
Definition: graphics.hpp:1096
Streamlines visualise the path of a fluid particle tracking along a vector field. ...
Definition: graphics.hpp:904
GraphicsSurfaces castSurfaces()
Definition: graphics.hpp:1101
TrackDirection
Definition: graphics.hpp:950
int setGlyphRepeatMode(Glyph::RepeatMode glyphRepeatMode)
Definition: graphics.hpp:1493
int getLabelOffset(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1558
int setRenderPointSize(double size)
Definition: graphics.hpp:251
int setExterior(bool exterior)
Definition: graphics.hpp:649
double getRenderPointSize()
Definition: graphics.hpp:235
int getGlyphOffset(int valuesCount, double *valuesOut)
Definition: graphics.hpp:1452
Definition: graphics.hpp:135
Type
Definition: graphics.hpp:131
int setScaleFactors(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1274
Field getOrientationScaleField()
Definition: graphics.hpp:1614
enum Type getType()
Definition: graphics.hpp:459
double getTrackLength()
Definition: graphics.hpp:1041
enum SelectMode getSelectMode()
Definition: graphics.hpp:294
bool isValid() const
Definition: graphics.hpp:87
Field getDensityField()
Definition: graphics.hpp:1787
The OpenCMISS namespace.
Definition: context.hpp:20
Field getTextureCoordinateField()
Definition: graphics.hpp:345
Field getSignedScaleField()
Definition: graphics.hpp:1698
Definition: graphics.hpp:139
cmzn_glyph_id getId() const
Definition: glyph.hpp:90
Graphics attributes object specifying how points are sampled in elements.
Definition: graphics.hpp:1739
int setLabelOffset(int valuesCount, const double *valuesIn)
Definition: graphics.hpp:1573
The contours derived graphics type.
Definition: graphics.hpp:708
int setCoordinateField(const Field &coordinateField)
Definition: graphics.hpp:176
Field getIsoscalarField()
Definition: graphics.hpp:736
FaceType
Definition: element.hpp:110
int setIsoscalarField(const Field &field)
Definition: graphics.hpp:748
Font object controlling attributes of rendering text.
Definition: font.hpp:26
Scene getScene()
Definition: scene.hpp:742
Tessellation getTessellation()
Definition: graphics.hpp:470
cmzn_graphics_id getId() const
Definition: graphics.hpp:153
Definition: graphics.hpp:133
int setGlyph(const Glyph &glyph)
Definition: graphics.hpp:1437
int setDensityField(const Field &densityField)
Definition: graphics.hpp:1801
double getRenderLineWidth()
Definition: graphics.hpp:208
int setStreamVectorField(const Field &field)
Definition: graphics.hpp:1005