SmallChange
1.0.0
A collection of extensions to Coin3D
|
The SoFEMKit class is used to visualize finite element meshes. More...
#include <SoFEMKit.h>
Public Member Functions | |
SoFEMKit (void) | |
void | add2DElement (const int elementidx, const int32_t *nodes, const int layerindex=0) |
void | add3DElement (const int elementidx, const int32_t *nodes, const int layerindex=0) |
void | addNode (const int nodeidx, const SbVec3f &xyz) |
void | create2DIndices (int32_t *idxarray, const int32_t *nodes) |
void | create3DIndices (int32_t *idxarray, const int32_t *nodes) |
void | enableAllElements (const SbBool onoroff) |
void | enableElement (const int elementidx, const SbBool onoroff) |
void | enableElements (const SbPlane &plane, const SbBool onoroff) |
void | enableLayer (const int layerindex, const SbBool onoroff) |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
void | removeHiddenFaces (const SbBool onoff) |
void | reset (void) |
void | setElementColor (const int elementidx, const SbColor &color) |
void | setNodeColor (const int nodeidx, const SbColor &color) |
Static Public Member Functions | |
static void | initClass (void) |
Public Attributes | |
SoSFBool | ccw |
Protected Member Functions | |
virtual | ~SoFEMKit () |
The SoFEMKit class is used to visualize finite element meshes.
SoFEMKit::SoFEMKit | ( | void | ) |
Constructor.
|
protectedvirtual |
Destructor
void SoFEMKit::add2DElement | ( | const int | elementidx, |
const int32_t * | nodes, | ||
const int | layerindex = 0 ) |
Add a 2D element to the FEM. elementidx must be an unique index that can be used when setting the element color. nodes should contain the four node indices in the following order:
2______3
---— |
0 1
layerindex can be used to specify the layer this element is in.
void SoFEMKit::add3DElement | ( | const int | elementidx, |
const int32_t * | nodes, | ||
const int | layerindex = 0 ) |
Add a 3D element to the FEM. elementidx should be an unique index that is used when setting element color. nodes should be an array of eight node indices, ordered like this:
5_______6 /| /| 4/_|____/7| z
| | | | | y | |1 _ |_|2 | / | / | / |/
0 3
layerindex can be used to specify the layer this element is in.
Add a node (vertex) to the FEM. nodeidx should be used to refer to this node (e.g. when setting the node color or when creating elements). Each node must have an unique nodeidx.
Enable/disable the elementidx element.
Enable/disable elements intersecting plane.
Enable/disable elements in the layerindex layer.
Turn on/off simple (but effective!) optimization that removes all faces that are hidden by other faces. Default is to remove hidden faces.
Sets the elementidx element color.
Sets the nodeidx node color. Node color will override element colors if both the element color and a node color is set for any given node.
SoSFBool SoFEMKit::ccw |
Set to FALSE if you use a left handed coordinate system (or a coordinate system where the model matrix determinant is negative).