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");
134 defaultLightSource_(false)
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";
bool enabled() const
Get light source status.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
virtual void show()
Sets the whole Scenegraph subtree of this node to visible.
void deleteData()
Delete all data attached to this object ( calls delete on each object )
void setName(QString _name)
Set the name of the Object.
LightNode * lightNode_
Light status node.
BaseNode * parent()
Get the nodes parent node.
virtual void cleanup()
Reset current object, including all related nodes.
virtual QString getObjectinfo()
Get all Info for the Object as a string.
void setMultipassStatus(const MultipassBitMask _passStatus)
Set multipass settings for the nodes status functions.
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.
virtual const std::string & className() const =0
Return class name (implemented by the ACG_CLASSNAME macro)
virtual QString contextMenuName()
Return a name for your widget in the context menu.
LightSource * lightSource()
bool pickingEnabled()
Check if picking is enabled for this Object.
void setLightSource(LightSource _light)
Set the light source parameters.
virtual bool canHandle(std::string _className)
returns if the widgets can handle the given class
LightNode * lightNodeVis_
Light rendering node (only for rendering purposes)
virtual bool visible()
Show Light Node.
BaseObject * parent()
Get the parent item ( 0 if rootitem )
std::vector< BaseNode * >::iterator ChildIter
allows to iterate over children
DLLEXPORT void setTypeIcon(DataType _id, QString _icon)
Set an Icon for a given DataType.
QString getObjectinfo()
Get all Info for the Object as a string.
virtual std::string handles()
return the type this generator handles
MaterialNode * materialNode()
get a pointer to the materialnode
virtual QWidget * getWidget(ACG::SceneGraph::BaseNode *_node)
Get a widget for this Node.
ChildIter childrenEnd()
Returns: end-iterator of children.
DataType dataType() const
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
virtual ~LightObject()
destructor
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator *_generator)
Add a scenegraph generator ( the handled type will be extracted from the generator) ...
virtual bool hasNode(BaseNode *_node)
Check if the given node is owned by this object.
ChildIter childrenBegin()
Returns: begin-iterator of children.
Structure to hold options for one LightSource.
void show()
Show node: set status to Active.
void enablePicking(bool _enable)
void setDataType(DataType _type)
Hide this node, but draw children.
virtual void setName(QString _name)
path to the file from which the object is loaded ( defaults to "." )
void set_status(StatusMode _s)
Set the status of this node.
void visibilityChanged(int _objectId)
virtual void hide()
Hide Light Node.
ACG::SceneGraph::LightNode LightNode
Simple Name for PlaneNode.
virtual bool hasNode(BaseNode *_node)
Light status node.
std::string name() const
Returns: name of node (needs not be unique)
void position(Vec3d _pos)
Set position for LightSource.
LightNode * lightNode()
Get the scenegraph Node.
bool visualize()
Should node be visualized?
virtual void update(UpdateType _type=UPDATE_ALL)
Update the Light Object.
LightNode * lightNodeVis()
Get the scenegraph Node.
void enablePicking(bool _enable)
Enable or disable picking for this Object.
virtual void show()
Show Light Node.
virtual void hide()
Sets the whole Scenegraph subtree of this node to invisible.