62 #include <OpenFlipper/BasePlugin/PluginFunctionsCore.hh> 63 #include "LightWidget.hh" 85 if ( widgetMap_.contains(_node) ) {
86 return widgetMap_[_node];
89 widgetMap_[_node] = widget;
96 return ( _className == std::string(
"LightNode") );
100 return std::string(
"LightNode");
104 return QString(
"Edit Light");
158 std::vector< BaseNode*> children;
160 children.push_back( (*cIt) );
163 for (
unsigned int i = 0 ; i < children.size(); ++i )
164 children[i]->set_parent(parent);
218 std::string nodename = std::string(
"LightNode for Light " + _name.toUtf8() );
221 std::string nodenameVis = std::string(
"LightNode Visualization for Light " + _name.toUtf8() );
259 output +=
"========================================================================\n";
263 output +=
"Object Contains Light : ";
268 output +=
" Position ( " + QString::number(pos[0]) +
", " + QString::number(pos[1]) +
", " + QString::number(pos[2]) +
")";
271 output +=
"========================================================================\n";
virtual void update(UpdateType _type=UPDATE_ALL)
Update the Light Object.
bool pickingEnabled()
Check if picking is enabled for this Object.
std::vector< BaseNode * >::iterator ChildIter
allows to iterate over children
virtual void hide()
Sets the whole Scenegraph subtree of this node to invisible.
void setDataType(DataType _type)
LightNode * lightNode()
Get the scenegraph Node.
virtual QWidget * getWidget(ACG::SceneGraph::BaseNode *_node)
Get a widget for this Node.
LightNode * lightNode_
Light status node.
LightSource * lightSource()
QString getObjectinfo()
Get all Info for the Object as a string.
virtual void cleanup()
Reset current object, including all related nodes.
virtual QString contextMenuName()
Return a name for your widget in the context menu.
virtual void show()
Sets the whole Scenegraph subtree of this node to visible.
void setName(QString _name)
Set the name of the Object.
virtual bool visible()
Show Light Node.
BaseObject * parent()
Get the parent item ( 0 if rootitem )
virtual bool canHandle(std::string _className)
returns if the widgets can handle the given class
MaterialNode * materialNode()
get a pointer to the materialnode
void show()
Show node: set status to Active.
void setLightSource(LightSource _light)
Set the light source parameters.
virtual const std::string & className() const =0
Return class name (implemented by the ACG_CLASSNAME macro)
void enablePicking(bool _enable)
ChildIter childrenEnd()
Returns: end-iterator of children.
LightNode * lightNodeVis_
Light rendering node (only for rendering purposes)
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.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
Hide this node, but draw children.
ChildIter childrenBegin()
Returns: begin-iterator of children.
void visibilityChanged(int _objectId)
std::string name() const
Returns: name of node (needs not be unique)
void setMultipassStatus(const MultipassBitMask _passStatus)
Set multipass settings for the nodes status functions.
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
void enablePicking(bool _enable)
Enable or disable picking for this Object.
virtual void init(LightNode *_light=0, LightNode *_lightVis=0)
Initialize current object, including all related nodes.
bool picked(uint _node_idx)
detect if the node has been picked
QString name() const
return the name of the object. The name defaults to NONAME if unset.
virtual bool hasNode(BaseNode *_node)
Light status node.
void position(Vec3d _pos)
Set position for LightSource.
virtual QString getObjectinfo()
Get all Info for the Object as a string.
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
LightNode * lightNodeVis()
Get the scenegraph Node.
virtual ~LightObject()
destructor
virtual void hide()
Hide Light Node.
BaseNode * parent()
Get the nodes parent node.
virtual void show()
Show Light Node.
virtual std::string handles()
return the type this generator handles
void set_status(StatusMode _s)
Set the status of this node.
DataType dataType() const
bool visualize()
Should node be visualized?
bool enabled() const
Get light source status.
ACG::SceneGraph::LightNode LightNode
Simple Name for PlaneNode.
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator *_generator)
Add a scenegraph generator ( the handled type will be extracted from the generator) ...
Structure to hold options for one LightSource.