77 rootNode_(_object.rootNode_),
112 std::cerr <<
"cleanup : separatorNode_ is already 0" << std::endl;
132 std::cerr <<
"Separator Node already exists. this should not happen!" << std::endl;
142 std::cerr <<
"Manipulator Node already exists. this should not happen!" << std::endl;
158 if ( OpenFlipper::Options::randomDefaultColor() ){
164 color.setRgb(rand()%255, rand()%255, rand()%255);
166 diff = (bckgrnd.red() - color.red()) *(bckgrnd.red() - color.red())
167 +(bckgrnd.green() - color.green())*(bckgrnd.green() - color.green())
168 +(bckgrnd.blue() - color.blue()) *(bckgrnd.blue() - color.blue());
169 }
while (diff < 70000);
172 color = OpenFlipper::Options::defaultColor();
176 colorV[0] = color.redF();
177 colorV[1] = color.greenF();
178 colorV[2] = color.blueF();
179 colorV[3] = color.alphaF();
237 QList< BaseNode* > list;
241 while (!list.empty()) {
242 currentNode = list.front();
344 QString searchname = _pluginName+
"#"+_nodeName+
"#"+index;
360 std::string nodename = std::string(
"SeparatorNode for object " + _name.toUtf8());
363 nodename = std::string(
"ManipulatorNode for object " + _name.toUtf8());
366 nodename = std::string(
"BoundingBoxNode for object " + _name.toUtf8());
369 nodename = std::string(_name.toUtf8() +
"'s Material" );
372 nodename = std::string(
"StencilRefNode for object " + _name.toUtf8());
StencilRefNode * stencilRefNode()
get a pointer to the stencil reference node
ACG::SceneGraph::SeparatorNode SeparatorNode
Seperator Node.
bool manipPlaced_
rootNode of global Scenegraph structure
ChildIter childrenEnd()
Returns: end-iterator of children.
std::vector< BaseNode * >::iterator ChildIter
allows to iterate over children
virtual void hide()
Sets the whole Scenegraph subtree of this node to invisible.
BoundingBoxNode * boundingBoxNode_
Bounding box node for the object.
bool hasAdditionalNode(QString _pluginName, QString _nodeName, int _id=0)
check if an object has the additional node
void setObjectDrawMode(const ACG::SceneGraph::DrawModes::DrawMode &_mode, const bool &_force=false)
Set the draw mode for the object.
void initializeScenegraphNodes()
Hide this node and its children.
void delete_subtree()
Delete the whole subtree of this node.
void getBoundingBox(ACG::Vec3d &bbmin, ACG::Vec3d &bbmax)
get the bounding box of the object
BoundingBoxNode * boundingBoxNode()
get a pointer to the bounding box node
ACG::SceneGraph::MaterialNode MaterialNode
Materialnode.
MaterialNode * materialNode_
Scenegraph Material Node for the object.
DLLEXPORT OpenFlipperQSettings & OpenFlipperSettings()
QSettings object containing all program settings of OpenFlipper.
virtual void show()
Sets the whole Scenegraph subtree of this node to visible.
ChildIter find(BaseNode *_node)
virtual bool visible()
return visiblity
void setIdentifier(int _id)
Set an identifier for that manipulator.
ACG::SceneGraph::StencilRefNode StencilRefNode
Stencil reference Node.
const Vec3d & bbMin() const
Returns minimum point of the bounding box.
QtTranslationManipulatorNode * manipulatorNode()
SeparatorNode * rootNode_
rootNode of global Scenegraph structure
virtual BaseNode * primaryNode()
virtual bool picked(uint _node_idx)
detect if the node has been picked
MaterialNode * materialNode()
get a pointer to the materialnode
PickTarget
What target to use for picking.
virtual bool pickingEnabled()
SeparatorNode * baseNode()
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
virtual bool hasNode(BaseNode *_node)
Check if the given node is owned by this object.
QtTranslationManipulatorNode * manipulatorNode_
Manipulator used for this Object.
virtual void update(UpdateType _type=UPDATE_ALL)
This function is called to update the object.
Hide this node, but draw children.
ChildIter childrenBegin()
Returns: begin-iterator of children.
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
BaseObjectData()
constructor
void traverse(BaseNode *_node, Action &_action)
BaseObject * child(int row)
return a child
void set_overlay_color(const Vec4f &_s)
set the overlay color
void visibilityChanged(int _objectId)
SeparatorNode * separatorNode_
Separator at top of Scenegraph structure used for this Object.
std::string name() const
Returns: name of node (needs not be unique)
Namespace providing different geometric functions concerning angles.
ACG::SceneGraph::BoundingBoxNode BoundingBoxNode
Bounding box Node.
virtual void enablePicking(bool _enable)
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.
void push_back(BaseNode *_node)
Insert _node at the end of the list of children.
const Vec3d & bbMax() const
Returns maximum point of the bounding box.
bool manipPlaced()
Check if the manipulator has been placed.
void set_color(const Vec4f &_c)
set color (base, ambient, diffuse, specular) based on _c
ACG::SceneGraph::QtTranslationManipulatorNode QtTranslationManipulatorNode
ManipulatorNode.
std::vector< std::pair< BaseNode *, QString > > additionalNodes_
virtual ~BaseObjectData()
destructor
void set_base_color(const Vec4f &_c)
set the base color
VectorT< double, 3 > Vec3d
const Vec4f & specular_color() const
get the specular color
void set_status(StatusMode _s)
Set the status of this node.
virtual ACG::SceneGraph::ShaderNode * shaderNode()
StencilRefNode * stencilRefNode_
Stencil reference node for the object.
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )