Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

soxtdirectionallighteditor(3iv) [debian man page]

SoXtDirectionalLightEditor(3IV)()										 SoXtDirectionalLightEditor(3IV)()

NAME
SoXtDirectionalLightEditor -- component for editing directional lights INHERITS FROM
SoXtComponent > SoXtDirectionalLightEditor SYNOPSIS
#include <Inventor/Xt/SoXtDirectionalLightEditor.h> typedef void SoXtDirectionalLightEditorCB(void *userData, const SoDirectionalLight *light) Methods from class SoXtDirectionalLightEditor: SoXtDirectionalLightEditor(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE) ~SoXtDirectionalLightEditor() void attach(SoPath *pathToLight) void detach() SbBool isAttached() void addLightChangedCallback(SoXtDirectionalLightEditorCB *f, void *userData = NULL) void removeLightChangedCallback(SoXtDirectionalLightEditorCB *f, void *userData = NULL) void setLight(const SoDirectionalLight &newLight) const SoDirectionalLight & getLight() const Methods from class SoXtComponent: virtual void show() virtual void hide() SbBool isVisible() Widget getWidget() const SbBool isTopLevelShell() const Widget getShellWidget() const Widget getParentWidget() const void setSize(const SbVec2s &size) SbVec2s getSize() Display * getDisplay() void setTitle(const char *newTitle) const char * getTitle() const void setIconTitle(const char *newIconTitle) const char * getIconTitle() const void setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL) static SoXtComponent * getComponent(Widget w) const char * getWidgetName() const const char * getClassName() const DESCRIPTION
This class is used to edit an SoDirectionalLight node (color, intensity, and direction are changed). In addition to directly editing direc- tional 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. METHODS
SoXtDirectionalLightEditor(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE) ~SoXtDirectionalLightEditor() Constructor and destructor. void attach(SoPath *pathToLight) void detach() Attach/detach the editor to/from a directional light. When attached, changes made in the editor directly affect the attached light. SbBool isAttached() Returns TRUE if the editor is attached. void addLightChangedCallback(SoXtDirectionalLightEditorCB *f, void *userData = NULL) void removeLightChangedCallback(SoXtDirectionalLightEditorCB *f, void *userData = NULL) Additional way of using the directional light editor, by registering a callback and setting the light. void setLight(const SoDirectionalLight &newLight) const SoDirectionalLight & getLight() const Set new light values, and get the current light values. SEE ALSO
SoXtComponent, SoDirectionalLight SoXtDirectionalLightEditor(3IV)()

Check Out this Related Man Page

SoXtComponent(3IV)()													      SoXtComponent(3IV)()

NAME
SoXtComponent -- abstract base class for all Inventor Xt components INHERITS FROM
SoXtComponent SYNOPSIS
#include <Inventor/Xt/SoXtComponent.h> typedef void SoXtComponentCB(void *userData, SoXtComponent *comp) Methods from class SoXtComponent: virtual void show() virtual void hide() SbBool isVisible() Widget getWidget() const SbBool isTopLevelShell() const Widget getShellWidget() const Widget getParentWidget() const void setSize(const SbVec2s &size) SbVec2s getSize() Display * getDisplay() void setTitle(const char *newTitle) const char * getTitle() const void setIconTitle(const char *newIconTitle) const char * getIconTitle() const void setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL) static SoXtComponent * getComponent(Widget w) const char * getWidgetName() const const char * getClassName() const DESCRIPTION
Abstract base class from which all Inventor Xt components are derived. This class provides a basic C++ protocol for building and displaying Motif components. Components are used to encapsulate some function or task into a reusable package in the form of a Motif widget that can be used in any Inventor Xt program. See the Example section on how to build and use SoXtComponents. METHODS
virtual void show() virtual void hide() This shows and hides the component. If this is a topLevelShell component, then show() will Realize and Map the window, otherwise it will simply Manage the widget. hide() calls the appropriate unmap or unmanage routines. 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. SbBool isVisible() Returns TRUE if this component is mapped onto the screen. For a component to be visible, it's widget and the shell containing this wid- get must be mapped (which is FALSE when the component is iconified). Subclasses should call this routine before redrawing anything and in any sensor trigger methods. Calling this will check the current visibility (which is really cheap) and invoke the visibility changed callbacks if the state changes (see addVisibilityChangeCallback()). Widget getWidget() const This returns the base widget for this component. If the component created its own shell, this returns the topmost widget beneath the shell. Call getShellWidget() to obtain the shell. SbBool isTopLevelShell() const Widget getShellWidget() const Returns TRUE if this component is a top level shell component (has its own window). Subclasses may use this to decide if they are allowed to resize themselves. Also method to return the shell widget (NULL if the shell hasn't been created by this component). Widget getParentWidget() const Return the parent widget, be it a shell or not void setSize(const SbVec2s &size) SbVec2s getSize() Convenience routines on the widget -- setSize calls XtSetValue Display * getDisplay() Returns the X display associated with this components widget. void setTitle(const char *newTitle) const char * getTitle() const void setIconTitle(const char *newIconTitle) const char * getIconTitle() const The window and icon title can be set for topLevelShell components or components which are directly under a shell widget (i.e. components which have their own window). 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. A pointer to this class will be passed as the callback data. Note: this callback is supplied because the user may wish to delete this component when it is closed. static SoXtComponent * getComponent(Widget w) This returns the SoXtComponent for this widget. If the widget is not an Inventor component, then NULL is returned. const char * getWidgetName() const const char * getClassName() const Routines which return the widget name and the class name. The widget name is passed to the build method. The class name is predefined by each component. These names are used when retrieving X resource values for the component. EXAMPLE
This example shows how an Inventor component can be built inside a program using the Xt widget set. The example uses the SoXtExaminerViewer widget to view some simple geometry. #include <Inventor/Xt/SoXt.h> #include <Inventor/nodes/SoCone.h> #include <Inventor/Xt/viewers/SoXtExaminerViewer.h> void main(int, char **argv) { // Initialize Inventor and Xt, which must be done // before any Inventor calls are made. Widget myWindow = SoXt::init(argv[0]); // create the viewer in the toplevel window // and set some scene to display SoXtExaminerViewer *myViewer = new SoXtExaminerViewer(myWindow); myViewer->setSceneGraph( new SoCone() ); // manage and map window on screen myViewer->show(); SoXt::show(myWindow); // calls XtRealizeWidget() // Loop forever SoXt::mainLoop(); } SEE ALSO
SoXt, SoXtRenderArea, SoXtViewer, SoXtMaterialEditor SoXtComponent(3IV)()
Man Page