GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOXTMATERIALEDITOR (3)

NAME

SoXtMaterialEditor — Component which lets you edit a material interactively

CONTENTS

Inherits From
Synopsis
Description
Methods
Resources
See Also

INHERITS FROM

SoXtComponent > SoXtMaterialEditor

SYNOPSIS

#include <Inventor/Xt/SoXtMaterialEditor.h>

    typedef void    
                    
typedef void         SoXtMaterialEditorCB(void *userData, const SoMaterial *mtl)

enum UpdateFrequency {     SoXtMaterialEditor::CONTINUOUS    
                     SoXtMaterialEditor::CONTINUOUS send updates with every mouse motion    
SoXtMaterialEditor::AFTER_ACCEPT    
                     SoXtMaterialEditor::AFTER_ACCEPT only send updates after user hits accept button
}

Methods from class SoXtMaterialEditor:

       
                    
                     SoXtMaterialEditor(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE)    
   
                    
                     ~SoXtMaterialEditor()    
void    
                    
void                 attach(SoMaterial *material, int index = 0)    
void    
                    
void                 detach()    
SbBool    
                    
SbBool               isAttached()    
void    
                    
void                 addMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData = NULL)    
void    
                    
void                 removeMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData = NULL)    
void    
                    
void                 setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq)    
SoXtMaterialEditor::UpdateFrequency    
                    
SoXtMaterialEditor::UpdateFrequency getUpdateFrequency()    
void    
                    
void                 setMaterial(const SoMaterial &mtl)    
const SoMaterial &    
                    
const SoMaterial &   getMaterial() const

Methods from class SoXtComponent:

    virtual void    
                        
virtual void             show()    
virtual void    
                        
virtual void             hide()    
SbBool    
                        
SbBool                   isVisible()    
Widget    
                        
Widget                   getWidget() const    
SbBool    
                        
SbBool                   isTopLevelShell() const    
Widget    
                        
Widget                   getShellWidget() const    
Widget    
                        
Widget                   getParentWidget() const    
void    
                        
void                     setSize(const SbVec2s &size)    
SbVec2s    
                        
SbVec2s                  getSize()    
Display *    
                        
Display *                getDisplay()    
void    
                        
void                     setTitle(const char *newTitle)    
const char *    
                        
const char *             getTitle() const    
void    
                        
void                     setIconTitle(const char *newIconTitle)    
const char *    
                        
const char *             getIconTitle() const    
void    
                        
void                     setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL)    
static SoXtComponent *    
                        
static SoXtComponent *   getComponent(Widget w)    
const char *    
                        
const char *             getWidgetName() const    
const char *    
                        
const char *             getClassName() const

DESCRIPTION

This class is used to edit the material properties of an SoMaterial node. The editor can also directly be used using callbacks instead of attaching it to a node. The component consists of a render area displaying a test sphere, some sliders, a set of radio buttons, and a menu. The sphere displays the current material being edited. There is one slider for each material coefficient. Those fields are ambient, diffuse, specular, emissive (all of which are colors); and transparency and shininess (which are scalar values). A color editor can be opened to edit the color slider base color. A material list displays palettes of predefined materials from which to choose.

The editor can currently be attached to only one material at a time. Attaching two different materials will automatically detach the first one before attaching the second.

METHODS

       
                    
                     SoXtMaterialEditor(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE)    
   
                    
                     ~SoXtMaterialEditor()
Constructor and destructor.

    void    
                    
void                 attach(SoMaterial *material, int index = 0)    
void    
                    
void                 detach()
Attach/detach the editor to a material node and edit the material of the given index.

    SbBool    
                    
SbBool               isAttached()
Returns TRUE if the editor is attached.

    void    
                    
void                 addMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData = NULL)    
void    
                    
void                 removeMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData = NULL)
Additional way of using the material editor, by registering a callback which will be called whenever the material changes (check the UpdateFrequency to find when the callbacks will be called).

    void    
                    
void                 setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq)    
SoXtMaterialEditor::UpdateFrequency    
                    
SoXtMaterialEditor::UpdateFrequency getUpdateFrequency()
Sets/gets the update frequency. See the UpdateFrequency enum declaration.

    void    
                    
void                 setMaterial(const SoMaterial &mtl)    
const SoMaterial &    
                    
const SoMaterial &   getMaterial() const
Set a new material value, and get the current material value.

RESOURCES



*SoXtMaterialEditor.tile1Color: #4c4c4c (color name or hex value) *SoXtMaterialEditor.tile2Color: #999999 (color name or hex value) *SoXtMaterialEditor.light1Color: white (color name or hex value) *SoXtMaterialEditor.light2Color: white (color name or hex value) *SoXtMaterialEditor.updateFrequency: continuous (continuous | manual)

SEE ALSO

SoXtComponent, SoXtMaterialList, SoXtDirLightEditor, SoMaterial

Search for    or go to Top of page |  Section 3 |  Main Index


SOXTMATERIALEDITOR(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.