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