Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoWinDirectionalLightEditor Class Reference

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

#include <Inventor/Win/SoWinDirectionalLightEditor.h>

+ Inheritance diagram for SoWinDirectionalLightEditor:

Public Member Functions

 SoWinDirectionalLightEditor (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
 Constructor.
 
 ~SoWinDirectionalLightEditor ()
 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 (SoWinDirectionalLightEditorCB *f, void *userData=NULL)
 Adds lightChanged callback.
 
void removeLightChangedCallback (SoWinDirectionalLightEditorCB *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 SoWinComponent
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
SoWidget getWidget () const
 This returns the base window handle for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
SoWidget getShellWidget () const
 Returns the shell window handle (NULL if the shell hasn't been created by this component).
 
SoWidget getParentWidget () const
 Returns the parent window handle, be it a shell or not.
 
void setSize (const SbVec2s &size)
 Convenience routine on the window handle.
 
SbVec2s getSize ()
 Convenience routine on the window handle.
 
SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen () 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.
 
UINTgetDisplay ()
 Included for portability only.
 
SoNONUNICODE void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
SbString getTitle () const
 Gets window title.
 
SoNONUNICODE void setIconTitle (const char *newIconTitle)
 Included for portability only.
 
void setIconTitle (const SbString &newIconTitle)
 Included for portability only.
 
SbString getIconTitle () const
 Included for portability only.
 
void setWindowCloseCallback (SoWinComponentCB *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 specified.
 
SbString getWidgetName () const
 Returns the window handle name.
 
SbString getClassName () const
 Returns the class name.
 
virtual ~SoWinComponent ()
 Destructor.
 

Public Attributes

SbBool alwaysOnTop
 
- Public Attributes inherited from SoWinComponent
SbString helpFileName
 Name of help file to open when the viewer Help button is pressed.
 
UINT helpContextID
 The context ID of the help topic to open when the viewer Help button is pressed.
 
SbString helpContextString
 The TopicID of the help topic to open when the viewer Help button is pressed.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoWinComponent
SoDEPRECATED static SoNONUNICODE void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoDEPRECATED void displayHelp (const SbString &filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoWinComponentgetComponent (SoWidget w)
 Returns the SoWinComponent for this window handle.
 

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

SoWinComponent, SoDirectionalLight

Definition at line 94 of file SoWinDirectionalLightEditor.h.

Constructor & Destructor Documentation

◆ SoWinDirectionalLightEditor()

SoWinDirectionalLightEditor::SoWinDirectionalLightEditor ( SoWidget  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE 
)

Constructor.

◆ ~SoWinDirectionalLightEditor()

SoWinDirectionalLightEditor::~SoWinDirectionalLightEditor ( )

Destructor.

Member Function Documentation

◆ addLightChangedCallback()

void SoWinDirectionalLightEditor::addLightChangedCallback ( SoWinDirectionalLightEditorCB 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 254 of file SoWinDirectionalLightEditor.h.

◆ attach()

void SoWinDirectionalLightEditor::attach ( SoPath pathToLight)

Attaches the editor to a directional light.

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

◆ detach()

void SoWinDirectionalLightEditor::detach ( )

Detaches the editor from a directional light.

◆ getLight()

const SoDirectionalLight & SoWinDirectionalLightEditor::getLight ( ) const
inline

Gets the current light values.

Definition at line 129 of file SoWinDirectionalLightEditor.h.

◆ hide()

virtual void SoWinDirectionalLightEditor::hide ( )
virtual

This hides the component.

It calls the appropriate unrealize or unmanage routines.

Reimplemented from SoWinComponent.

◆ isAttached()

SbBool SoWinDirectionalLightEditor::isAttached ( )
inline

Returns TRUE if the editor is attached.

Definition at line 120 of file SoWinDirectionalLightEditor.h.

◆ removeLightChangedCallback()

void SoWinDirectionalLightEditor::removeLightChangedCallback ( SoWinDirectionalLightEditorCB f,
void *  userData = NULL 
)
inline

Removes the lightChanged callback.

Definition at line 260 of file SoWinDirectionalLightEditor.h.

◆ setLight()

void SoWinDirectionalLightEditor::setLight ( const SoDirectionalLight newLight)

Sets new light values.

◆ show()

virtual void SoWinDirectionalLightEditor::show ( )
virtual

This shows the component.

If this is a topLevelShell component, then show() will Realize and Map the window, else it will simply Manage the widget. In addition, show() will also pop the component window to the top and de-iconify if necessary, to make sure the component is visible by the user.

Reimplemented from SoWinComponent.

Member Data Documentation

◆ alwaysOnTop

SbBool SoWinDirectionalLightEditor::alwaysOnTop

Definition at line 153 of file SoWinDirectionalLightEditor.h.


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