Class MoMaterialElement
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.elements.SoElement
-
- com.openinventor.inventor.elements.SoReplacedElement
-
- com.openinventor.meshvizxlm.mapping.elements.MoMaterialElement
-
public class MoMaterialElement extends SoReplacedElement
Element that stores the current colors and coloring options.- See Also:
MoMaterial
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMoMaterialElement.MaterialUtility class to store colors and coloring options.-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MoMaterialElement.MaterialgetDefault()Returns default colors and coloring options.static MoMaterialElement.MaterialgetMaterial(SoState state)Returns current colors and coloring options from the specified traversal state.static voidset(SoState state, SoNode node, MoMaterial.ColoringType coloring, SbColor color, MoMaterial.ColoringType lineColoring, SbColor lineColor, MoMaterial.ColoringType markerColoring, SbColor markerColor, float transparency)Sets the current colors and coloring options for the specified traversal state and node.-
Methods inherited from class com.openinventor.inventor.elements.SoReplacedElement
getClassStackIndex
-
Methods inherited from class com.openinventor.inventor.elements.SoElement
getClassStackIndex, pop, push
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getDefault
public static MoMaterialElement.Material getDefault()
Returns default colors and coloring options.- Returns:
- a
Materialobject containing default colors and coloring options
-
set
public static void set(SoState state, SoNode node, MoMaterial.ColoringType coloring, SbColor color, MoMaterial.ColoringType lineColoring, SbColor lineColor, MoMaterial.ColoringType markerColoring, SbColor markerColor, float transparency)
Sets the current colors and coloring options for the specified traversal state and node.- Parameters:
state- traversal statenode- material nodecoloring- coloring method for facescolor- color used for faceslineColoring- coloring method for lineslineColor- color used for linesmarkerColoring- coloring method for pointsmarkerColor- color used for pointstransparency- transparency value used to display surfaces
-
getMaterial
public static MoMaterialElement.Material getMaterial(SoState state)
Returns current colors and coloring options from the specified traversal state.- Parameters:
state- traversal state- Returns:
- a
Materialobject containing current colors and coloring options
-
-