Class VisibleSet

  • All Implemented Interfaces:
    java.io.Serializable

    public class VisibleSet
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      VisibleSet​(int iMaxQuantity, int iGrowBy)
      Construct a visible set with the maximum size and grow step.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void Clear()
      Clear the visible set.
      void dispose()
      Delete memory.
      int GetQuantity()
      Get the size of the set.
      VisibleObject[] GetVisible()
      Get the visible objects in the set.
      VisibleObject GetVisible​(int i)
      Get the visible object at the specified index.
      void Insert​(Spatial pkObject, Effect pkGlobalEffect)
      Creates a VisibleObject from the input and appends it to the end of the VisibleObject array.
      void Resize​(int iMaxQuantity, int iGrowBy)
      Resize based on the maximum quantity and the grow step size.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VS_DEFAULT_MAX_QUANTITY

        private static final int VS_DEFAULT_MAX_QUANTITY
        Default maximum set size.
        See Also:
        Constant Field Values
      • VS_DEFAULT_GROWBY

        private static final int VS_DEFAULT_GROWBY
        Default grow step size.
        See Also:
        Constant Field Values
      • m_iMaxQuantity

        private int m_iMaxQuantity
        Local maximum set size.
      • m_iGrowBy

        private int m_iGrowBy
        Local grow step size.
      • m_iQuantity

        private int m_iQuantity
        Current set size.
      • m_akVisible

        private VisibleObject[] m_akVisible
        Set of visible objects.
    • Constructor Detail

      • VisibleSet

        public VisibleSet​(int iMaxQuantity,
                          int iGrowBy)
        Construct a visible set with the maximum size and grow step.
        Parameters:
        iMaxQuantity - maximum size of the set.
        iGrowBy - the amount to grow the set when it reaches maximum size.
    • Method Detail

      • Clear

        public void Clear()
        Clear the visible set.
      • dispose

        public void dispose()
        Delete memory.
      • GetQuantity

        public final int GetQuantity()
        Get the size of the set.
        Returns:
        the size of the set.
      • GetVisible

        public final VisibleObject[] GetVisible()
        Get the visible objects in the set.
        Returns:
        the visible objects in the set.
      • GetVisible

        public VisibleObject GetVisible​(int i)
        Get the visible object at the specified index.
        Parameters:
        i - index.
        Returns:
        the visible object at the specified index.
      • Insert

        public void Insert​(Spatial pkObject,
                           Effect pkGlobalEffect)
        Creates a VisibleObject from the input and appends it to the end of the VisibleObject array.
        Parameters:
        pkObject - Spatial object to add.
        pkGlobalEffect - effect to add.
      • Resize

        public void Resize​(int iMaxQuantity,
                           int iGrowBy)
        Resize based on the maximum quantity and the grow step size.
        Parameters:
        iMaxQuantity - maximum size of the set.
        iGrowBy - the amount to grow the set when it reaches maximum size.