SoWinDirectionalLightEditor Class Reference
[Win]

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

#include <Inventor/Win/SoWinDirectionalLightEditor.h>

Inheritance diagram for SoWinDirectionalLightEditor:
SoWinComponent

List of all members.

Public Member Functions

 SoWinDirectionalLightEditor (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
 ~SoWinDirectionalLightEditor ()
void attach (SoPath *pathToLight)
void detach ()
SbBool isAttached ()
void setLight (const SoDirectionalLight &newLight)
const SoDirectionalLightgetLight () const
void addLightChangedCallback (SoWinDirectionalLightEditorCB *f, void *userData=NULL)
void removeLightChangedCallback (SoWinDirectionalLightEditorCB *f, void *userData=NULL)
virtual void show ()
virtual void hide ()

Public Attributes

SbBool alwaysOnTop

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


Constructor & Destructor Documentation

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

Constructor.

SoWinDirectionalLightEditor::~SoWinDirectionalLightEditor (  ) 

Destructor.


Member Function Documentation

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.

void SoWinDirectionalLightEditor::attach ( SoPath pathToLight  ) 

Attaches the editor to a directional light.

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

void SoWinDirectionalLightEditor::detach (  ) 

Detaches the editor from a directional light.

const SoDirectionalLight& SoWinDirectionalLightEditor::getLight (  )  const [inline]

Gets the current light values.

virtual void SoWinDirectionalLightEditor::hide (  )  [virtual]

This hides the component.

It calls the appropriate unrealize or unmanage routines.

Reimplemented from SoWinComponent.

SbBool SoWinDirectionalLightEditor::isAttached (  )  [inline]

Returns TRUE if the editor is attached.

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

Removes the lightChanged callback.

void SoWinDirectionalLightEditor::setLight ( const SoDirectionalLight newLight  ) 

Sets new light values.

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


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

Open Inventor Toolkit reference manual, generated on 24 Mar 2020
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/