Commit 535f4717 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'const_mesh_getter' into 'master'

add const mesh() getter for MeshObject

See merge request !3
parents a3fa0e6a 6fd2a19e
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
// Content // Content
// =============================================================================== // ===============================================================================
/** Get a pointer to the objects mesh. /** Get a pointer to the object's mesh.
* @return Pointer to the mesh * @return Pointer to the mesh
*/ */
template < class MeshT > template < class MeshT >
...@@ -351,6 +351,14 @@ ...@@ -351,6 +351,14 @@
return mesh_; return mesh_;
} }
/** Get a const pointer to the object's mesh.
* @return Const pointer to the mesh
*/
template < class MeshT >
const MeshT* MeshObject< MeshT >::mesh() const {
return mesh_;
}
/** Updates the visualization of the object. Calls MeshObject::updateGeometry, /** Updates the visualization of the object. Calls MeshObject::updateGeometry,
* MeshObject::updateTopology, MeshObject::updateSelection and * MeshObject::updateTopology, MeshObject::updateSelection and
* MeshObject::updateModelingRegions. * MeshObject::updateModelingRegions.
......
...@@ -147,6 +147,9 @@ class DLLEXPORTONLY MeshObject : public BaseObjectData { ...@@ -147,6 +147,9 @@ class DLLEXPORTONLY MeshObject : public BaseObjectData {
/// return a pointer to the mesh /// return a pointer to the mesh
MeshT* mesh(); MeshT* mesh();
/// return a const pointer to the mesh
const MeshT* mesh() const;
private: private:
/// pointer to the mesh /// pointer to the mesh
MeshT* mesh_; MeshT* mesh_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment