j3d.org Aviatrix3D

org.j3d.aviatrix3d
Class LightDetails

java.lang.Object
  extended byorg.j3d.aviatrix3d.LightDetails

public class LightDetails
extends java.lang.Object

Class for passing the detailed rendering information about a light source. through the pipeline.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Constructor Summary
LightDetails()
          Construct a default instance with just the transform initialised
 
Method Summary
 int compareTo(LightDetails ld)
          Compares this object with the specified object for order.
 int compareTo(java.lang.Object o)
          Compares this object with the specified object for order.
 boolean equals(java.lang.Object o)
          Compare the given details to this one to see if they are equal.
 Light getLight()
          Get the current light instance in use.
 float[] getTransform()
          Return the current transform array.
 int hashCode()
          Calculate the hashcode for this object.
 void update(Light l, float[] tx)
          Update the details with a new set of values.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightDetails

public LightDetails()
Construct a default instance with just the transform initialised

Method Detail

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Derived classes should extend this one to add the extra comparisons needed.

Parameters:
o - The object to be compared
Returns:
-1, 0 or 1 depending on order
Throws:
java.lang.ClassCastException - The specified object's type prevents it from being compared to this Object

equals

public boolean equals(java.lang.Object o)
Compare the given details to this one to see if they are equal. Equality is defined as pointing to the same light source, with the same transformation value.

Parameters:
o - The object to compare against
Returns:
true if these represent identical objects

hashCode

public int hashCode()
Calculate the hashcode for this object.


update

public void update(Light l,
                   float[] tx)
Update the details with a new set of values.

Parameters:
l - The light instance to be used
tx - The transform array to copy

getTransform

public float[] getTransform()
Return the current transform array. Don't play with the return value.

Returns:
The current transform matrix array

getLight

public Light getLight()
Get the current light instance in use.

Returns:
A reference to the current light

compareTo

public int compareTo(LightDetails ld)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Parameters:
ld - The details to be compared
Returns:
-1, 0 or 1 depending on order

j3d.org Aviatrix3D

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - j3d.org