MeshGui::SoFCMeshNode Class Reference

#include <SoFCMeshNode.h>

Public Member Functions

void setMesh (const Mesh::MeshObject *mesh)
 Sets the mesh. More...
 
 SoFCMeshNode ()
 
virtual void write (SoWriteAction *action)
 Writes out the mesh node. More...
 

Static Public Member Functions

static void initClass ()
 

Public Attributes

unsigned int MaximumTriangles
 

Protected Member Functions

virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
 Sets the bounding box of the mesh to box and its center to center. More...
 
virtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)
 If the number of triangles exceeds MaximumTriangles 0 is returned. More...
 
virtual void generatePrimitives (SoAction *action)
 Sets the point indices, the geometric points and the normal for each triangle. More...
 
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
 Adds the number of the triangles to the SoGetPrimitiveCountAction. More...
 
virtual void GLRender (SoGLRenderAction *action)
 Either renders the complete mesh or only a subset of the points. More...
 
virtual SbBool readInstance (SoInput *in, unsigned short flags)
 Reads in the mesh node from the input stream. More...
 

Constructor & Destructor Documentation

◆ SoFCMeshNode()

SoFCMeshNode::SoFCMeshNode ( )

Member Function Documentation

◆ computeBBox()

void SoFCMeshNode::computeBBox ( SoAction action,
SbBox3f &  box,
SbVec3f &  center 
)
protectedvirtual

◆ createTriangleDetail()

SoDetail * SoFCMeshNode::createTriangleDetail ( SoRayPickAction *  action,
const SoPrimitiveVertex *  v1,
const SoPrimitiveVertex *  v2,
const SoPrimitiveVertex *  v3,
SoPickedPoint *  pp 
)
protectedvirtual

If the number of triangles exceeds MaximumTriangles 0 is returned.

This means that the client programmer needs to implement itself to get the index of the picked triangle. If the number of triangles doesn't exceed MaximumTriangles SoShape::createTriangleDetail() gets called. Against the default OpenInventor implementation which returns 0 as well Coin3d fills in the point and face indices.

References MaximumTriangles.

◆ generatePrimitives()

void SoFCMeshNode::generatePrimitives ( SoAction action)
protectedvirtual

Sets the point indices, the geometric points and the normal for each triangle.

If the number of triangles exceeds MaximumTriangles then only a triangulation of a rough model is filled in instead. This is due to performance issues.

See also
createTriangleDetail().

References MaximumTriangles.

◆ getPrimitiveCount()

void SoFCMeshNode::getPrimitiveCount ( SoGetPrimitiveCountAction *  action)
protectedvirtual

Adds the number of the triangles to the SoGetPrimitiveCountAction.

◆ GLRender()

void SoFCMeshNode::GLRender ( SoGLRenderAction action)
protectedvirtual

Either renders the complete mesh or only a subset of the points.

References Gui::SoFCInteractiveElement::get(), and MaximumTriangles.

◆ initClass()

void SoFCMeshNode::initClass ( void  )
static

◆ readInstance()

SbBool SoFCMeshNode::readInstance ( SoInput *  in,
unsigned short  flags 
)
protectedvirtual

Reads in the mesh node from the input stream.

References MeshCore::MeshKernel::Adopt().

◆ setMesh()

void SoFCMeshNode::setMesh ( const Mesh::MeshObject mesh)

Sets the mesh.

◆ write()

void SoFCMeshNode::write ( SoWriteAction *  action)
virtual

Writes out the mesh node.

Referenced by gzip_utf8.GzipFile::seek().

Member Data Documentation

◆ MaximumTriangles

unsigned int MeshGui::SoFCMeshNode::MaximumTriangles

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