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