jET
1.0beta1


org.jet.tracks
Class Switch

java.lang.Object
  |
  +--org.jet.tracks.Track
        |
        +--org.jet.tracks.Switch
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Switch
extends Track

Switch entity.

See Also:
Serialized Form

Field Summary
protected  javax.vecmath.Point3d node3
          End point of reversible track.
protected  double radiusSwitched
          Radius of reversible track.
protected  double roll3
          Roll at end point of reversible track.
protected  double rollSwitched
          Roll at start point of reversible track.
static java.lang.String SWITCH_SECOND_TEXTURE_DEFAULT
           
static java.lang.String SWITCH_TEXTURE_DEFAULT
           
protected  javax.vecmath.Vector3d vec3
          Vector mounted at end point of reversible track to start point of track.
protected  javax.vecmath.Vector3d vecSwitched
          Vector mounted at start point to the reversible track.
 
Fields inherited from class org.jet.tracks.Track
BANK, BRIDGE, CANYON, damage, enviroment, FLAT, friction, length, MOUNTAINS, name, node1, node2, quality, radius, ROLL, roll1, roll2, SECOND_TEXTURE_DEFAULT, secondTexture, tapDistance, texHeight, texSlope, texture, TEXTURE_DEFAULT, textureLength, texWidth, TUNNEL, vec1, vec2, VECTOR_ZERO, visibility, width
 
Constructor Summary
Switch()
          Dummy constructor.
 
Method Summary
 java.lang.Object clone()
          Performs bit-by-bit copy of the switch.
 boolean equals(java.lang.Object o)
          Test if two switches are equal.
 javax.vecmath.Point3d getPoint3()
          Gets end point of switch.
 double getRoll3()
          Gets the roll at end point of reversible track.
 double getSwitchedRadius()
          Gets radius of reversible track.
 double getSwitchedRoll()
          Gets the roll at start point of reversible track.
 javax.vecmath.Vector3d getSwitchedVector()
          Gets the vector mounted at start point to the end of reversible track.
 javax.vecmath.Vector3d getVector3()
          Gets the vector mounted at the end of reversible track.
 boolean isSideStraight()
          Returns true if the side track is straight.
 void setPoint3(double[] array)
          Sets the end point of the reversible track of switch.
 void setPoint3(double x, double y, double z)
          Sets the end point of the reversible track of switch.
 void setPoint3(javax.vecmath.Point3d p)
          Sets the end point of the reversible track of switch.
 void setRoll3(double d)
          Sets the roll at end pointof reversible track.
 void setSwitchedRadius(double d)
          Sets radius of reversible track.
 void setSwitchedRoll(double d)
          Sets the roll at start point of reversible track.
 void setSwitchedVector(double[] array)
          Sets the vector mounted at start point to the end of reversible track.
 void setSwitchedVector(double x, double y, double z)
          Sets the vector mounted at start point to the end of reversible track.
 void setSwitchedVector(javax.vecmath.Vector3d v)
          Sets the vector mounted at start point to the end of reversible track.
 void setVector3(double[] array)
          Sets the vector mounted at the end of reversible track.
 void setVector3(double x, double y, double z)
          Sets the vector mounted at the end of reversible track.
 void setVector3(javax.vecmath.Vector3d v)
          Sets the vector mounted at the end of reversible track.
 java.lang.String toString()
          Gets description.
 
Methods inherited from class org.jet.tracks.Track
getDamage, getEnviroment, getFriction, getIncline, getLength, getName, getPoint1, getPoint2, getQuality, getRadius, getRoll1, getRoll2, getSecondTexture, getTap, getTexture, getTextureHeight, getTextureLength, getTextureSlope, getTextureWidth, getVector1, getVector2, getWidth, isStraight, isVisible, setDamage, setEnviroment, setFriction, setLength, setName, setPoint1, setPoint1, setPoint1, setPoint2, setPoint2, setPoint2, setQuality, setRadius, setRoll1, setRoll2, setSecondTexture, setTap, setTexture, setTextureHeight, setTextureLength, setTextureSlope, setTextureWidth, setVector1, setVector1, setVector1, setVector2, setVector2, setVector2, setVisible, setWidth
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SWITCH_TEXTURE_DEFAULT

public static final java.lang.String SWITCH_TEXTURE_DEFAULT
See Also:
Constant Field Values

SWITCH_SECOND_TEXTURE_DEFAULT

public static final java.lang.String SWITCH_SECOND_TEXTURE_DEFAULT
See Also:
Constant Field Values

node3

protected javax.vecmath.Point3d node3
End point of reversible track.


vecSwitched

protected javax.vecmath.Vector3d vecSwitched
Vector mounted at start point to the reversible track.


vec3

protected javax.vecmath.Vector3d vec3
Vector mounted at end point of reversible track to start point of track.


rollSwitched

protected double rollSwitched
Roll at start point of reversible track.


roll3

protected double roll3
Roll at end point of reversible track.


radiusSwitched

protected double radiusSwitched
Radius of reversible track.

Constructor Detail

Switch

public Switch()
Dummy constructor.

Method Detail

getPoint3

public javax.vecmath.Point3d getPoint3()
Gets end point of switch.


setPoint3

public void setPoint3(javax.vecmath.Point3d p)
Sets the end point of the reversible track of switch.


setPoint3

public void setPoint3(double x,
                      double y,
                      double z)
Sets the end point of the reversible track of switch.


setPoint3

public void setPoint3(double[] array)
Sets the end point of the reversible track of switch.


getSwitchedVector

public javax.vecmath.Vector3d getSwitchedVector()
Gets the vector mounted at start point to the end of reversible track.


setSwitchedVector

public void setSwitchedVector(javax.vecmath.Vector3d v)
Sets the vector mounted at start point to the end of reversible track.


setSwitchedVector

public void setSwitchedVector(double x,
                              double y,
                              double z)
Sets the vector mounted at start point to the end of reversible track.


setSwitchedVector

public void setSwitchedVector(double[] array)
Sets the vector mounted at start point to the end of reversible track.


getVector3

public javax.vecmath.Vector3d getVector3()
Gets the vector mounted at the end of reversible track.


setVector3

public void setVector3(javax.vecmath.Vector3d v)
Sets the vector mounted at the end of reversible track.


setVector3

public void setVector3(double x,
                       double y,
                       double z)
Sets the vector mounted at the end of reversible track.


setVector3

public void setVector3(double[] array)
Sets the vector mounted at the end of reversible track.


getSwitchedRoll

public double getSwitchedRoll()
Gets the roll at start point of reversible track.


setSwitchedRoll

public void setSwitchedRoll(double d)
Sets the roll at start point of reversible track.


getRoll3

public double getRoll3()
Gets the roll at end point of reversible track.


setRoll3

public void setRoll3(double d)
Sets the roll at end pointof reversible track.


getSwitchedRadius

public double getSwitchedRadius()
Gets radius of reversible track.


setSwitchedRadius

public void setSwitchedRadius(double d)
Sets radius of reversible track.


equals

public boolean equals(java.lang.Object o)
Test if two switches are equal.

Overrides:
equals in class Track
Parameters:
o - Object to check.
Returns:
True if they are.

toString

public java.lang.String toString()
Gets description.

Overrides:
toString in class Track

clone

public java.lang.Object clone()
Performs bit-by-bit copy of the switch. It does not copy name.

Overrides:
clone in class Track

isSideStraight

public boolean isSideStraight()
Returns true if the side track is straight.


jET
1.0beta1