...
There are different possibilities and sceneries for the symbols:
2D bitmap.
The most simple case is to draw a 2D bitmap
Can see an example in our cmas2d_customlib example problemtype.
<gid>/problemtypes/examples/cmas2d_customlib.gid
The condition named Point_Weight declares inside the <condition> xml node a <symbol> Tcl proc, to draw the condition as a simple raster image file.
Code Block |
---|
<condition n="Point_Weight" pn="Point Weight" ov="point" ovm="node" icon="darkorange-weight-18" groups_icon="yelowish-group" help="Concentrated mass">
<value n="Weight" pn="Weight" v="0.0" unit_magnitude="M" units="kg" help="Specify the weight that you want to apply"/>
<symbol proc="gid_groups_conds::draw_symbol_image weight-18.png" orientation="global"/>
<!-- or a more customized example implementing our own procecedure <symbol proc='Cmas2d::DrawSymbolWeigth' orientation='global'/> -->
</condition> |
The gid_groups_conds::draw_symbol_image
predefined library proc require the image file name (common image formats are allowed)
the orientation=”global” doesn’t matter in this case, because the 2D image is always drawn on the 3D space on to the screen plane perpendicular to the user view.
Procedural drawing
It is also possible to draw 3D symbols using OpenGL commands to draw triangles, lines, etc.
...