Commit 6415da01 authored by David Bommes's avatar David Bommes
Browse files

added invalidateTriangleBSP to updateGeometry and updateTopology

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7052 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b38dc242
......@@ -368,6 +368,7 @@
void MeshObject< MeshT , objectDataType >::updateGeometry() {
if ( meshNode_ )
meshNode_->update_geometry();
invalidateTriangleBsp();
}
/** Updates the topology information in the mesh scenegraph node */
......@@ -377,6 +378,7 @@
meshNode_->update_topology();
meshNode_->update_strips();
}
invalidateTriangleBsp();
}
/** Updates the modeling regions scenegraph nodes */
......@@ -642,6 +644,16 @@
return requestTriangleBsp();
}
template < class MeshT , DataType objectDataType >
void
MeshObject< MeshT , objectDataType >::invalidateTriangleBsp() {
if ( triangle_bsp_ != 0 )
{
delete triangle_bsp_;
triangle_bsp_ = 0;
}
}
//=============================================================================
......@@ -292,7 +292,16 @@ class DLLEXPORTONLY MeshObject : public BaseObjectData {
* @todo : dont recreate but update the old one.
* @return The new pointer to the bsp or Null if unsupported
*/
OMTriangleBSP* resetTriangleBsp();
void invalidateTriangleBsp();
/** Update the bsp for this object. Only supported for Triangle Meshes at the moment.
*
*
* @return Pointer to bsp or Null if unsupported for this type.
*/
OMTriangleBSP* resetTriangleBsp();
private :
/// If requested a bsp is created for this object
......
Supports Markdown
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