Package com.openinventor.inventor.nodes
Enum SoInstanceParameter.PredefinedParameters
- java.lang.Object
-
- java.lang.Enum<SoInstanceParameter.PredefinedParameters>
-
- com.openinventor.inventor.nodes.SoInstanceParameter.PredefinedParameters
-
- All Implemented Interfaces:
IntegerValuedEnum,java.io.Serializable,java.lang.Comparable<SoInstanceParameter.PredefinedParameters>
- Enclosing class:
- SoInstanceParameter
public static enum SoInstanceParameter.PredefinedParameters extends java.lang.Enum<SoInstanceParameter.PredefinedParameters> implements IntegerValuedEnum
List of predefined per-instance attribute names. The names corresponding to the following enum symbols can be queried by mean of thegetPredefinedParameterName()method. They correspond to a set of predefined parameter names that are automatically managed/interpreted:- OivShapeInstanceTranslation: Handles an array of vec3f translation to apply to vertices of each instance.
- OivShapeInstanceScale: Handles an array of vec3f scale factor applied to vertices of each instance.
- OivShapeInstanceRotation: Handles an array of vec4f quaternion applied to vertices of each instance.
- OivShapeInstanceColor: Handles an array of vec3f color applied to vertices of each instance.
- OivShapeInstanceTransparency: Handles an array of float transparency applied to vertices of each instance.
- OivShapeInstanceVisibility: Handles an array of int32 visibility flag to apply to each instance.
OivShapeInstanceTranslation, OivShapeInstanceScale and OivShapeInstanceRotation are combined together to create an equivalent matrix available in GLSL shaders with the function
If no parameters are present then an identity matrix is returned.mat4 OivInstanceMatrix() OivShapeInstanceColor and OivShapeInstanceTransparency affect, respectively, the diffuse color and the transparency of each instance. Note that when one of these parameters is defined, it overrides the diffuse color or the transparency value of a
SoMaterialnode.OivShapeInstanceVisibility affects the visibility of each instance (i.e. 0 means hidden and a value greater than zero means visible). This attribute is available in GLSL shaders with the function
.int OivInstanceVisibility()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COLORNUM_PREDEFINED_PARAMETERSROTATIONSCALETRANSLATIONTRANSPARENCYVISIBILITY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetValue()Returns the integer value of the enum constant.static SoInstanceParameter.PredefinedParametersvalueOf(int val)Returns the enum constant of this type with the specified integer valuestatic SoInstanceParameter.PredefinedParametersvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static SoInstanceParameter.PredefinedParameters[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TRANSLATION
public static final SoInstanceParameter.PredefinedParameters TRANSLATION
-
ROTATION
public static final SoInstanceParameter.PredefinedParameters ROTATION
-
SCALE
public static final SoInstanceParameter.PredefinedParameters SCALE
-
VISIBILITY
public static final SoInstanceParameter.PredefinedParameters VISIBILITY
-
COLOR
public static final SoInstanceParameter.PredefinedParameters COLOR
-
TRANSPARENCY
public static final SoInstanceParameter.PredefinedParameters TRANSPARENCY
-
NUM_PREDEFINED_PARAMETERS
public static final SoInstanceParameter.PredefinedParameters NUM_PREDEFINED_PARAMETERS
-
-
Method Detail
-
values
public static SoInstanceParameter.PredefinedParameters[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SoInstanceParameter.PredefinedParameters c : SoInstanceParameter.PredefinedParameters.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SoInstanceParameter.PredefinedParameters valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
valueOf
public static SoInstanceParameter.PredefinedParameters valueOf(int val)
Returns the enum constant of this type with the specified integer value- Returns:
- the enum constant of this type with the specified integer value.
-
getValue
public int getValue()
Description copied from interface:IntegerValuedEnumReturns the integer value of the enum constant.- Specified by:
getValuein interfaceIntegerValuedEnum- Returns:
- the integer value of the enum constant.
-
-