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
Element that stores the current colors and coloring options.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Utility 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
Modifier and TypeMethodDescriptionstatic MoMaterialElement.Material
Returns default colors and coloring options.static MoMaterialElement.Material
getMaterial
(SoState state) Returns current colors and coloring options from the specified traversal state.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.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 Details
-
getDefault
Returns default colors and coloring options.- Returns:
- a
Material
object 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
Returns current colors and coloring options from the specified traversal state.- Parameters:
state
- traversal state- Returns:
- a
Material
object containing current colors and coloring options
-