SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SoFEMKit Class Reference

The SoFEMKit class is used to visualize finite element meshes. More...

#include <SoFEMKit.h>

Inheritance diagram for SoFEMKit:

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 ()
 

Detailed Description

The SoFEMKit class is used to visualize finite element meshes.

Constructor & Destructor Documentation

◆ SoFEMKit()

SoFEMKit::SoFEMKit ( void )

Constructor.

◆ ~SoFEMKit()

SoFEMKit::~SoFEMKit ( )
protectedvirtual

Destructor

Member Function Documentation

◆ add2DElement()

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.

◆ add3DElement()

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 | / | / | / |/

|/ |/ ---—x

0 3

layerindex can be used to specify the layer this element is in.

◆ addNode()

void SoFEMKit::addNode ( const int nodeidx,
const SbVec3f & xyz )

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.

◆ enableAllElements()

void SoFEMKit::enableAllElements ( const SbBool onoroff)

Enable/disable all elements.

◆ enableElement()

void SoFEMKit::enableElement ( const int elementidx,
const SbBool onoff )

Enable/disable the elementidx element.

◆ enableElements()

void SoFEMKit::enableElements ( const SbPlane & plane,
const SbBool onoroff )

Enable/disable elements intersecting plane.

◆ enableLayer()

void SoFEMKit::enableLayer ( const int layerindex,
const SbBool onoroff )

Enable/disable elements in the layerindex layer.

◆ removeHiddenFaces()

void SoFEMKit::removeHiddenFaces ( const SbBool onoff)

Turn on/off simple (but effective!) optimization that removes all faces that are hidden by other faces. Default is to remove hidden faces.

◆ reset()

void SoFEMKit::reset ( void )

Reset the kit. All elements and nodes will be removed.

◆ setElementColor()

void SoFEMKit::setElementColor ( const int elementidx,
const SbColor & color )

Sets the elementidx element color.

◆ setNodeColor()

void SoFEMKit::setNodeColor ( const int nodeidx,
const SbColor & 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.

Member Data Documentation

◆ ccw

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).


The documentation for this class was generated from the following files: