Developer Documentation
VolumeMeshObject< MeshT > Class Template Reference
Inheritance diagram for VolumeMeshObject< MeshT >:
BaseObjectData BaseObject

Public Member Functions

 VolumeMeshObject (const VolumeMeshObject &_object)
 copy constructor More...
 
 VolumeMeshObject (DataType _typeId)
 Constructor. More...
 
virtual ~VolumeMeshObject ()
 destructor
 
virtual void cleanup ()
 Reset current object, including all related nodes. More...
 
Name and Path handling
void setName (QString _name)
 Set the name of the Object. More...
 
Object Information
QString getObjectinfo ()
 Get all Info for the Object as a string. More...
 
Picking
bool picked (unsigned int _node_idx)
 detect if the node has been picked More...
 
void enablePicking (bool _enable)
 Enable or disable picking for this Node.
 
bool pickingEnabled ()
 Check if picking is enabled for this Node.
 
- Public Member Functions inherited from BaseObjectData
 BaseObjectData (const BaseObjectData &_object)
 copy constructor More...
 
 BaseObjectData ()
 constructor
 
virtual ~BaseObjectData ()
 destructor
 
virtual ACG::Vec3d refinePick (ACG::SceneGraph::PickTarget _pickTarget, const ACG::Vec3d _hitPoint, const ACG::Vec3d _start, const ACG::Vec3d _dir, const unsigned int _targetIdx)
 Refine picking. More...
 
virtual void show ()
 Sets the whole Scenegraph subtree of this node to visible.
 
virtual void hide ()
 Sets the whole Scenegraph subtree of this node to invisible.
 
virtual bool visible () override
 return visiblity
 
virtual void visible (bool _visible) override
 Sets visiblity of the whole Scenegraph subtree of this node.
 
SeparatorNodebaseNode ()
 
virtual bool hasNode (BaseNode *_node)
 Check if the given node is owned by this object. More...
 
QtTranslationManipulatorNodemanipulatorNode ()
 
MaterialNodematerialNode ()
 get a pointer to the materialnode
 
const MaterialNodematerialNode () const
 get a const pointer to the materialnode
 
BoundingBoxNodeboundingBoxNode ()
 get a pointer to the bounding box node
 
StencilRefNodestencilRefNode ()
 get a pointer to the stencil reference node
 
bool manipPlaced ()
 Check if the manipulator has been placed.
 
void manipPlaced (bool _placed)
 set the manipulator place status
 
void getBoundingBox (ACG::Vec3d &bbmin, ACG::Vec3d &bbmax)
 get the bounding box of the object
 
void setObjectDrawMode (const ACG::SceneGraph::DrawModes::DrawMode &_mode, const bool &_force=false)
 Set the draw mode for the object. More...
 
template<typename NodeT >
bool addAdditionalNode (NodeT *_node, QString _pluginName, QString _nodeName, int _id=0)
 add an additional node to the object More...
 
bool hasAdditionalNode (QString _pluginName, QString _nodeName, int _id=0)
 check if an object has the additional node More...
 
template<typename NodeT >
bool getAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
 get an addition node from the object More...
 
template<typename NodeT >
bool removeAdditionalNode (NodeT *&_node, QString _pluginName, QString _nodeName, int _id=0)
 remove an additional node from the object More...
 
- Public Member Functions inherited from BaseObject
 BaseObject (const BaseObject &_object)
 
 BaseObject (BaseObject *_parent=0)
 
virtual void printObjectInfo ()
 Print all information about the object.
 
void dumpTree ()
 Debugging function, writing the subtree to output.
 
int row () const
 get the row of this item from the parent
 
BaseObjectparent ()
 Get the parent item ( 0 if rootitem )
 
const BaseObjectparent () const
 get the row of this item from the parent
 
void setParent (BaseObject *_parent)
 Set the parent pointer.
 
BaseObjectchildExists (int _objectId)
 Check if the element exists in the subtree of this element.
 
BaseObjectchildExists (QString _name)
 Check if the element exists in the subtree of this element.
 
