Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoQtDirectionalLightEditor Class Reference

VSG extension Component for editing directional lights. More...

#include <Inventor/Qt/SoQtDirectionalLightEditor.h>

+ Inheritance diagram for SoQtDirectionalLightEditor:

Public Types

typedef void SoQtDirectionalLightEditorCB(void *userData, const SoDirectionalLight *light)
 
- Public Types inherited from SoQtComponent
typedef void SoQtComponentCB(void *userData, SoQtComponent *comp)
 

Public Member Functions

 SoQtDirectionalLightEditor (QWidget *parent=qApp->activeWindow(), const char *name=NULL, SbBool buildInsideParent=TRUE)
 Constructor.
 
 ~SoQtDirectionalLightEditor ()
 Destructor.
 
void attach (SoPath *pathToLight)
 Attaches the editor to a directional light.
 
void detach ()
 Detaches the editor from a directional light.
 
SbBool isAttached ()
 Returns TRUE if the editor is attached.
 
void setLight (const SoDirectionalLight &newLight)
 Sets new light values.
 
const SoDirectionalLightgetLight () const
 Gets the current light values.
 
void addLightChangedCallback (SoQtDirectionalLightEditorCB *f, void *userData=NULL)
 Adds lightChanged callback.
 
void removeLightChangedCallback (SoQtDirectionalLightEditorCB *f, void *userData=NULL)
 Removes the lightChanged callback.
 
virtual void show ()
 This shows the component.
 
virtual void hide ()
 This hides the component.
 
- Public Member Functions inherited from SoQtComponent
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
virtual QWidget * getWidget () const
 This returns the base widget handle for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
QWidget * getShellWidget () const
 Returns the topLevelShell widget handle (NULL if the topLevelShell hasn't been created by this component).
 
QWidget * getParentWidget () const
 Returns the parent widget handle.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget handle.
 
SbVec2s getSize ()
 Convenience routine on the widget handle.
 
virtual SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable (void) const
 Queries if it is possible to put the viewer in fullscreen mode.
 
SbGlContextHelper::Display getDisplay ()
 On UNIX, returns the X display associated with this components widget.
 
void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
void setTitle (const QString &newTitle)
 Sets window title.
 
const QString getTitle () const
 Gets window title.
 
void setIconTitle (const QString &newIconTitle)
 Included for portability only.
 
const QString getIconTitle () const
 Included for portability only.
 
SbString getWidgetName () const
 Returns the widget handle name.
 
SbString getClassName () const
 Returns the class name.
 
void setWindowCloseCallback (SoQtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoQtComponent
static SoQtComponentgetComponent (QWidget *widget)
 Returns the SoQtComponent for this widget handle.
 
- Public Attributes inherited from SoQtComponent
SbString helpFileName
 Name of help file to open when the viewer Help button is pressed.
 

Detailed Description

VSG extension Component for editing directional lights.

This class is used to edit an SoDirectionalLight node (color, intensity, and direction are changed). In addition to directly editing directional light nodes, the editor can also be used with callbacks which will be called whenever the light is changed. The component consists of a render area and a value slider in the main window, with controls to display a color picker. In the render area there appears a sphere representing the world, and a directional light manipulator representing the direction of the light. Picking on the manipulator and moving the mouse provides direct manipulation of the light direction. The color picker is used to edit the color, and the value slider edits the intensity.

The editor can currently be attached to only one light at a time. Attaching to two different lights will automatically detach the first one before attaching the second.

SEE ALSO

SoQtComponent, SoDirectionalLight

Definition at line 81 of file SoQtDirectionalLightEditor.h.

Member Typedef Documentation

◆ SoQtDirectionalLightEditorCB

typedef void SoQtDirectionalLightEditorCB(void *userData, const SoDirectionalLight *light)

Definition at line 48 of file SoQtDirectionalLightEditor.h.

Constructor & Destructor Documentation

◆ SoQtDirectionalLightEditor()

SoQtDirectionalLightEditor::SoQtDirectionalLightEditor ( QWidget *  parent = qApp->activeWindow(),
const char *  name = NULL,
SbBool  buildInsideParent = TRUE 
)

Constructor.

◆ ~SoQtDirectionalLightEditor()

SoQtDirectionalLightEditor::~SoQtDirectionalLightEditor ( )

Destructor.

Member Function Documentation

◆ addLightChangedCallback()

void SoQtDirectionalLightEditor::addLightChangedCallback ( SoQtDirectionalLightEditorCB f,
void *  userData = NULL 
)
inline

Adds lightChanged callback.

This is an additional way of using the directional light editor, by registering a callback and setting the light.

Definition at line 125 of file SoQtDirectionalLightEditor.h.

◆ attach()

void SoQtDirectionalLightEditor::attach ( SoPath pathToLight)

Attaches the editor to a directional light.

When attached, changes made in the editor directly affect the attached light.

◆ detach()

void SoQtDirectionalLightEditor::detach ( )

Detaches the editor from a directional light.

◆ getLight()

const SoDirectionalLight & SoQtDirectionalLightEditor::getLight ( ) const
inline

Gets the current light values.

Definition at line 118 of file SoQtDirectionalLightEditor.h.

◆ hide()

virtual void SoQtDirectionalLightEditor::hide ( )
virtual

This hides the component.

Reimplemented from SoQtComponent.

◆ isAttached()

SbBool SoQtDirectionalLightEditor::isAttached ( )
inline

Returns TRUE if the editor is attached.

Definition at line 109 of file SoQtDirectionalLightEditor.h.

◆ removeLightChangedCallback()

void SoQtDirectionalLightEditor::removeLightChangedCallback ( SoQtDirectionalLightEditorCB f,
void *  userData = NULL 
)
inline

Removes the lightChanged callback.

Definition at line 131 of file SoQtDirectionalLightEditor.h.

◆ setLight()

void SoQtDirectionalLightEditor::setLight ( const SoDirectionalLight newLight)

Sets new light values.

◆ show()

virtual void SoQtDirectionalLightEditor::show ( )
virtual

This shows the component.

Reimplemented from SoQtComponent.


The documentation for this class was generated from the following file: