Commit ab160bb7 authored by Dirk Wilden's avatar Dirk Wilden

getBoundingBox for BaseObjectData

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@2808 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ad88be33
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "Types.hh" #include "Types.hh"
#include <OpenFlipper/common/GlobalOptions.hh> #include <OpenFlipper/common/GlobalOptions.hh>
#include <ACG/Scenegraph/SceneGraph.hh>
//== TYPEDEFS ================================================================= //== TYPEDEFS =================================================================
...@@ -176,6 +177,16 @@ void BaseObjectData::manipPlaced( bool _placed ) { ...@@ -176,6 +177,16 @@ void BaseObjectData::manipPlaced( bool _placed ) {
manipPlaced_ = _placed; manipPlaced_ = _placed;
} }
void BaseObjectData::getBoundingBox(ACG::Vec3d& bbmin, ACG::Vec3d& bbmax){
ACG::SceneGraph::BoundingBoxAction act;
ACG::SceneGraph::traverse(separatorNode_, act);
bbmin = (ACG::Vec3d) act.bbMin();
bbmax = (ACG::Vec3d) act.bbMax();
}
// =============================================================================== // ===============================================================================
// Picking // Picking
// =============================================================================== // ===============================================================================
......
...@@ -175,6 +175,9 @@ class DLLEXPORT BaseObjectData : public BaseObject ...@@ -175,6 +175,9 @@ class DLLEXPORT BaseObjectData : public BaseObject
/// set the manipulator place status /// set the manipulator place status
void manipPlaced( bool _placed ); void manipPlaced( bool _placed );
/// get the bounding box of the object
void getBoundingBox(ACG::Vec3d& bbmin, ACG::Vec3d& bbmax);
private : private :
......
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