SOXTDIRECTIONALLIGHTEDITOR(3iv)

πŸ’– SoXtDirectionalLightEditor β€” bestie edition πŸ’–

okay so we're in the SoXtDirectionalLightEditor(3IV) manual page, and this one is actually adorable because it's a whole little component for editing directional lights. Let's go. ✨


🌈 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 🌸

okay so picture this: this class is what you use to edit an SoDirectionalLight node β€” and yes, that means its color, its intensity, and its direction are all getting changed. πŸ’…

But that's not even the whole vibe. Besides editing directional light nodes directly, you can also use the editor with callbacks that get called whenever the light changes. iykyk. πŸ”₯

So what's actually inside this component? A render area and a value slider in the main window, plus controls that pop open a color picker. And in that render area? A sphere representing the world, and a directional light manipulator representing the direction of the light. You pick on the manipulator, you move the mouse, and boom β€” direct manipulation of the light direction. main character energy. πŸ‘‘

The color picker handles the color, and the value slider handles the intensity. Slay.

🫢 important bestie note: the editor can currently be attached to only one light at a time. If you attach it to two different lights, it will automatically detach the first one before attaching the second. Not a bug, just the rules. periodt.

πŸ’… METHODS πŸ’…

πŸ“ Constructor & Destructor

                        SoXtDirectionalLightEditor(Widget parent =
                             NULL, const char *name = NULL, SbBool
                             buildInsideParent = TRUE)
                        ~SoXtDirectionalLightEditor()

Constructor and destructor. The glow-up and the goodbye. ✨

🧚 attach / detach

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. living vicariously through your light node, honestly.

πŸ’œ isAttached

SbBool                  isAttached()

Returns TRUE if the editor is attached. Vibe check: are we attached or not? 🫢

🌈 addLightChangedCallback / removeLightChangedCallback

void                    addLightChangedCallback(SoXtDirectionalLightEditorCB
                             *f, void *userData = NULL)
void                    removeLightChangedCallback(SoXtDirectionalLightEditorCB
                             *f, void *userData = NULL)

An additional way of using the directional light editor: register a callback and set the light. Two-step, no attach required. πŸ’«

⭐ setLight / getLight

void                    setLight(const SoDirectionalLight &newLight)
const SoDirectionalLight &  getLight() const

Set new light values, and get the current light values. Give and receive. The full cycle. πŸ”


πŸ‘‘ SEE ALSO πŸ‘‘

SoXtComponent, SoDirectionalLight


and that's the whole page, bestie!! 🌸 The footer of this manual says SoXtDirectionalLightEditor(3IV)() β€” so that's the title and manual name all over again, no extra version or date drama, just the section 3IV glow. πŸ’– you understood the assignment, go edit some lights. βœ¨πŸŽ€