void appendChild (BaseObject *child)
 add a child to this node
 
BaseObjectchild (int row)
 return a child
 
int childCount () const
 get the number of children
 
void removeChild (BaseObject *_item)
 Remove a child from this object.
 
QList< BaseObject *> getLeafs ()
 get all leafes of the tree below this object ( These will be all visible objects )
 
void deleteSubtree ()
 delete the whole subtree below this item ( The item itself is not touched )
 
int group () const
 
bool isGroup () const
 Check if object is a group.
 
bool isInGroup (int _id) const
 
bool isInGroup (QString _name) const
 
std::vector< int > getGroupIds ()
 
QStringList getGroupNames ()
 
void setObjectData (QString _dataName, PerObjectData *_data)
 
void clearObjectData (QString _dataName)
 Clear the object data pointer ( this will not delete the object!! )
 
bool hasObjectData (QString _dataName)
 Checks if object data with given name is available.
 
PerObjectDataobjectData (QString _dataName)
 Returns the object data pointer.
 
void deleteData ()
 Delete all data attached to this object ( calls delete on each object )
 
int id () const
 
int persistentId () const
 
void persistentId (int _id)
 
bool dataType (DataType _type) const
 
DataType dataType () const
 
void setDataType (DataType _type)
 
bool target ()
 
void target (bool _target)
 
bool source ()
 
void source (bool _source)
 
bool flag (QString _flag)
 
void setFlag (QString _flag, bool _set)
 
QStringList flags ()
 
BaseObjectlast ()
 
BaseObjectnext ()
 
int level ()
 
void setFromFileName (const QString &_filename)
 
QString path () const
 return the path to the object ( defaults to "." if unset )
 
void setPath (const QString &_path)
 set the path to the object.
 
QString name () const
 return the name of the object. The name defaults to NONAME if unset.
 
QString filename () const
 return the filename of the object
 
void setFileName (const QString &_filename)
 set the filename for this object
 
QMap< QString, PerObjectData * > & getPerObjectDataMap ()
 get reference to map of all perObject Datas More...
 
QString & getCommentByKey (const QString &key)
 Get comment for the specified key. More...
 
const QString getCommentByKey (const QString &key) const
 Get comment for the specified key. More...
 
bool hasCommentForKey (const QString &key) const
 
bool hasComments () const
 
void clearComment (const QString &key)
 Get comment for the specified key. More...
 
void clearAllComments ()
 Get comment for the specified key. More...
 
const QMap< QString, QString > & getAllComments () const
 
const QString getAllCommentsFlat () const
 

Protected Member Functions

virtual void init ()
 Initialise current object, including all related nodes. More...
 
Update handling

This is mostly private. Updates have to be triggered via emit updatedObject()

virtual void update (UpdateType _type=UPDATE_ALL)
 Update the whole Object (Selection,Topology,...) More...
 
void updateSelection ()
 Call this function to update the selection. More...
 
void updateGeometry ()
 Update Geometry of all data structures. More...
 
void updateColor ()
 Update Colors of all data structures. More...
 
void updateTexture ()
 Update Texture of all data structures. More...
 
void updateTopology ()
 Update Topology of all data structures. More...
 
Update handling
Update handling

Friends

class TypePolyhedralMeshPlugin
 
class TypeHexahedralMeshPlugin
 
class TypeTetrahedralMeshPlugin
 

Content

typedef OpenVolumeMesh::ColorAttrib< ACG::Vec4fColorAttrib
 return a pointer to the mesh More...
 
typedef OpenVolumeMesh::NormalAttrib< MeshT > NormalAttrib
 return a pointer to the mesh More...
 
typedef OpenVolumeMesh::StatusAttrib StatusAttrib
 return a pointer to the mesh More...
 
typedef OpenVolumeMesh::TexCoordAttrib< ACG::Vec2fTexCoordAttrib
 return a pointer to the mesh More...
 
ptr::shared_ptr< MeshT > mesh_
 return a pointer to the mesh More...
 
StatusAttrib statusAttrib_
 return a pointer to the mesh More...
 
ColorAttrib colorAttrib_
 return a pointer to the mesh More...
 
NormalAttrib normalAttrib_
 return a pointer to the mesh More...
 
TexCoordAttrib texcoordAttrib_
 return a pointer to the mesh More...
 
MeshT * mesh ()
 return a pointer to the mesh More...
 
const MeshT * mesh () const
 return a pointer to the mesh More...
 
BaseObjectcopy ()
 
const StatusAttribstatus () const
 return a pointer to the mesh More...
 
StatusAttribstatus ()
 return a pointer to the mesh More...
 
const ColorAttribcolors () const
 return a pointer to the mesh More...
 
ColorAttribcolors ()
 return a pointer to the mesh More...
 
const NormalAttribnormals () const
 return a pointer to the mesh More...
 
NormalAttribnormals ()
 return a pointer to the mesh More...
 
const TexCoordAttribtexcoords () const
 return a pointer to the mesh More...
 
TexCoordAttribtexcoords ()
 return a pointer to the mesh More...
 

Visualization

ACG::SceneGraph::VolumeMeshNodeT< MeshT > * meshNode_
 Scenegraph Mesh Node.
 
ACG::SceneGraph::ShaderNodeshaderNode_
 Scenegraph Shader Node.
 
ACG::SceneGraph::TextureNodetextureNode_
 Scenegraph Texture Node.
 
ACG::SceneGraph::TextureNodetextureNode ()
 Return pointer to the texture node.
 
ACG::SceneGraph::ShaderNodeshaderNode ()
 Return pointer to the shader node.
 
ACG::SceneGraph::VolumeMeshNodeT< MeshT > * meshNode ()
 Get the Scenegraph Mesh Node. More...
 
void boundingBox (ACG::Vec3d &_bbMin, typename ACG::Vec3d &_bbMax)
 Get the BoundingBox of this object. More...
 
BaseNodeprimaryNode ()
 Scenegraph Mesh Node.
 

Additional Inherited Members

- Signals inherited from BaseObject
void objectSelectionChanged (int _objectId)
 
void visibilityChanged (int _objectId)
 
void objectPropertiesChanged (int _objectId)
 
- Static Public Attributes inherited from BaseObject
static int NOOBJECT = -1
 
- Protected Attributes inherited from BaseObject
bool visible_
 

Detailed Description

template<class MeshT>
class VolumeMeshObject< MeshT >

Definition at line 63 of file VolumeMeshObject.hh.

Member Typedef Documentation

◆ ColorAttrib

template<class MeshT>
typedef OpenVolumeMesh::ColorAttrib<ACG::Vec4f> VolumeMeshObject< MeshT >::ColorAttrib

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 123 of file VolumeMeshObject.hh.

◆ NormalAttrib

template<class MeshT>
typedef OpenVolumeMesh::NormalAttrib<MeshT> VolumeMeshObject< MeshT >::NormalAttrib

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 124 of file VolumeMeshObject.hh.

◆ StatusAttrib

template<class MeshT>
typedef OpenVolumeMesh::StatusAttrib VolumeMeshObject< MeshT >::StatusAttrib

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 125 of file VolumeMeshObject.hh.

◆ TexCoordAttrib

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 126 of file VolumeMeshObject.hh.

Constructor & Destructor Documentation

◆ VolumeMeshObject() [1/2]

template<class MeshT >
VolumeMeshObject< MeshT >::VolumeMeshObject ( const VolumeMeshObject< MeshT > &  _object)

copy constructor

Create a copy of this object

Definition at line 69 of file VolumeMeshObjectT_impl.hh.

◆ VolumeMeshObject() [2/2]

template<class MeshT >
VolumeMeshObject< MeshT >::VolumeMeshObject ( DataType  _typeId)
explicit

Constructor.

This is the standard constructor for MeshObjects. As triangle and Poly Meshes are handled by this class, the typeId is passed to the MeshObject to specify it.

