Class LightNode

    • Field Detail

      • m_spkLight

        protected Light m_spkLight
        light in this node.
    • Constructor Detail

      • LightNode

        public LightNode()
        Construction and destruction. The node's world translation is used as the light's location. The node's world rotation matrix is used for the light's coordinate axes. Column 0 of the world rotation matrix is the light's direction vector, column 1 of the world rotation matrix is the light's up vector, and column 2 of the world rotation matrix is the light's right vector. On construction, the node's local transformation is set to the light's current coordinate system. local translation = light location local rotation column 0 = light direction local rotation column 1 = light up local rotation column 2 = light right
      • LightNode

        public LightNode​(Light pkLight)
        Construction and destruction. The node's world translation is used as the light's location. The node's world rotation matrix is used for the light's coordinate axes. Column 0 of the world rotation matrix is the light's direction vector, column 1 of the world rotation matrix is the light's up vector, and column 2 of the world rotation matrix is the light's right vector. On construction, the node's local transformation is set to the light's current coordinate system. local translation = light location local rotation column 0 = light direction local rotation column 1 = light up local rotation column 2 = light right
        Parameters:
        pkLight - light to add to this node.
    • Method Detail

      • dispose

        public void dispose()
        Delete memory.
        Overrides:
        dispose in class Node
      • GetAllObjectsByName

        public void GetAllObjectsByName​(java.lang.String rkName,
                                        java.util.Vector<GraphicsObject> rkObjects)
        Writes all GraphicsObjects with the name that matches the input parameter, rkName into the Vector parameter rkObjects.
        Specified by:
        GetAllObjectsByName in interface NameIdInterface
        Overrides:
        GetAllObjectsByName in class Node
        Parameters:
        rkName - the name of the objects to return.
        rkObjects - a Vector of all objects with the matching name.
      • GetDiskUsed

        public int GetDiskUsed​(StreamVersion rkVersion)
        Returns the size of this object and it's children on disk for the current StreamVersion parameter.
        Specified by:
        GetDiskUsed in interface StreamInterface
        Overrides:
        GetDiskUsed in class Node
        Parameters:
        rkVersion - the current version of the Stream file being created.
        Returns:
        the size of this object on disk.
      • GetLight

        public final Light GetLight()
        Return light in this node.
        Returns:
        light in this node.
      • GetObjectByID

        public GraphicsObject GetObjectByID​(int uiID)
        Returns the GraphicsObject with the ID that matches the input parameter, uiID.
        Specified by:
        GetObjectByID in interface NameIdInterface
        Overrides:
        GetObjectByID in class Node
        Parameters:
        uiID - the ID of the object to return.
        Returns:
        the GraphicsObject that matches the input name.
      • GetObjectByName

        public GraphicsObject GetObjectByName​(java.lang.String rkName)
        Returns the GraphicsObject with the name that matches the input parameter, rkName.
        Specified by:
        GetObjectByName in interface NameIdInterface
        Overrides:
        GetObjectByName in class Node
        Parameters:
        rkName - the name of the object to return.
        Returns:
        the GraphicsObject that matches the input name.
      • Link

        public void Link​(Stream rkStream,
                         Stream.Link pkLink)
        Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.
        Specified by:
        Link in interface StreamInterface
        Overrides:
        Link in class Node
        Parameters:
        rkStream - the Stream where the child objects are stored.
        pkLink - the Link class from which the child object IDs are read.
      • Load

        public void Load​(Stream rkStream,
                         Stream.Link pkLink)
        Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.
        Specified by:
        Load in interface StreamInterface
        Overrides:
        Load in class Node
        Parameters:
        rkStream - the Stream from which this object is being read.
        pkLink - the Link class for storing the IDs of this object's children objects.
      • Register

        public boolean Register​(Stream rkStream)
        Registers this object with the input Stream parameter. All objects streamed to disk are registered with the Stream so that a unique list of objects is maintained.
        Specified by:
        Register in interface StreamInterface
        Overrides:
        Register in class Node
        Parameters:
        rkStream - the Stream where the child objects are stored.
        Returns:
        true if this object is registered, false if the object has already been registered.
      • Save

        public void Save​(Stream rkStream)
        Write this object and all it's children to the Stream.
        Specified by:
        Save in interface StreamInterface
        Overrides:
        Save in class Node
        Parameters:
        rkStream - the Stream where the child objects are stored.
      • SaveStrings

        public StringTree SaveStrings​(java.lang.String acTitle)
        Write this object into a StringTree for the scene-graph visualization.
        Specified by:
        SaveStrings in interface StreamInterface
        Overrides:
        SaveStrings in class Node
        Parameters:
        acTitle - the header for this object in the StringTree.
        Returns:
        StringTree containing a String-based representation of this object and it's children.
      • SetLight

        public void SetLight​(Light pkLight)
        When you set the light, the node's local transformation is set to the light's current current coordinate system. The node's world transformation is computed, and the light's coordinate system is set to use the node's world transformation.
        Parameters:
        pkLight - light to add to this node.
      • UpdateWorldData

        public void UpdateWorldData​(double dAppTime)
        geometric updates
        Overrides:
        UpdateWorldData in class Node
        Parameters:
        dAppTime - animation time step from application.