Class SoTexture3EnabledElement


  • public class SoTexture3EnabledElement
    extends SoReplacedTextureElement
    Enables/disables 3D textures. This element enables/disables 3D textures. This is implemented as a separate element from the TextureImage3Element so the texture image can be changed without invalidating caches containing shapes shapes need to know if texturing is going on or not so they can decide to send down texture coordinates or not.

    This element is set by the GLTextureImage3Element and the GLTextureEnabledElement. The interaction between the three elements is a little complicated. Each of the other two elements always sets up the GL texture state appropriately, however, texturing is only enabled if both elements agree that it should be enabled (they check each other's value before calling set).

    This element cannot be overridden, but, since the elements that set it check each other's value, overriding those elements has the same effect.

    See Also:
    SoTexture3
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void disableForShapeCache​(SoState state, int unit, boolean disable)
      Specify that a texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
      static boolean get​(SoState state)
      Calls get(state, (int)0).
      static boolean get​(SoState state, int unit)
      Used by shapes to figure out if they need to send texture coordinates.
      static int getClassStackIndex()
      Deprecated.
      As of Open Inventor 9.3.0.0.
      static boolean getDefault()
      By default there is not texture.
      static boolean isDisabledForShapeCache​(SoState state, int unit)
      Return if that texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
      void pop​(SoState state, SoElement prevTopElement)
      Overrides pop() method so side effects can occur in GL.
      void push​(SoState state)
      Overrides push() so we can remember previous elements value and avoid making GL calls if this element has the same value.
      static void set​(SoState state, boolean value)
      Calls set(state, value, (com.openinventor.inventor.nodes.SoNode)null).
      static void set​(SoState state, boolean value, SoNode node)
      Used by Texture3ImageElement, set to true when a non-null image is set, set to false when there is no 3D texture image (the default).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • set

        public static void set​(SoState state,
                               boolean value)
        Calls set(state, value, (com.openinventor.inventor.nodes.SoNode)null).
      • get

        public static boolean get​(SoState state)
        Calls get(state, (int)0).
      • set

        public static void set​(SoState state,
                               boolean value,
                               SoNode node)
        Used by Texture3ImageElement, set to true when a non-null image is set, set to false when there is no 3D texture image (the default).
      • 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. ] *
      • push

        public void push​(SoState state)
        Overrides push() so we can remember previous elements value and avoid making GL calls if this element has the same value.
        Overrides:
        push in class SoReplacedTextureElement
      • disableForShapeCache

        public static void disableForShapeCache​(SoState state,
                                                int unit,
                                                boolean disable)
        Specify that a texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
      • isDisabledForShapeCache

        public static boolean isDisabledForShapeCache​(SoState state,
                                                      int unit)
        Return if that texture unit is not used by any shape, so we don't have to invalidate cache when this texture is enable/disable/modified.
      • get

        public static boolean get​(SoState state,
                                  int unit)
        Used by shapes to figure out if they need to send texture coordinates.
      • getDefault

        public static boolean getDefault()
        By default there is not texture.