Parameters
_typeIdThis is the type Id the Object will use. Should be typeId("TriangleMesh") or typeId("PolyMesh")

Definition at line 86 of file VolumeMeshObjectT_impl.hh.

Member Function Documentation

◆ boundingBox()

template<class MeshT >
void VolumeMeshObject< MeshT >::boundingBox ( ACG::Vec3d _bbMin,
typename ACG::Vec3d _bbMax 
)

Get the BoundingBox of this object.

Get the Bounding box size of this object

Definition at line 332 of file VolumeMeshObjectT_impl.hh.

◆ cleanup()

template<class MeshT >
void VolumeMeshObject< MeshT >::cleanup ( void  )
virtual

Reset current object, including all related nodes.

Cleanup function for mesh objects. Deletes the contents of the whole object and calls VolumeMeshObject::init afterwards.

Reimplemented from BaseObjectData.

Definition at line 121 of file VolumeMeshObjectT_impl.hh.

◆ colors() [1/2]

template<class MeshT>
const ColorAttrib& VolumeMeshObject< MeshT >::colors ( ) const
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 131 of file VolumeMeshObject.hh.

◆ colors() [2/2]

template<class MeshT>
ColorAttrib& VolumeMeshObject< MeshT >::colors ( )
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 132 of file VolumeMeshObject.hh.

◆ copy()

template<class MeshT >
BaseObject * VolumeMeshObject< MeshT >::copy ( )
virtual

return a full copy of this object ( All scenegraph nodes will be created ) but the object will not be a part of the object tree.

Reimplemented from BaseObject.

Definition at line 301 of file VolumeMeshObjectT_impl.hh.

◆ getObjectinfo()

template<class MeshT >
QString VolumeMeshObject< MeshT >::getObjectinfo ( )
virtual

Get all Info for the Object as a string.

Returns a string containing all information about the current object. This also includes the information provided by BaseObjectData::getObjectinfo

Returns
String containing the object information

Reimplemented from BaseObject.

Definition at line 352 of file VolumeMeshObjectT_impl.hh.

◆ init()

template<class MeshT >
void VolumeMeshObject< MeshT >::init ( void  )
protectedvirtual

Initialise current object, including all related nodes.

This function initalizes the mesh object. It creates the scenegraph nodes, the mesh and requests all required properties for the mesh.

Definition at line 136 of file VolumeMeshObjectT_impl.hh.

◆ mesh() [1/2]

template<class MeshT >
MeshT * VolumeMeshObject< MeshT >::mesh ( )

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 212 of file VolumeMeshObjectT_impl.hh.

◆ mesh() [2/2]

template<class MeshT >
const MeshT * VolumeMeshObject< MeshT >::mesh ( ) const

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 217 of file VolumeMeshObjectT_impl.hh.

◆ meshNode()

template<class MeshT >
ACG::SceneGraph::VolumeMeshNodeT< MeshT > * VolumeMeshObject< MeshT >::meshNode ( )

Get the Scenegraph Mesh Node.

Returns a pointer to the mesh node

Returns
Pointer to the mesh node

Definition at line 325 of file VolumeMeshObjectT_impl.hh.

◆ normals() [1/2]

template<class MeshT>
const NormalAttrib& VolumeMeshObject< MeshT >::normals ( ) const
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 134 of file VolumeMeshObject.hh.

◆ normals() [2/2]

template<class MeshT>
NormalAttrib& VolumeMeshObject< MeshT >::normals ( )
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 135 of file VolumeMeshObject.hh.

◆ picked()

template<class MeshT >
bool VolumeMeshObject< MeshT >::picked ( unsigned int  _node_idx)
virtual

detect if the node has been picked

Given a node index from PluginFunctions::scenegraphPick this function can be used to check if the meshNode of the object has been picked.

Parameters
_node_idxIndex of the picked mesh node
Returns
bool if the meshNode of this object is the picking target.

Reimplemented from BaseObjectData.

Definition at line 386 of file VolumeMeshObjectT_impl.hh.

◆ setName()

template<class MeshT >
void VolumeMeshObject< MeshT >::setName ( QString  _name)
virtual

