Open Inventor Release 2024.1.1
No Matches
SoXtDirectionalLightEditor Class Reference

Component for editing directional lights. More...

#include <Inventor/Xt/SoXtDirectionalLightEditor.h>

+ Inheritance diagram for SoXtDirectionalLightEditor:

Public Types

typedef void SoXtDirectionalLightEditorCB(void *userData, const SoDirectionalLight *light)
- Public Types inherited from SoXtComponent
typedef void SoXtComponentCB(void *data, SoXtComponent *v)

Public Member Functions

 SoXtDirectionalLightEditor (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
 ~SoXtDirectionalLightEditor ()
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 (SoXtDirectionalLightEditorCB *f, void *userData=NULL)
 Adds lightChanged callback.
void removeLightChangedCallback (SoXtDirectionalLightEditorCB *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 SoXtComponent
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
SoWidget getWidget () const
 This returns the base widget 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 widget (NULL if the shell hasn't been created by this component).
SoWidget getParentWidget () const
 Returns the parent widget, be it a shell or not.
void setSize (const SbVec2s &size)
 Convenience routine on the widget.
SbVec2s getSize ()
 Convenience routine on the widget.
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 () const
 Queries if it is possible to put the viewer in fullscreen mode.
Display * getDisplay ()
 Returns the X display associated with this components widget.
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)
 Sets icon title.
void setIconTitle (const SbString &newIconTitle)
 Sets icon title.
SbString getIconTitle () const
 Gets icon title.
void setWindowCloseCallback (SoXtComponentCB *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.
SbString getWidgetName () const
 Returns the widget name.
SbString getClassName () const
 Returns the class name.

Additional Inherited Members

- Static Public Member Functions inherited from SoXtComponent
static void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
static SoXtComponentgetComponent (SoWidget w)
 This returns the SoXtComponent for this widget.

Detailed Description

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.


      !! Drectional Light Editor !!
      *IvDirectLightTitle.labelString: Dir Light Editor
      *IvDirectLightIconTitle.labelString: Dir Light Ed
      *IvDirectLightInten.labelString: Inten
      *IvDirectLightColorEditor.labelString: Directional Light Color
      *IvDLMenuBar.IvEdit.labelString: Edit
      *IvDLMenuBar*IvControlPullDown*IvColorEditor.labelString: Color Editor
      *IvDLMenuBar*IvControlPullDown*IvCopy.labelString: Copy
      *IvDLMenuBar*IvControlPullDown*IvPaste.labelString: Paste
      *IvDLMenuBar*IvControlPullDown*IvHelp.labelString: Help


SoXtComponent, SoDirectionalLight

Definition at line 138 of file SoXtDirectionalLightEditor.h.

Member Typedef Documentation

◆ SoXtDirectionalLightEditorCB

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

Definition at line 87 of file SoXtDirectionalLightEditor.h.

Constructor & Destructor Documentation

◆ SoXtDirectionalLightEditor()

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


◆ ~SoXtDirectionalLightEditor()

SoXtDirectionalLightEditor::~SoXtDirectionalLightEditor ( )


Member Function Documentation

◆ addLightChangedCallback()

void SoXtDirectionalLightEditor::addLightChangedCallback ( SoXtDirectionalLightEditorCB f,
void *  userData = NULL 

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 268 of file SoXtDirectionalLightEditor.h.

◆ attach()

void SoXtDirectionalLightEditor::attach ( SoPath pathToLight)

Attaches the editor to a directional light.

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

◆ detach()

void SoXtDirectionalLightEditor::detach ( )

Detaches the editor from a directional light.

◆ getLight()

const SoDirectionalLight & SoXtDirectionalLightEditor::getLight ( ) const

Gets the current light values.

Definition at line 173 of file SoXtDirectionalLightEditor.h.

◆ hide()

virtual void SoXtDirectionalLightEditor::hide ( )

This hides the component.

Reimplemented from SoXtComponent.

◆ isAttached()

SbBool SoXtDirectionalLightEditor::isAttached ( )

Returns TRUE if the editor is attached.

Definition at line 164 of file SoXtDirectionalLightEditor.h.

◆ removeLightChangedCallback()

void SoXtDirectionalLightEditor::removeLightChangedCallback ( SoXtDirectionalLightEditorCB f,
void *  userData = NULL 

Removes the lightChanged callback.

Definition at line 274 of file SoXtDirectionalLightEditor.h.

◆ setLight()

void SoXtDirectionalLightEditor::setLight ( const SoDirectionalLight newLight)

Sets new light values.

◆ show()

virtual void SoXtDirectionalLightEditor::show ( )

This shows the component.

Reimplemented from SoXtComponent.

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