Class SoMaterialElement
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.elements.SoElement
-
- com.openinventor.inventor.elements.SoReplacedElement
-
- com.openinventor.inventor.elements.SoMaterialElement
-
public class SoMaterialElement extends SoReplacedElement
Store in the state the material properties set by some property nodes. The values of this element are modified by property nodes that affects the material characteristics such as:SoBaseColor
,SoMaterial
,SoPhysicalMaterial
.- See Also:
SoBaseColor
,SoPhysicalMaterial
,SoMaterial
,SoPackedColor
,SoVertexProperty
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoMaterialElement.Masks
Masks.-
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 Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static SbColor
getAmbient(SoState name_15034)
static int
getClassStackIndex()
Deprecated.As of Open Inventor 9.3.0.0.static int
getColorIndex(SoState name_15032, int num)
static int[]
getColorIndices(SoState state)
static boolean
getColorMaterial(SoState name_15038)
static SbColor
getDefaultAmbient()
Specify Open Inventor defaults for colors, etc.static float
getDefaultAmbientIntensity()
Specify Open Inventor defaults for colors, etc.static int
getDefaultColorIndex()
Specify Open Inventor defaults for colors, etc.static SbColor
getDefaultDiffuse()
Specify Open Inventor defaults for colors, etc.static SbColor
getDefaultEmissive()
Specify Open Inventor defaults for colors, etc.static float
getDefaultMetallic()
static float
getDefaultRoughness()
static float
getDefaultShininess()
Specify Open Inventor defaults for colors, etc.static SbColor
getDefaultSpecular()
Specify Open Inventor defaults for colors, etc.static float
getDefaultSpecularFactor()
static float
getDefaultTransparency()
Specify Open Inventor defaults for colors, etc.static SbColor
getDiffuse(SoState state, int index)
get() methods get value from Inventor state.static java.nio.IntBuffer
getDirectColorIndices(SoState state)
static SbColor
getEmissive(SoState name_15035)
static float
getMetallic(SoState state)
int
getNumColorIndices()
Method to inquire about current colors.static long
getNumColorIndices(SoState state)
Method to inquire about current colors.int
getNumDiffuse()
Method to inquire about current colors.static long
getNumDiffuse(SoState state)
Return number of diffuse colors.static int
getNumTransparencies(SoState state)
Method to inquire about current colors.static SoCpuBufferObject
getPackedColors(SoState state)
Return packed colors if any.static float
getRoughness(SoState state)
static float
getShininess(SoState name_15037)
static SbColor
getSpecular(SoState name_15036)
static float
getSpecularFactor(SoState state)
static float
getTransparency(SoState name_15028, int index)
get() methods get value from Inventor state.static boolean
isTransparent(SoState state)
Method to inquire about current colors.void
pop(SoState state, SoElement prevTopElement)
Unref buffer object of the popped element.void
push(SoState state)
Copy current material into the pushed element.static void
setAmbient(SoState state, SoNode node, SbColor color)
static void
setColorIndices(SoState state, SoNode node, int[] indices)
Static set method.static void
setColorMaterial(SoState state, SoNode node, boolean value)
static void
setDiffuse(SoState state, SoNode node, SbColor[] colors)
Static set method.static void
setEmissive(SoState state, SoNode node, SbColor color)
static void
setMetallic(SoState state, SoNode node, float value)
static void
setPacked(SoState state, SoNode node, int[] colors)
static void
setRoughness(SoState state, SoNode node, float value)
static void
setShininess(SoState state, SoNode node, float value)
static void
setSpecular(SoState state, SoNode node, SbColor color)
static void
setSpecularFactor(SoState state, SoNode node, float value)
static void
setTransparency(SoState state, SoNode node, float[] transp)
Static set method.-
Methods inherited from class com.openinventor.inventor.elements.SoElement
getClassStackIndex
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Method Detail
-
getDirectColorIndices
public static java.nio.IntBuffer getDirectColorIndices(SoState state)
-
getPackedColors
public static SoCpuBufferObject getPackedColors(SoState state)
Return packed colors if any.
-
getDiffuse
public static SbColor getDiffuse(SoState state, int index)
get() methods get value from Inventor state. The public methods are static, they get an instance of the element.
-
getTransparency
public static float getTransparency(SoState name_15028, int index)
get() methods get value from Inventor state. The public methods are static, they get an instance of the element. If there is a cache, the appropriate virtual registerGetDependence is called.
-
push
public void push(SoState state)
Copy current material into the pushed element.
-
getNumColorIndices
public int getNumColorIndices()
Method to inquire about current colors.
-
pop
public void pop(SoState state, SoElement prevTopElement)
Unref buffer object of the popped element.
-
setDiffuse
public static void setDiffuse(SoState state, SoNode node, SbColor[] colors)
Static set method.
-
setTransparency
public static void setTransparency(SoState state, SoNode node, float[] transp)
Static set method.
-
getDefaultAmbient
public static SbColor getDefaultAmbient()
Specify Open Inventor defaults for colors, etc.
-
getDefaultSpecular
public static SbColor getDefaultSpecular()
Specify Open Inventor defaults for colors, etc.
-
getClassStackIndex
@Deprecated(since="9.3.0.0") public static int getClassStackIndex()
Deprecated.As of Open Inventor 9.3.0.0. replaced by SoElement.getClassStackIndex(Class)Returns the stack id for this element. ] *
-
setColorIndices
public static void setColorIndices(SoState state, SoNode node, int[] indices)
Static set method.
-
getNumTransparencies
public static int getNumTransparencies(SoState state)
Method to inquire about current colors.
-
getDefaultRoughness
public static float getDefaultRoughness()
-
getNumColorIndices
public static long getNumColorIndices(SoState state)
Method to inquire about current colors.
-
getDefaultShininess
public static float getDefaultShininess()
Specify Open Inventor defaults for colors, etc.
-
isTransparent
public static boolean isTransparent(SoState state)
Method to inquire about current colors.
-
getDefaultSpecularFactor
public static float getDefaultSpecularFactor()
-
getMetallic
public static float getMetallic(SoState state)
-
getDefaultColorIndex
public static int getDefaultColorIndex()
Specify Open Inventor defaults for colors, etc.
-
getRoughness
public static float getRoughness(SoState state)
-
getDefaultMetallic
public static float getDefaultMetallic()
-
getNumDiffuse
public static long getNumDiffuse(SoState state)
Return number of diffuse colors.
-
getDefaultTransparency
public static float getDefaultTransparency()
Specify Open Inventor defaults for colors, etc.
-
getNumDiffuse
public int getNumDiffuse()
Method to inquire about current colors.
-
getColorIndices
public static int[] getColorIndices(SoState state)
-
getColorIndex
public static int getColorIndex(SoState name_15032, int num)
-
getDefaultDiffuse
public static SbColor getDefaultDiffuse()
Specify Open Inventor defaults for colors, etc.
-
getDefaultEmissive
public static SbColor getDefaultEmissive()
Specify Open Inventor defaults for colors, etc.
-
getDefaultAmbientIntensity
public static float getDefaultAmbientIntensity()
Specify Open Inventor defaults for colors, etc.
-
getShininess
public static float getShininess(SoState name_15037)
-
getColorMaterial
public static boolean getColorMaterial(SoState name_15038)
-
getSpecularFactor
public static float getSpecularFactor(SoState state)
-
-