construction
Class LinearStair

java.lang.Object
  extended byjavax.media.j3d.SceneGraphObject
      extended byjavax.media.j3d.Node
          extended byjavax.media.j3d.Group
              extended byconstruction.LinearStair

public class LinearStair
extends javax.media.j3d.Group

Erstellt eine gerade Treppe.

Version:
0.9 (2005/01/31)
Author:
Martin Hedler

Field Summary
 
Fields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
LinearStair()
          Erstellt ein Objekt dieser Klasse, jedoch ohne Geometrie.
 
Method Summary
 javax.media.j3d.Node cloneNode(boolean arg0)
           
 void duplicateNode(javax.media.j3d.Node arg0, boolean arg1)
           
 Block getBlock(int index)
          Gibt das Block Objekte an der Position index zurück.
 int numBlocks()
          Gibt die Anzahl der Stufen der Treppe zur¨ck.
 void set(float width, int stepCount, float stepHeight, float stepDeep, float startHeight)
          Erstellt die Geometrie der Treppe.
 void setTexture(javax.media.j3d.Texture[] texture)
          Setzt die Texturen, welche die Stufen bei ihrer Erstellung erhalten sollen.
 
Methods inherited from class javax.media.j3d.Group
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearStair

public LinearStair()
Erstellt ein Objekt dieser Klasse, jedoch ohne Geometrie. Diese muss mit der Methode set(float, int, float, float, float) erstellt werden.

Method Detail

set

public void set(float width,
                int stepCount,
                float stepHeight,
                float stepDeep,
                float startHeight)
Erstellt die Geometrie der Treppe.

Parameters:
width - Die Breite der Treppe.
stepCount - Die Anzahl der Stufen.
stepHeight - Die Höhe einer einzelnen Stufe.
stepDeep - Die Tiefe einer einzelnen Stufe.
startHeight - Die Starthöhe der untersten Stufe.

setTexture

public void setTexture(javax.media.j3d.Texture[] texture)
Setzt die Texturen, welche die Stufen bei ihrer Erstellung erhalten sollen.
Um für einzelne Stufen die Texturen zu setzen, muss auf das Block Objekt direkt zugegriffen werden. Siehe hierzu die Methode Block.setPlaneTexture(Texture[]).

Parameters:
texture - Array von Texturen. Die Anzahl der Texturen im Array bestimmt für was die Texturen verwendet werden:
  • Befindet sich nur eine Textur im Array, so wird die Textur für alle Wände, den Boden und die Decke verwendet.
  • Befinden sich zwei Texturen im Array, so wird die erste Textur für den Boden und die Decke verwendet und die zweite Textur für alle Wände.
  • Bei drei Texturen, wird die erste Textur für den Boden, die zweite Textur für die Decke und die dritte Textur für alle Wände verwendet.
Bei mehr als drei Texturen, findet der dritte Fall Anwendung und alle weiteren Texturen werden ignoriert.
See Also:
Block.setPlaneTexture(Texture[])

getBlock

public Block getBlock(int index)
Gibt das Block Objekte an der Position index zurück.

Returns:
Der Iterator, welcher die Block Objekte enthält.

numBlocks

public int numBlocks()
Gibt die Anzahl der Stufen der Treppe zur¨ck.

Returns:
Die Anzahl der Block Objekte.

cloneNode

public javax.media.j3d.Node cloneNode(boolean arg0)

duplicateNode

public void duplicateNode(javax.media.j3d.Node arg0,
                          boolean arg1)