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