57#include <ACG/QtWidgets/QtSceneGraphWidget.hh>
58#include "LightWidget.hh"
60#include <ACG/Scenegraph/MaterialNode.hh>
83 if ( widgetMap_.contains(_node) ) {
84 return widgetMap_[_node];
87 widgetMap_[_node] = widget;
94 return ( _className == std::string(
"LightNode") );
98 return std::string(
"LightNode");
102 return QString(
"Edit Light");
132 defaultLightSource_(false)
156 std::vector< BaseNode*> children;
161 for (
unsigned int i = 0 ; i < children.size(); ++i )
162 children[i]->set_parent(
parent);
216 std::string nodename = std::string(
"LightNode for Light " + _name.toUtf8() );
219 std::string nodenameVis = std::string(
"LightNode Visualization for Light " + _name.toUtf8() );
257 output +=
"========================================================================\n";
261 output +=
"Object Contains Light : ";
266 output +=
" Position ( " + QString::number(pos[0]) +
", " + QString::number(pos[1]) +
", " + QString::number(pos[2]) +
")";
269 output +=
"========================================================================\n";
DLLEXPORT void setTypeIcon(DataType _id, const QString &_icon)
Set an Icon for a given DataType.
ACG::SceneGraph::LightNode LightNode
Simple Name for PlaneNode.
ChildIter childrenBegin()
Returns: begin-iterator of children.
ChildIter childrenEnd()
Returns: end-iterator of children.
void enablePicking(bool _enable)
void setMultipassStatus(const MultipassBitMask _passStatus)
Set multipass settings for the nodes status functions.
@ HideNode
Hide this node, but draw children.
@ Active
Draw node & children.
BaseNode * parent()
Get the nodes parent node.
std::vector< BaseNode * >::iterator ChildIter
allows to iterate over children
void set_status(StatusMode _s)
Set the status of this node.
virtual const std::string & className() const =0
Return class name (implemented by the ACG_CLASSNAME macro)
std::string name() const
Returns: name of node (needs not be unique)
void push_back(BaseNode *_node)
Insert _node at the end of the list of children.
void show()
Show node: set status to Active.
bool visualize()
Should node be visualized?
void setLightSource(LightSource _light)
Set the light source parameters.
Structure to hold options for one LightSource.
void position(Vec3d _pos)
Set position for LightSource.
bool enabled() const
Get light source status.
virtual void show()
Sets the whole Scenegraph subtree of this node to visible.
virtual void hide()
Sets the whole Scenegraph subtree of this node to invisible.
virtual void setName(QString _name) override
path to the file from which the object is loaded ( defaults to "." )
MaterialNode * materialNode()
get a pointer to the materialnode
virtual void cleanup() override
virtual bool hasNode(BaseNode *_node)
Check if the given node is owned by this object.
virtual QString getObjectinfo()
Get all Info for the Object as a string.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
BaseObject * parent()
Get the parent item ( 0 if rootitem )
void setDataType(DataType _type)
void visibilityChanged(int _objectId)
void deleteData()
Delete all data attached to this object ( calls delete on each object )
DataType dataType() const
virtual void show()
Show Light Node.
virtual void hide()
Hide Light Node.
LightNode * lightNodeVis_
Light rendering node (only for rendering purposes)
LightSource * lightSource()
virtual void cleanup()
Reset current object, including all related nodes.
virtual void update(UpdateType _type=UPDATE_ALL)
Update the Light Object.
bool picked(uint _node_idx)
detect if the node has been picked
LightNode * lightNodeVis()
Get the scenegraph Node.
void setName(QString _name)
Set the name of the Object.
LightNode * lightNode_
Light status node.
bool pickingEnabled()
Check if picking is enabled for this Object.
QString getObjectinfo()
Get all Info for the Object as a string.
LightNode * lightNode()
Get the scenegraph Node.
virtual bool hasNode(BaseNode *_node)
Light status node.
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.
virtual bool visible()
Show Light Node.
virtual ~LightObject()
destructor
void addSceneGraphGenerator(ACG::QtWidgets::SceneGraphWidgetGenerator *_generator)
Add a scenegraph generator ( the handled type will be extracted from the generator)
void addGlobalStatusNode(ACG::SceneGraph::BaseNode *_node)
Adds a global status node.