Commit 91486d03 authored by Mike Kremer's avatar Mike Kremer

setObjectDrawMode() now offers an option that allows the overriding of the...

setObjectDrawMode() now offers an option that allows the overriding of the draw mode even if it's not supported by the node.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@10580 383ad7c9-94d9-4d36-a494-682f7c89f535
parent af205191
......@@ -329,10 +329,10 @@ void BaseObjectData::getBoundingBox(ACG::Vec3d& bbmin, ACG::Vec3d& bbmax){
bbmax = (ACG::Vec3d) act.bbMax();
}
void BaseObjectData::setObjectDrawMode(const ACG::SceneGraph::DrawModes::DrawMode _mode) {
void BaseObjectData::setObjectDrawMode(const ACG::SceneGraph::DrawModes::DrawMode _mode, bool _force) {
// Set draw mode for this object
ACG::SceneGraph::SetDrawModesAction actionActive(_mode, false /*not globally*/);
ACG::SceneGraph::SetDrawModesAction actionActive(_mode, _force);
// Traverse scenegraph in order to set new draw mode
ACG::SceneGraph::traverse(primaryNode(), actionActive);
......
......@@ -229,8 +229,11 @@ class DLLEXPORT BaseObjectData : public BaseObject
/// get the bounding box of the object
void getBoundingBox(ACG::Vec3d& bbmin, ACG::Vec3d& bbmax);
/// Set the draw mode for the object
void setObjectDrawMode(const ACG::SceneGraph::DrawModes::DrawMode _mode);
/** \brief Set the draw mode for the object
* @param _mode The draw mode that should be active for this object
* @param _force If true, the mode is set ignoring if its supported by the node
*/
void setObjectDrawMode(const ACG::SceneGraph::DrawModes::DrawMode _mode, bool _force = false);
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