Aviatrix3D
2.1.0

org.j3d.aviatrix3d
Class Layer

java.lang.Object
  extended by org.j3d.aviatrix3d.SceneGraphObject
      extended by org.j3d.aviatrix3d.Layer
All Implemented Interfaces:
Cullable, LayerCullable
Direct Known Subclasses:
CompositeLayer, CompositeLayer2D, SimpleLayer, SimpleLayer2D

public abstract class Layer
extends SceneGraphObject
implements LayerCullable

An abstract layer definition that can be applied at the root of the scene graph.

A layer is a composite of objects that are applied in a sequential manner to the given surface. Between each layer the depth buffer is cleared and a new rendering is applied directly over the top of the previous. Colour buffers or other buffers are not cleared.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Field Summary
static int COMPOSITE
          The layer is a composite type, having many viewports defined
static int COMPOSITE_2D
          The layer is a 2D type, having only 2D rendering used and a many viewports defined.
protected  int layerType
          The layer type constant
static int SIMPLE
          The layer is a simple type, having single 3D viewport defined
static int SIMPLE_2D
          The layer is a 2D type, having only 2D rendering used and a single viewport is defined.
 
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler
 
Constructor Summary
protected Layer(int type)
          Construct a new layer of the given type.
 
Method Summary
 int compareTo(Layer layer)
          Compares this object with the specified object for order.
 boolean equals(Layer layer)
          Compares this object with the specified object to check for equivalence.
 boolean equals(java.lang.Object o)
          Compare this object for equality to the given object.
 LayerCullable getCullable(int buffer)
          Get the cullable corresponding to the given internal buffer ID.
 int getType()
          Get the type that this layer represents
 
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject
checkForCyclicChild, checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setLive, setUpdateHandler, setUserData
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.LayerCullable
getCullableViewport, numCullableChildren
 

Field Detail

SIMPLE

public static final int SIMPLE
The layer is a simple type, having single 3D viewport defined

See Also:
Constant Field Values

COMPOSITE

public static final int COMPOSITE
The layer is a composite type, having many viewports defined

See Also:
Constant Field Values

SIMPLE_2D

public static final int SIMPLE_2D
The layer is a 2D type, having only 2D rendering used and a single viewport is defined.

See Also:
Constant Field Values

COMPOSITE_2D

public static final int COMPOSITE_2D
The layer is a 2D type, having only 2D rendering used and a many viewports defined.

See Also:
Constant Field Values

layerType

protected final int layerType
The layer type constant

Constructor Detail

Layer

protected Layer(int type)
Construct a new layer of the given type. One of the standard types may be used, or a custom type.

Parameters:
type - The type constant for this layer
Method Detail

equals

public boolean equals(java.lang.Object o)
Compare this object for equality to the given object.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object to be compared
Returns:
True if these represent the same values

getCullable

public LayerCullable getCullable(int buffer)
Get the cullable corresponding to the given internal buffer ID. This should never be called by user code. It's the method that the rendering pipeline uses to interface between the primary scene graph and the internal multithreaded representation.

Parameters:
buffer - The ID of the buffer to fetch the cullable for
Returns:
The corresponding culling representation

getType

public int getType()
Get the type that this layer represents

Returns:
A layer type descriptor

compareTo

public int compareTo(Layer layer)
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 instances should override this to add texture-specific extensions.

Parameters:
layer - The layer instance to be compared
Returns:
-1, 0 or 1 depending on order

equals

public boolean equals(Layer layer)
Compares this object with the specified object to check for equivalence.

Parameters:
layer - The layer instance to be compared
Returns:
true if the objects represent identical values

Aviatrix3D
2.1.0

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