Set the name of the Object.

Set the name of an object. All Scenegraph nodes are renamed too. It also calls BaseObjectData::setName.

Reimplemented from BaseObjectData.

Definition at line 187 of file VolumeMeshObjectT_impl.hh.

◆ status() [1/2]

template<class MeshT>
const StatusAttrib& VolumeMeshObject< MeshT >::status ( ) const
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 128 of file VolumeMeshObject.hh.

◆ status() [2/2]

template<class MeshT>
StatusAttrib& VolumeMeshObject< MeshT >::status ( )
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 129 of file VolumeMeshObject.hh.

◆ texcoords() [1/2]

template<class MeshT>
const TexCoordAttrib& VolumeMeshObject< MeshT >::texcoords ( ) const
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 137 of file VolumeMeshObject.hh.

◆ texcoords() [2/2]

template<class MeshT>
TexCoordAttrib& VolumeMeshObject< MeshT >::texcoords ( )
inline

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 138 of file VolumeMeshObject.hh.

◆ update()

template<class MeshT >
void VolumeMeshObject< MeshT >::update ( UpdateType  _type = UPDATE_ALL)
protectedvirtual

Update the whole Object (Selection,Topology,...)

Updates the visualization of the object. Calls VolumeMeshObject::updateGeometry, VolumeMeshObject::updateTopology, VolumeMeshObject::updateSelection and VolumeMeshObject::updateModelingRegions.

Reimplemented from BaseObjectData.

Definition at line 226 of file VolumeMeshObjectT_impl.hh.

◆ updateColor()

template<class MeshT >
void VolumeMeshObject< MeshT >::updateColor ( )
protected

Update Colors of all data structures.

Updates the color information in the mesh scenegraph node

Definition at line 277 of file VolumeMeshObjectT_impl.hh.

◆ updateGeometry()

template<class MeshT >
void VolumeMeshObject< MeshT >::updateGeometry ( )
protected

Update Geometry of all data structures.

Updates the geometry information in the mesh scenegraph node

Definition at line 266 of file VolumeMeshObjectT_impl.hh.

◆ updateSelection()

template<class MeshT >
void VolumeMeshObject< MeshT >::updateSelection ( )
protected

Call this function to update the selection.

Updates the geometry information in the mesh scenegraph node

Definition at line 257 of file VolumeMeshObjectT_impl.hh.

◆ updateTexture()

template<class MeshT >
void VolumeMeshObject< MeshT >::updateTexture ( )
protected

Update Texture of all data structures.

Updates the texture information in the mesh scenegraph node

Definition at line 285 of file VolumeMeshObjectT_impl.hh.

◆ updateTopology()

template<class MeshT >
void VolumeMeshObject< MeshT >::updateTopology ( )
protected

Update Topology of all data structures.

Updates the topology information in the mesh scenegraph node

Definition at line 294 of file VolumeMeshObjectT_impl.hh.

Member Data Documentation

◆ colorAttrib_

template<class MeshT>
ColorAttrib VolumeMeshObject< MeshT >::colorAttrib_
private

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 145 of file VolumeMeshObject.hh.

◆ mesh_

template<class MeshT>
ptr::shared_ptr<MeshT> VolumeMeshObject< MeshT >::mesh_
private

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 141 of file VolumeMeshObject.hh.

◆ normalAttrib_

template<class MeshT>
NormalAttrib VolumeMeshObject< MeshT >::normalAttrib_
private

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 147 of file VolumeMeshObject.hh.

◆ statusAttrib_

template<class MeshT>
StatusAttrib VolumeMeshObject< MeshT >::statusAttrib_
private

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 143 of file VolumeMeshObject.hh.

◆ texcoordAttrib_

template<class MeshT>
TexCoordAttrib VolumeMeshObject< MeshT >::texcoordAttrib_
private

return a pointer to the mesh

Get a pointer to the objects mesh.

Returns
Pointer to the mesh

Definition at line 149 of file VolumeMeshObject.hh.


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