Enum 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 the getPredefinedParameterName() 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

     mat4 OivInstanceMatrix() 
    If no parameters are present then an identity matrix is returned.

    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 SoMaterial node.

    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() 
    .