Class RendererConstant

  • All Implemented Interfaces:
    java.io.Serializable

    public class RendererConstant
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Field Detail

      • ms_pkTypeMap

        private static java.util.HashMap<java.lang.String,​RendererConstant.Type> ms_pkTypeMap
        For a lookup of the renderer constant type from its string name.
      • m_iBaseRegister

        private int m_iBaseRegister
        Base register (nonnegative)
      • m_iRegisterQuantity

        private int m_iRegisterQuantity
        Register quantity (maximum of 4)
      • m_iNumFloats

        private int m_iNumFloats
        Number of floats in the renderer constant.
      • m_afData

        private float[] m_afData
        Data (maximum storage, avoid dynamic allocation)
    • Constructor Detail

      • RendererConstant

        public RendererConstant​(RendererConstant.Type eType,
                                int iBaseRegister,
                                int iRegisterQuantity,
                                int iNumFloats)
        Construction and destruction. The base register must be nonnegative. The register quantity is between 1 and 4. Each register represents four floating-point values.
        Parameters:
        eType - type of RendererConstant
        iBaseRegister - base register (nonnegative)
        iRegisterQuantity - (values between 1-4)
        iNumFloats - the numbr of floats in the renderer constant.
    • Method Detail

      • GetName

        public static final java.lang.String GetName​(RendererConstant.Type eType)
        Mappings between enums and strings.
        Parameters:
        eType - RendererConstant type
        Returns:
        String name of the RendererConstant type
      • GetType

        public static RendererConstant.Type GetType​(java.lang.String rkName)
        Mappings between enums and strings.
        Parameters:
        rkName - String name of the RendererConstant type
        Returns:
        RendererConstant type
      • dispose

        public void dispose()
        Delete memory.
      • GetBaseRegister

        public final int GetBaseRegister()
        Member access. The renderer will use these to set the registers with the appropriate values.
        Returns:
        base register value.
      • GetData

        public final float[] GetData()
        Member access. The renderer will use these to set the registers with the appropriate values.
        Returns:
        RendererConstant data values.
      • GetNumFloats

        public final int GetNumFloats()
        Returns the number of floats in this renderer constant
        Returns:
        the number of floats in this renderer constant.
      • GetRegisterQuantity

        public final int GetRegisterQuantity()
        Member access. The renderer will use these to set the registers with the appropriate values.
        Returns:
        base register quantity.
      • GetType

        public final RendererConstant.Type GetType()
        Member access. The renderer will use these to set the registers with the appropriate values.
        Returns:
        RendererConstant type.