Class MoMaterialElement


public class MoMaterialElement extends SoReplacedElement
Element that stores the current colors and coloring options.
See Also:
  • Method Details

    • getDefault

      public static MoMaterialElement.Material 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 state
      node - material node
      coloring - coloring method for faces
      color - color used for faces
      lineColoring - coloring method for lines
      lineColor - color used for lines
      markerColoring - coloring method for points
      markerColor - color used for points
      transparency - 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 Material object containing current colors and coloring options