Class Turtle3D

java.lang.Object
  extended byTurtle3D

public class Turtle3D
extends java.lang.Object


Constructor Summary
Turtle3D()
          Creates a new instance of Turtle3D
Turtle3D(double x, double y, double z)
          Creates a new instance of Turtle3D
Turtle3D(double x, double y, double z, double alpha, float length, float width)
          Creates a new instance of Turtle3D
 
Method Summary
 javax.vecmath.AxisAngle4d createRotationAxisAngle()
          method to create the rotation of the object given a specific axis-angle The axis and the angle of rotation are derived from the cross product of the current vector heading and the required direction vector
 void decreaseLength(double decLen)
           
 void decreaseWidth(double decWidth)
           
 double getAlpha()
           
 javax.vecmath.Vector3d getH()
           
 double getHeadingX()
           
 double getHeadingY()
           
 double getHeadingZ()
           
 javax.vecmath.Vector3d getL()
           
 double getLeftX()
           
 double getLeftY()
           
 double getLeftZ()
           
 float getLength()
           
 float getTempWidth()
           
 javax.vecmath.Vector3d getU()
           
 double getUpX()
           
 double getUpY()
           
 double getUpZ()
           
 float getWidth()
           
 double getX()
          Set of accessor methods Used to get turtle values
 double getY()
           
 double getZ()
           
 void pitchDownL()
          method to pitch the heading of the turtle down
 void pitchUpL()
          the same as for pitchDownL but the head is turn upwards
 void rollLeftH()
          method to roll the turtle to the left
 void rollRightH()
          the same as rollRigthH but the turtle turns to the right
 void rotateToVertical()
          method to move the turtle heading to the horizontal position
 void setAlpha(double alpha)
           
 void setH(javax.vecmath.Vector3d H)
           
 void setHLU(javax.vecmath.Vector3d H, javax.vecmath.Vector3d L, javax.vecmath.Vector3d U)
           
 void setL(javax.vecmath.Vector3d L)
           
 void setLength(float length)
           
 void setNewPosition()
          Set of mutator methods that change the orientation of the turtle method to move the turtle position to the next position The method calculates the next position by myltiplying the unit vector by the length of the segment
 void setTempWidth(float tempWidth)
           
 void setU(javax.vecmath.Vector3d U)
           
 void setWidth(float width)
           
 void setX(double x)
          Set of mutator methods used to change turtle values
 void setXYZ(double x, double y, double z)
           
 void setY(double y)
           
 void setZ(double z)
           
 void turnAroundU()
          method to turn the turtle around the u-axis by 180
 void turnLeftU()
          method to rotate the turtle heading to the left
 void turnRightU()
          this is the same as the turnLeftU method by the heading turns right
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Turtle3D

public Turtle3D()
Creates a new instance of Turtle3D


Turtle3D

public Turtle3D(double x,
                double y,
                double z)
Creates a new instance of Turtle3D


Turtle3D

public Turtle3D(double x,
                double y,
                double z,
                double alpha,
                float length,
                float width)
Creates a new instance of Turtle3D

Method Detail

createRotationAxisAngle

public javax.vecmath.AxisAngle4d createRotationAxisAngle()
method to create the rotation of the object given a specific axis-angle The axis and the angle of rotation are derived from the cross product of the current vector heading and the required direction vector


decreaseLength

public void decreaseLength(double decLen)
Parameters:
decLen - the amount to decrease the length

decreaseWidth

public void decreaseWidth(double decWidth)

getAlpha

public double getAlpha()

getH

public javax.vecmath.Vector3d getH()

getHeadingX

public double getHeadingX()

getHeadingY

public double getHeadingY()

getHeadingZ

public double getHeadingZ()

getL

public javax.vecmath.Vector3d getL()

getLeftX

public double getLeftX()

getLeftY

public double getLeftY()

getLeftZ

public double getLeftZ()

getLength

public float getLength()

getTempWidth

public float getTempWidth()

getU

public javax.vecmath.Vector3d getU()

getUpX

public double getUpX()

getUpY

public double getUpY()

getUpZ

public double getUpZ()

getWidth

public float getWidth()

getX

public double getX()
Set of accessor methods Used to get turtle values


getY

public double getY()

getZ

public double getZ()

pitchDownL

public void pitchDownL()
method to pitch the heading of the turtle down


pitchUpL

public void pitchUpL()
the same as for pitchDownL but the head is turn upwards


rollLeftH

public void rollLeftH()
method to roll the turtle to the left


rollRightH

public void rollRightH()
the same as rollRigthH but the turtle turns to the right


rotateToVertical

public void rotateToVertical()
method to move the turtle heading to the horizontal position


setAlpha

public void setAlpha(double alpha)
Parameters:
alpha - the direction angle of the turtle

setH

public void setH(javax.vecmath.Vector3d H)
Parameters:
H - the heading vector

setHLU

public void setHLU(javax.vecmath.Vector3d H,
                   javax.vecmath.Vector3d L,
                   javax.vecmath.Vector3d U)
Parameters:
H - the heading vector
L - the left vector
U - the up vector

setL

public void setL(javax.vecmath.Vector3d L)
Parameters:
L - the left vector

setLength

public void setLength(float length)
Parameters:
length - the length of the section to draw

setNewPosition

public void setNewPosition()
Set of mutator methods that change the orientation of the turtle method to move the turtle position to the next position The method calculates the next position by myltiplying the unit vector by the length of the segment


setTempWidth

public void setTempWidth(float tempWidth)
Parameters:
tempWidth - the temporal width used in parametric strings to create sections that have a smoothly decreasing width

setU

public void setU(javax.vecmath.Vector3d U)
Parameters:
U - the up vector

setWidth

public void setWidth(float width)
Parameters:
width - the width of the section to draw

setX

public void setX(double x)
Set of mutator methods used to change turtle values

Parameters:
x - the x-coordinate of the turtle

setXYZ

public void setXYZ(double x,
                   double y,
                   double z)
Parameters:
x - the x-coordinate of the turtle
y - the y-coordinate of the turtle
z - the z-coordinate of the turtle

setY

public void setY(double y)
Parameters:
y - the y-coordinate of the turtle

setZ

public void setZ(double z)
Parameters:
z - the z-coordinate of the turtle

turnAroundU

public void turnAroundU()
method to turn the turtle around the u-axis by 180


turnLeftU

public void turnLeftU()
method to rotate the turtle heading to the left


turnRightU

public void turnRightU()
this is the same as the turnLeftU method by the heading turns right