SoXtMaterialEditor man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



						       SoXtMaterialEditor(3IV)

NAME
     SoXtMaterialEditor (SoXtMtlEd) - Component which lets you edit a material
     interactively

INHERITS FROM
     SoXtComponent > SoXtMaterialEditor

SYNOPSIS
     #include <Inventor_c/Xt/SoXtMaterialEditor.h>

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

     enum SoXtMaterialEditorUpdateFrequency {
	  SO_XT_MTL_ED_CONTINUOUS    send updates with every mouse motion
	  SO_XT_MTL_ED_AFTER_ACCEPT  only send updates after user hits accept
					  button
     }

	  Functions from class SoXtMaterialEditor:

     SoXtMaterialEditor *  SoXtMtlEdCreate(Widget parent = NULL, const char
				*name = NULL, SbBool buildInsideParent = TRUE)
     void		   SoXtMtlEdDelete(SoXtMtlEd *this)
     void		   SoXtMtlEdAttach(SoXtMtlEd *this, SoMaterial
				*material, int index = 0)
     void		   SoXtMtlEdDetach(SoXtMtlEd *this)
     SbBool		   SoXtMtlEdIsAttached(SoXtMtlEd *this)
     void		   SoXtMtlEdAddMtlChangedCB(SoXtMtlEd *this,
				SoXtMaterialEditorCB *f, void *userData =
				NULL)
     void		   SoXtMtlEdRemoveMtlChangedCB(SoXtMtlEd *this,
				SoXtMaterialEditorCB *f, void *userData =
				NULL)
     void		   SoXtMtlEdSetUpdateFreq(SoXtMtlEd *this,
				SoXtMaterialEditor::UpdateFrequency freq)
     SoXtMaterialEditor::UpdateFrequency
			   SoXtMtlEdGetUpdateFreq(SoXtMtlEd *this)
     void		   SoXtMtlEdSetMtl(SoXtMtlEd *this, const SoMaterial
				*mtl)
     const SoMaterial *	   SoXtMtlEdGetMtl(const SoXtMtlEd *this)

	  Functions from class SoXtComponent:

     void		 SoXtMtlEdShow(SoXtMtlEd *this)
     void		 SoXtMtlEdHide(SoXtMtlEd *this)
     SbBool		 SoXtMtlEdIsVisible(SoXtMtlEd *this)
     Widget		 SoXtMtlEdGetWidget(const SoXtMtlEd *this)
     SbBool		 SoXtMtlEdIsTopLevelShell(const SoXtMtlEd *this)
     Widget		 SoXtMtlEdGetShellWidget(const SoXtMtlEd *this)

Page 1

SoXtMaterialEditor(3IV)

     Widget		 SoXtMtlEdGetParentWidget(const SoXtMtlEd *this)
     void		 SoXtMtlEdSetSize(SoXtMtlEd *this, const SbVec2s
			      *size)
     SbVec2s		 SoXtMtlEdGetSize(SoXtMtlEd *this)
     Display *		 SoXtMtlEdGetDisplay(SoXtMtlEd *this)
     void		 SoXtMtlEdSetTitle(SoXtMtlEd *this, const char
			      *newTitle)
     const char *	 SoXtMtlEdGetTitle(const SoXtMtlEd *this)
     void		 SoXtMtlEdSetIconTitle(SoXtMtlEd *this, const char
			      *newIconTitle)
     const char *	 SoXtMtlEdGetIconTitle(const SoXtMtlEd *this)
     void		 SoXtMtlEdSetWinCloseCB(SoXtMtlEd *this,
			      SoXtComponentCB *func, void *data = NULL)
     SoXtComponent *	 SoXtMtlEdGetComp(Widget w)
     const char *	 SoXtMtlEdGetWidgetName(const SoXtMtlEd *this)
     const char *	 SoXtMtlEdGetClassName(const SoXtMtlEd *this)

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.

FUNCTIONS
     SoXtMaterialEditor *  SoXtMtlEdCreate(Widget parent = NULL, const char
				*name = NULL, SbBool buildInsideParent = TRUE)
     void		   SoXtMtlEdDelete(SoXtMtlEd *this)
	  Constructor and destructor.

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

     SbBool		   SoXtMtlEdIsAttached(SoXtMtlEd *this)
	  Returns TRUE if the editor is attached.

     void		   SoXtMtlEdAddMtlChangedCB(SoXtMtlEd *this,
				SoXtMaterialEditorCB *f, void *userData =
				NULL)

Page 2

						       SoXtMaterialEditor(3IV)

     void		   SoXtMtlEdRemoveMtlChangedCB(SoXtMtlEd *this,
				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		   SoXtMtlEdSetUpdateFreq(SoXtMtlEd *this,
				SoXtMaterialEditor::UpdateFrequency freq)
     SoXtMaterialEditor::UpdateFrequency
			   SoXtMtlEdGetUpdateFreq(SoXtMtlEd *this)
	  Sets/gets the update frequency. See the UpdateFrequency enum
	  declaration.

     void		   SoXtMtlEdSetMtl(SoXtMtlEd *this, const SoMaterial
				*mtl)
     const SoMaterial *	   SoXtMtlEdGetMtl(const SoXtMtlEd *this)
	  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

Page 3

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net