MeshGui::SoFCMeshNode Class Reference

#include <SoFCMeshNode.h>

List of all members.

Public Member Functions

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

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.
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.
virtual void generatePrimitives (SoAction *action)
 Sets the point indices, the geometric points and the normal for each triangle.
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
 Adds the number of the triangles to the SoGetPrimitiveCountAction.
virtual void GLRender (SoGLRenderAction *action)
 Either renders the complete mesh or only a subset of the points.
virtual SbBool readInstance (SoInput *in, unsigned short flags)
 Reads in the mesh node from the input stream.

Detailed Description

Definition at line 37 of file SoFCMeshNode.h.


Constructor & Destructor Documentation

SoFCMeshNode::SoFCMeshNode (  ) 

Definition at line 112 of file SoFCMeshNode.cpp.

References SketcherExample::f.


Member Function Documentation

void SoFCMeshNode::computeBBox ( SoAction *  action,
SbBox3f &  box,
SbVec3f &  center 
) [protected, virtual]
SoDetail * SoFCMeshNode::createTriangleDetail ( SoRayPickAction *  action,
const SoPrimitiveVertex *  v1,
const SoPrimitiveVertex *  v2,
const SoPrimitiveVertex *  v3,
SoPickedPoint *  pp 
) [protected, virtual]

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.

Definition at line 531 of file SoFCMeshNode.cpp.

References MaximumTriangles.

void SoFCMeshNode::generatePrimitives ( SoAction *  action  )  [protected, virtual]

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

Definition at line 435 of file SoFCMeshNode.cpp.

References MeshCore::MeshKernel::GetFacets(), Mesh::MeshObject::getKernel(), MeshCore::MeshKernel::GetPoints(), MaximumTriangles, sbvec3f(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

void SoFCMeshNode::getPrimitiveCount ( SoGetPrimitiveCountAction *  action  )  [protected, virtual]

Adds the number of the triangles to the SoGetPrimitiveCountAction.

Definition at line 567 of file SoFCMeshNode.cpp.

void SoFCMeshNode::GLRender ( SoGLRenderAction *  action  )  [protected, virtual]

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

Definition at line 291 of file SoFCMeshNode.cpp.

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

void SoFCMeshNode::initClass ( void   )  [static]

Definition at line 107 of file SoFCMeshNode.cpp.

SbBool SoFCMeshNode::readInstance ( SoInput *  in,
unsigned short  flags 
) [protected, virtual]

Reads in the mesh node from the input stream.

Definition at line 616 of file SoFCMeshNode.cpp.

References MeshCore::MeshKernel::Adopt(), and k.

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

Sets the mesh.

Definition at line 127 of file SoFCMeshNode.cpp.

Referenced by MeshGui::ViewProviderMeshNode::attach().

void SoFCMeshNode::write ( SoWriteAction *  action  )  [virtual]

Member Data Documentation

Definition at line 48 of file SoFCMeshNode.h.

Referenced by createTriangleDetail(), generatePrimitives(), and GLRender().


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

Generated on Wed Nov 23 19:02:27 2011 for FreeCAD by  doxygen 1.6.1