construction
Class RoundStair

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

public class RoundStair
extends javax.media.j3d.Group

Erstellt eine runde 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
RoundStair()
          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 innerRadius, float outerRadius, float angle, float stepHeight, int stepCount, 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

RoundStair

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

Method Detail

set

public void set(float innerRadius,
                float outerRadius,
                float angle,
                float stepHeight,
                int stepCount,
                float startHeight)
         throws java.lang.IllegalArgumentException
Erstellt die Geometrie der Treppe

Parameters:
innerRadius - Der innere Radius der Treppe.
outerRadius - Der äußere Radius der Treppe.
angle - Der Winkel, welchen die Treppe aufspannen soll. Muss zwischen -2 * Pi und +2 * Pi liegen.
stepHeight - Höhe einer einzelnen Stufe.
stepCount - Anzahl der Stufen.
startHeight - Starthöhe der untersten Stufe.
Throws:
java.lang.IllegalArgumentException - Wenn der Winkel außerhalb des gültigen Bereichs liegt, oder wenn der äußere Radius kleiner als der innere ist.

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)