Class SoShapeStyleElement


  • public class SoShapeStyleElement
    extends SoElement
    Stores some information used by shapes. This elements stores some information shapes need to quickly determine whether or not they should render, and, if they should render, how they should render. Specifically, it stores:

    NeedNormals: true if lighting is on
    NeedTangents: true if lighting is on
    NeedTexCoords: true if texturing and texcoords not generated by GL
    MightNotRender: true if:

    • bounding box complexity
    • invisible drawstyle
    • render abort callback registered

    • Method Detail

      • setTextureFunction

        public static void setTextureFunction​(SoState state,
                                              boolean value)
        Calls setTextureFunction(state, value, (int)0).
      • needTexCoords

        public boolean needTexCoords()
        Calls needTexCoords((int)0).
      • setTexture3Enabled

        public static void setTexture3Enabled​(SoState state,
                                              boolean value)
        Calls setTexture3Enabled(state, value, (int)0).
      • setTextureEnabled

        public static void setTextureEnabled​(SoState state,
                                             boolean value)
        Calls setTextureEnabled(state, value, (int)0).
      • needTexCoords3

        public boolean needTexCoords3()
        Calls needTexCoords3((int)0).
      • pop

        public void pop​(SoState state,
                        SoElement prevTopElement)
        Pops element. Allows for side effects to occur. Default methods do nothing.
        Overrides:
        pop in class SoElement
      • setTextureFunction

        public static void setTextureFunction​(SoState state,
                                              boolean value,
                                              int unit)
        API used by other elements.
      • getClassStackIndex

        @Deprecated
        public static int getClassStackIndex()
        Deprecated.
        As of Open Inventor 9300. replaced by SoElement.getClassStackIndex(Class)
        Returns the stack id for this element. ] *
      • setLightModel

        public static void setLightModel​(SoState state,
                                         int value)
        API used by other elements.
      • setTextureEnabled

        public static void setTextureEnabled​(SoState state,
                                             boolean value,
                                             int unit)
        API used by other elements.
      • setOverrides

        public static void setOverrides​(SoState state,
                                        boolean value)
        Set value is true if either diffuse, transparency, or materialbinding are overridden; otherwise false.
      • push

        public void push​(SoState state)
        Pushes element. Allows for side effects to occur. Default methods do nothing.
        Overrides:
        push in class SoElement
      • mightNotRender

        public boolean mightNotRender()
        Returns true if shapes may not render for some reason.
      • setTransparencyType

        public static void setTransparencyType​(SoState state,
                                               int value)
        API used by other elements.
      • needTexCoords

        public boolean needTexCoords​(int unit)
        Returns true if need texture coordinates.
      • needTangents

        public boolean needTangents()
        Returns true if need tangents.
      • needNormals

        public boolean needNormals()
        Returns true if need normals.
      • setTexture3Enabled

        public static void setTexture3Enabled​(SoState state,
                                              boolean value,
                                              int unit)
        API used by other elements.
      • getRenderCaseMask

        public int getRenderCaseMask()
        Returns a mask that can be used by the SoVertexPropertyCache class (see SoVertexProperty.h for the SoRenderInfo class) to quickly mask out the normal or texture coordinate cases if normals or texture coordinates aren't needed.
      • setDrawStyle

        public static void setDrawStyle​(SoState state,
                                        int value)
        API used by other elements.
      • setComplexityType

        public static void setComplexityType​(SoState state,
                                             int value)
        API used by other elements.
      • needTexCoords3

        public boolean needTexCoords3​(int unit)
        Returns true if need 3D texture coordinates.