com.yobotics.simulationconstructionset
Class Link

java.lang.Object
  extended by com.yobotics.simulationconstructionset.Link
All Implemented Interfaces:
java.io.Serializable

public class Link
extends java.lang.Object
implements java.io.Serializable

Title: Yobotics! Simulation Construction Set

Description: Package for Simulating Dynamic Robots and Mechanisms

Copyright: Copyright (c) Yobotics, Inc. 2000-2005

Version:
1.0
Author:
Jerry Pratt
See Also:
Serialized Form

Field Summary
static int X
          Integer representation of the x axis
static int Y
          Integer representation of the y axis
static int Z
          Integer representation of the z axis
 
Constructor Summary
Link(LinkDefinitionFixedFrame linkDefinition)
           
Link(java.lang.String lname)
          Basic constructor, creates a new link with the specified name.
 
Method Summary
 void add3DSFile(java.lang.String fileName)
          Deprecated. Replaced by add3DSFile
 void add3DSFile(java.lang.String fileName, javax.media.j3d.Appearance app)
          Deprecated. Replaced by add3DSFile
 void add3DSFile(java.net.URL fileURL)
          Deprecated. Replaced by add3DSFile
 void add3DSFile(java.net.URL fileURL, javax.media.j3d.Appearance app)
          Deprecated. Replaced by add3DSFile
 void addArcTorus(double startAngle, double endAngle, double majorRadius, double minorRadius)
          Deprecated. Replaced by addArcTorus
 void addArcTorus(double startAngle, double endAngle, double majorRadius, double minorRadius, javax.media.j3d.Appearance arcTorusApp)
          Deprecated. Replaced by addArcTorus
 void addBranchGroup(javax.media.j3d.BranchGroup branchGroup)
          Deprecated. Replaced by addBranchGroup
 void addCone(double height, double radius)
          Deprecated. Replaced by addCone
 void addCone(double height, double radius, javax.media.j3d.Appearance coneApp)
          Deprecated. Replaced by addCone
 void addCoordinateSystem(double length)
          Deprecated. Replaced by addCoordinateSystem
 void addCoordinateSystemToCOM(double length)
          Adds a coordinate system representation at the center of mass of this link.
 void addCube(double lx, double ly, double lz)
          Deprecated. Replaced by addCube
 void addCube(double lx, double ly, double lz, javax.media.j3d.Appearance cubeApp)
          Deprecated. Replaced by addCube
 void addCylinder(double height, double radius)
          Deprecated. Replaced by addCylinder
 void addCylinder(double height, double radius, javax.media.j3d.Appearance cylApp)
          Deprecated. Replaced by addCylinder
 void addEllipsoid(double xRad, double yRad, double zRad)
          Deprecated. Replaced by addEllipsoid
 void addEllipsoid(double xRad, double yRad, double zRad, javax.media.j3d.Appearance ellipsoidApp)
          Deprecated. Replaced by addEllipsoid
 void addEllipsoidFromMassProperties()
          Adds an ellipsoid representing the mass and inertia of the link at its center of mass.
 void addEllipsoidFromMassProperties(javax.media.j3d.Appearance appearance)
          Adds an ellipsoid representing the mass and inertia of the link at its center of mass with the specified appearance.
 void addGenTruncatedCone(double height, double bx, double by, double tx, double ty)
          Deprecated. Replaced by addGenTruncatedCone
 void addGenTruncatedCone(double height, double bx, double by, double tx, double ty, javax.media.j3d.Appearance coneApp)
          Deprecated. Replaced by addGenTruncatedCone
 void addGroup(javax.media.j3d.Group group)
          Deprecated. Replaced by addGroup
 void addHemiEllipsoid(double xRad, double yRad, double zRad)
          Deprecated. Replaced by addHemiEllipsoid
 void addHemiEllipsoid(double xRad, double yRad, double zRad, javax.media.j3d.Appearance hEApp)
          Deprecated. Replaced by addHemiEllipsoid
 void addPyramidCube(double lx, double ly, double lz, double lh)
          Deprecated. Replaced by addPyramidCube
 void addPyramidCube(double lx, double ly, double lz, double lh, javax.media.j3d.Appearance cubeApp)
          Deprecated. Replaced by addPyramidCube
 void addShape(javax.media.j3d.Geometry geometry, javax.media.j3d.Appearance appearance)
          Deprecated. Replaced by addShape
 void addShape(javax.media.j3d.Shape3D shape)
          Deprecated. Replaced by addShape
 void addSphere(double radius)
          Deprecated. Replaced by addSphere
 void addSphere(double radius, javax.media.j3d.Appearance sphereApp)
          Deprecated. Replaced by addSphere
 void addToCollisionGroup(CollisionGroup collisionGroup)
          Adds this Link to a CollisionGroup to enable collision detection inside that group or amoung groups.
 void addToCollisionGroups(CollisionGroup[] collisionGroups)
          Adds this Link to all the CollisionGroups listed to enable collision detection inside that group or amoung groups.
 void addVRMLFile(java.lang.String fileName)
          Deprecated. Replaced by addVRMLFile
 void addVRMLFile(java.lang.String fileName, javax.media.j3d.Appearance app)
          Deprecated. Replaced by addVRMLFile
 void addVRMLFile(java.net.URL fileURL)
          Deprecated. Replaced by addVRMLFile
 void addVRMLFile(java.net.URL fileURL, javax.media.j3d.Appearance app)
          Deprecated. Replaced by addVRMLFile
 void addWedge(double lx, double ly, double lz)
          Deprecated. Replaced by addWedge
 void addWedge(double lx, double ly, double lz, javax.media.j3d.Appearance wedgeApp)
          Deprecated. Replaced by addWedge
 void combineLinks(Link link)
          Combines the specified link with this link.
 void enableCollisions(double maxVelocity, vclip.PolyTree polyTree, Robot rob)
          Enables collisions for this link.
 void getComOffset(javax.vecmath.Vector3d comOffsetRet)
          Stores a vector3d representation of the offset from the links center of mass in the provided variable.
 LinkGraphics getLinkGraphics()
          Retrieves the LinkGraphics object representing this link.
 double getMass()
          Retrieves the mass of this joint.
 void getMomentOfInertia(javax.vecmath.Matrix3d momentOfInertia)
          Retrieves the moment of inertia for this link.
 java.lang.String getName()
          Retrieves this link's name.
 javax.media.j3d.SharedGroup getSharedGroup()
          Deprecated. Replaced by getSharedGroup
 void identity()
          Deprecated. Replaced by (identity
 void rotate(double rotAng, int rotAxis)
          Deprecated. Replaced by rotate
 void rotate(double rotAng, javax.vecmath.Vector3d rotAxis)
          Deprecated. LinkGraphics#rotate(double, Vector3d
 void rotate(javax.vecmath.Matrix3d rot)
          Deprecated. Replaced by rotate
 void scale(double scaleFactor)
          Deprecated. Replaced by scale
 void scale(javax.vecmath.Vector3d scaleFactors)
          Deprecated. Replaced by scale
 void setComOffset(double xOffset, double yOffset, double zOffset)
          Sets the offset from the inbound joint to this links center of mass.
 void setComOffset(javax.vecmath.Vector3d comOffset)
          Sets the offset from the inbound joint ot this links center of mass.
 void setLinkGraphics(LinkGraphics linkGraphics)
          Sets the graphical representation of this link to the provided LinkGraphics.
 void setMass(double mass)
          Sets the mass of this joint.
 void setMassAndRadiiOfGyration(double mass, double radiusOfGyrationX, double radiusOfGyrationY, double radiusOfGyrationZ)
          Sets the mass and moment of inertia of this link.
 void setMomentOfInertia(double Ixx, double Iyy, double Izz)
          Sets the moment of inertia for this link.
 void setMomentOfInertia(javax.vecmath.Matrix3d momentOfInertia)
          Sets the moment of inertia for this link.
 java.lang.String toString()
          Returns a string representation of this link.
 void translate(double tx, double ty, double tz)
          Deprecated. Replaced by translate
 void translate(javax.vecmath.Vector3d translation)
          Deprecated. Replaced by translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

X

public static final int X
Integer representation of the x axis

See Also:
Constant Field Values

Y

public static final int Y
Integer representation of the y axis

See Also:
Constant Field Values

Z

public static final int Z
Integer representation of the z axis

See Also:
Constant Field Values
Constructor Detail

Link

public Link(LinkDefinitionFixedFrame linkDefinition)

Link

public Link(java.lang.String lname)
Basic constructor, creates a new link with the specified name.

Parameters:
lname - Name for this link.
Method Detail

getName

public java.lang.String getName()
Retrieves this link's name.

Returns:
Name of this link.

toString

public java.lang.String toString()
Returns a string representation of this link.
The following is an example of its format:

       Link: <Link Name>
          Mass: <Link Mass>
          COM Offset: <Center of Mass offset>
          Moment of Inertia: 
 m00, m01, m02
 m10, m11, m12
 m20, m21, m22

Overrides:
toString in class java.lang.Object
Returns:
String representation of this link.

combineLinks

public void combineLinks(Link link)
Combines the specified link with this link. This combines their mass, calculates the resulting center of mass, and the new overall inertia of the combined link.

Parameters:
link - Link to be combined with this link.

setMass

public void setMass(double mass)
Sets the mass of this joint. All masses are in kilograms.

Parameters:
mass - New joint mass.

getMass

public double getMass()
Retrieves the mass of this joint. All masses are in kilograms.

Returns:
The mass of this joint.

setMomentOfInertia

public void setMomentOfInertia(double Ixx,
                               double Iyy,
                               double Izz)
Sets the moment of inertia for this link. This is stored as a matrix with the values Ixx, Iyy and Izz representing the positions m00, m11 and m22 respectively.

Ixx 0 0
0 Iyy 0
0 0 Izz
Inertias are represented in units of kg*m^2

Parameters:
Ixx - double
Iyy - double
Izz - double

setMassAndRadiiOfGyration

public void setMassAndRadiiOfGyration(double mass,
                                      double radiusOfGyrationX,
                                      double radiusOfGyrationY,
                                      double radiusOfGyrationZ)
Sets the mass and moment of inertia of this link. The moments of inertia are computed as Ixx = mass * (radiusOfGyrationY * radiusOfGyrationY + radiusOfGyrationZ * radiusOfGyrationY), etc. This is equivalent to the mass being concentrated on the surface of a thin ellipsoid with the given radii of gyration.

Parameters:
mass - Mass of the link.
radiusOfGyrationX - Radius of gyration in the x direction.
radiusOfGyrationY - Radius of gyration in the y direction.
radiusOfGyrationZ - Radius of gyration in the z direction.

setMomentOfInertia

public void setMomentOfInertia(javax.vecmath.Matrix3d momentOfInertia)
Sets the moment of inertia for this link. Inertias are represented in units of kg*m^2

Parameters:
momentOfInertia - Matrix3d representing the moment of inertia

getMomentOfInertia

public void getMomentOfInertia(javax.vecmath.Matrix3d momentOfInertia)
Retrieves the moment of inertia for this link. Inertias are represented in units of kg*m^2

Parameters:
momentOfInertia - Matrix3d representation of the moment of inertia.

setComOffset

public void setComOffset(double xOffset,
                         double yOffset,
                         double zOffset)
Sets the offset from the inbound joint to this links center of mass. The inbound joint is usually the parent to the link in question. This defaults to 0,0,0 and must be specified prior to simulation if accurate results are desired.

Parameters:
xOffset - Offset in the x direction.
yOffset - Offset in the y direction.
zOffset - Offset in the z direction.

setComOffset

public void setComOffset(javax.vecmath.Vector3d comOffset)
Sets the offset from the inbound joint ot this links center of mass.

Parameters:
comOffset - Vector3d representing the offset.

getComOffset

public void getComOffset(javax.vecmath.Vector3d comOffsetRet)
Stores a vector3d representation of the offset from the links center of mass in the provided variable.

Parameters:
comOffsetRet - Vector3d in which the offset will be stored.

setLinkGraphics

public void setLinkGraphics(LinkGraphics linkGraphics)
Sets the graphical representation of this link to the provided LinkGraphics. LinkGraphics store the graphical data for each link allowing different shapes and features to be created and stored.

Parameters:
linkGraphics - LinkGraphics to be used for this link.

getLinkGraphics

public LinkGraphics getLinkGraphics()
Retrieves the LinkGraphics object representing this link.

Returns:
LinkGraphics representing the graphical properties of this link.

translate

public void translate(double tx,
                      double ty,
                      double tz)
Deprecated. Replaced by translate

Translates from the current position by the specified distances in linkGraphics. This should be invoked directly on the LinkGraphics component.

Parameters:
tx - distance translated in the x direction
ty - distance translated in the y direction
tz - distance translated in the z direction

translate

public void translate(javax.vecmath.Vector3d translation)
Deprecated. Replaced by translate

Translates from the current position by the specified distances. This should be invoked directly on the LinkGraphics component.

Parameters:
translation - Vector3d distance to translate.

rotate

public void rotate(double rotAng,
                   int rotAxis)
Deprecated. Replaced by rotate

Rotates the coordinate system counter clockwise around the specified axis by the given angle in radians. This should be invoked directly on the LinkGraphics component.

Parameters:
rotAng - the angle to rotate around the specified axis in radians.
rotAxis - Axis around which to rotate. Either Link.X, Link.Y or Link.Z

rotate

public void rotate(double rotAng,
                   javax.vecmath.Vector3d rotAxis)
Deprecated. LinkGraphics#rotate(double, Vector3d

Rotates the coordinate system counter clockwise around the specified axis by the given angle in radians. This should be invoked directly on the LinkGraphics component.

Parameters:
rotAng - the angle to rotate around the given axis in radians.
rotAxis - Vector3d describing the axis of rotation

rotate

public void rotate(javax.vecmath.Matrix3d rot)
Deprecated. Replaced by rotate

Rotates the coordinate system as described by the given rotation matrix. This should be invoked directly on the LinkGraphics component.

Parameters:
rot - Matrix3d describing the rotation.

scale

public void scale(double scaleFactor)
Deprecated. Replaced by scale

Scales the coordinate system by the specified factor. This should be invoked directly on the LinkGraphics component.

Parameters:
scaleFactor - Factor to scale by. This scales in all three dimensions, for example, .5 would be half the size 2 would be twice.

scale

public void scale(javax.vecmath.Vector3d scaleFactors)
Deprecated. Replaced by scale

Scales the coordinate system by the specified factor in each direction. This should be invoked directly on the LinkGraphics component.

Parameters:
scaleFactors - Vector3d describing the scale factors for each axis.

identity

public void identity()
Deprecated. Replaced by (identity

This function resets the coordinate system back to the joint origin. Should only be invoked directly on the LinkGraphics component.


addShape

public void addShape(javax.media.j3d.Geometry geometry,
                     javax.media.j3d.Appearance appearance)
Deprecated. Replaced by addShape

Adds the specified shape at the center of the current coordinate system. This should be invoked directly on the LinkGraphcis component.

Parameters:
geometry - Geometry to be added, see YoGeometry
appearance - Appearance given to the geometry, see YoAppearance

addShape

public void addShape(javax.media.j3d.Shape3D shape)
Deprecated. Replaced by addShape

Adds the specified shape at the origin of the current coordinate system. Should be invoked directly on the LinkGraphics component.

Parameters:
shape - Shape3D to be added.

addBranchGroup

public void addBranchGroup(javax.media.j3d.BranchGroup branchGroup)
Deprecated. Replaced by addBranchGroup

Adds the specified BranchGroup to the graphics component of this link. This should be invoked directly on the LinkGraphics component. For more information on BranchGroups see the Java3d API.

Parameters:
branchGroup - BranchGroup to be added.

addGroup

public void addGroup(javax.media.j3d.Group group)
Deprecated. Replaced by addGroup

Adds the specified Group to the graphics component of this link. This should be invoked directly on the LinkGraphics component. For further information on Groups see the Java3d API.

Parameters:
group - Group to be added.

addVRMLFile

public void addVRMLFile(java.net.URL fileURL)
Deprecated. Replaced by addVRMLFile

Adds the specified VRML file to the graphical component of this link. This should be invoked directly on the LinkGraphics component.

Parameters:
fileURL - URL pointing to the desired file.

addVRMLFile

public void addVRMLFile(java.net.URL fileURL,
                        javax.media.j3d.Appearance app)
Deprecated. Replaced by addVRMLFile

Adds the specified VRML file using the given appearance to the graphical component of this link. This should be invoked directly on the LinkGraphics component.

Parameters:
fileURL - URL pointing to the desired file.
app - Appearance to be used with the imported file. See YoAppearance for implementations.

addVRMLFile

public void addVRMLFile(java.lang.String fileName,
                        javax.media.j3d.Appearance app)
Deprecated. Replaced by addVRMLFile

Adds the specified VRML file using the given appearance to the graphical component of this link. This should be invoked directly on the LinkGraphics component.

Parameters:
fileName - Path name of the desired VRML file.
app - Appearance to be used with the imported file. See YoAppearance for implementations.

addVRMLFile

public void addVRMLFile(java.lang.String fileName)
Deprecated. Replaced by addVRMLFile

Adds the specified VRML file to the graphical component of this link. This should be invoked directly on the LinkGraphics component.

Parameters:
fileName - Path name of the desired VRML file.

add3DSFile

public void add3DSFile(java.net.URL fileURL)
Deprecated. Replaced by add3DSFile

Adds the specified 3DS Max file to the center of the current coordinate system with a default appearance. 3DS Max is a 3D modeling program that allows the creation of detailed models and animations. This function only imports the model allowing the use of more complicated and detailed system representations in simulations. This should be invoked directly on the LinkGraphics component.

Parameters:
fileURL - URL pointing to the desired 3ds file.

add3DSFile

public void add3DSFile(java.net.URL fileURL,
                       javax.media.j3d.Appearance app)
Deprecated. Replaced by add3DSFile

Adds a 3DS Max file to the center of the current coordinate system with the specified appearance. 3DS Max is a 3D modeling program that allows the creation of detailed models and animations. This function only imports the model allowing the use of more complicated and detailed system representations in simulations. This should be invoked directly on the LinkGraphics component.

Parameters:
fileURL - URL pointing to the desired file.
app - Appearance to be used with the imported file. See YoAppearance for implementations.

add3DSFile

public void add3DSFile(java.lang.String fileName)
Deprecated. Replaced by add3DSFile

Adds a 3DS Max file to the center of the current coordinate system with a default appearance. 3DS Max is a 3D modeling program that allows the creation of detailed models and animations. This function only imports the model allowing the use of more complicated and detailed system representations in simulations. This should be invoked directly on the LinkGraphics component.

Parameters:
fileName - Path name of the desired 3ds file.

add3DSFile

public void add3DSFile(java.lang.String fileName,
                       javax.media.j3d.Appearance app)
Deprecated. Replaced by add3DSFile

Adds a 3DS Max file to the center of the current coordinate system with a default appearance. 3DS Max is a 3D modeling program that allows the creation of detailed models and animations. This function only imports the model allowing the use of more complicated and detailed system representations in simulations. This should be invoked directly on the LinkGraphics component.

Parameters:
fileName - Path name of the desired 3ds file.
app - Appearance to be used with the imported file. See YoAppearance for implementations.

addCoordinateSystem

public void addCoordinateSystem(double length)
Deprecated. Replaced by addCoordinateSystem

Creates a graphical representation of the x, y, and z axis of the current coordinate system centered at its origin. This should be invoked directly on the LinkGraphics component.

Parameters:
length - Length in meters of each arm on the coordinate system.

addCube

public void addCube(double lx,
                    double ly,
                    double lz)
Deprecated. Replaced by addCube

Adds a cube with the given dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction.
ly - length in the y direction.
lz - height.

addCube

public void addCube(double lx,
                    double ly,
                    double lz,
                    javax.media.j3d.Appearance cubeApp)
Deprecated. Replaced by addCube

Adds a cube with the given dimensions and specified appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction.
ly - length in the y direction.
lz - height.
cubeApp - Appearance to be used with the new cube. See YoAppearance for implementations.

addWedge

public void addWedge(double lx,
                     double ly,
                     double lz)
Deprecated. Replaced by addWedge

Adds a wedge with the given dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction.
ly - length in the y direction.
lz - height.

addWedge

public void addWedge(double lx,
                     double ly,
                     double lz,
                     javax.media.j3d.Appearance wedgeApp)
Deprecated. Replaced by addWedge

Adds a wedge with the given dimensions and specified appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction.
ly - length in the y direction.
lz - height.
wedgeApp - Appearance to be used with the new wedge. See YoAppearance for implementations.

addSphere

public void addSphere(double radius)
Deprecated. Replaced by addSphere

Adds a sphere with the given dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
radius - radius in meters of the new sphere.

addSphere

public void addSphere(double radius,
                      javax.media.j3d.Appearance sphereApp)
Deprecated. Replaced by addSphere

Adds a sphere with the given dimensions and specified appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction.
ly - length in the y direction.
lz - height.
radius - radius in meters of the new sphere.
sphereApp - Appearance to be used with the new sphere. See YoAppearance for implementations.

addEllipsoid

public void addEllipsoid(double xRad,
                         double yRad,
                         double zRad)
Deprecated. Replaced by addEllipsoid

Adds an ellipsoid with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
xRad - radius in the x direction
yRad - radius in the y direction
zRad - radius in the z direction.

addEllipsoid

public void addEllipsoid(double xRad,
                         double yRad,
                         double zRad,
                         javax.media.j3d.Appearance ellipsoidApp)
Deprecated. Replaced by addEllipsoid

Adds an ellipsoid with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
xRad - radius in the x direction
yRad - radius in the y direction
zRad - radius in the y direction
ellipsoidApp - Appearance to be used with the new ellipsoid. See YoAppearance for implementations.

addCylinder

public void addCylinder(double height,
                        double radius)
Deprecated. Replaced by addCylinder

Adds a cylinder with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - height in meters of the cylinder.
radius - height in meters of the cylinder.

addCylinder

public void addCylinder(double height,
                        double radius,
                        javax.media.j3d.Appearance cylApp)
Deprecated. Replaced by addCylinder

Adds a cylinder with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - height in meters of the cylinder.
radius - height in meters of the cylinder.
cylApp - Appearance to be used with the new cylinder. See YoAppearance for implementations.

addCone

public void addCone(double height,
                    double radius)
Deprecated. Replaced by addCone

Adds a cone with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - radius in meters at the base
radius - height in meters to the peak

addCone

public void addCone(double height,
                    double radius,
                    javax.media.j3d.Appearance coneApp)
Deprecated. Replaced by addCone

Adds a cone with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - radius in meters at the base
radius - height in meters to the peak
coneApp - Appearance to be used with the new cone. See YoAppearance for implementations.

addGenTruncatedCone

public void addGenTruncatedCone(double height,
                                double bx,
                                double by,
                                double tx,
                                double ty)
Deprecated. Replaced by addGenTruncatedCone

Adds a truncated cone with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - distance in meters from the base to the top
bx - radius of the base in the x direction
by - radius of the base in the y direction
tx - radius of the top in the x direction
ty - radius of the top in the y direction

addGenTruncatedCone

public void addGenTruncatedCone(double height,
                                double bx,
                                double by,
                                double tx,
                                double ty,
                                javax.media.j3d.Appearance coneApp)
Deprecated. Replaced by addGenTruncatedCone

Adds a truncated cone with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
height - distance in meters from the base to the top
bx - radius of the base in the x direction
by - radius of the base in the y direction
tx - radius of the top in the x direction
ty - radius of the top in the y direction
coneApp - Appearance to be used with the new truncated cone. See YoAppearance for implementations.

addHemiEllipsoid

public void addHemiEllipsoid(double xRad,
                             double yRad,
                             double zRad)
Deprecated. Replaced by addHemiEllipsoid

Adds a hemi ellipsoid with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
xRad - radius in the x direction
yRad - radius in the y direction
zRad - radius in the z direction

addHemiEllipsoid

public void addHemiEllipsoid(double xRad,
                             double yRad,
                             double zRad,
                             javax.media.j3d.Appearance hEApp)
Deprecated. Replaced by addHemiEllipsoid

Adds a hemi ellipsoid with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
xRad - radius in the x direction
yRad - radius in the y direction
zRad - radius in the z direction
hEApp - Appearance to be used with the new hemi ellipsoid. See YoAppearance for implementations.

addArcTorus

public void addArcTorus(double startAngle,
                        double endAngle,
                        double majorRadius,
                        double minorRadius)
Deprecated. Replaced by addArcTorus

Adds an arc torus with the specified dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
startAngle - angle from which the torus begins.
endAngle - angle at which the torus ends.
majorRadius - radius from the origin to the center of the torus.
minorRadius - radius of the toroid.

addArcTorus

public void addArcTorus(double startAngle,
                        double endAngle,
                        double majorRadius,
                        double minorRadius,
                        javax.media.j3d.Appearance arcTorusApp)
Deprecated. Replaced by addArcTorus

Adds an arc torus with the specified dimensions and appearance at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
startAngle - angle from which the torus begins.
endAngle - angle at which the torus ends.
majorRadius - radius from the origin to the center of the torus.
minorRadius - radius of the toroid.
arcTorusApp - Appearance to be used with the new arc torus. See YoAppearance for implementations.

addPyramidCube

public void addPyramidCube(double lx,
                           double ly,
                           double lz,
                           double lh)
Deprecated. Replaced by addPyramidCube

Adds a pyramid cube with the given dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction
ly - length in the y direction
lz - length in the z direction
lh - height of the pyramid portion

addPyramidCube

public void addPyramidCube(double lx,
                           double ly,
                           double lz,
                           double lh,
                           javax.media.j3d.Appearance cubeApp)
Deprecated. Replaced by addPyramidCube

Adds a pyramid cube with the given dimensions at the center of the current coordinate system. This should be invoked directly on the LinkGraphics component.

Parameters:
lx - length in the x direction
ly - length in the y direction
lz - length in the z direction
lh - height of the pyramid portion
cubeApp - Appearance to be used with the new pyramid cube. See YoAppearance for implementations.

getSharedGroup

public javax.media.j3d.SharedGroup getSharedGroup()
Deprecated. Replaced by getSharedGroup

This method retrieves the SharedGroup for the graphical component of this link. The SharedGroup contains all graphical components of the link used in rendering. This should be invoked directly on the LinkGraphics component.

Returns:
SharedGroup for this link.

enableCollisions

public void enableCollisions(double maxVelocity,
                             vclip.PolyTree polyTree,
                             Robot rob)
Enables collisions for this link.

Parameters:
maxVelocity - Maximum velocity of any point on the link. Used for improving collision detection performance.
polyTree - PolyTree defining collision geometry.

addToCollisionGroup

public void addToCollisionGroup(CollisionGroup collisionGroup)
Adds this Link to a CollisionGroup to enable collision detection inside that group or amoung groups.

Parameters:
collisionGroup - CollisionGroup to add this Link to.

addToCollisionGroups

public void addToCollisionGroups(CollisionGroup[] collisionGroups)
Adds this Link to all the CollisionGroups listed to enable collision detection inside that group or amoung groups.

Parameters:
collisionGroups - CollisionGroup array to add this Link to.

addEllipsoidFromMassProperties

public void addEllipsoidFromMassProperties()
Adds an ellipsoid representing the mass and inertia of the link at its center of mass. This ellipsoid has a default matte black appearance.


addCoordinateSystemToCOM

public void addCoordinateSystemToCOM(double length)
Adds a coordinate system representation at the center of mass of this link. The axis of this system have the given length.

Parameters:
length - length in meters of each arm/axis on the coordinate system.

addEllipsoidFromMassProperties

public void addEllipsoidFromMassProperties(javax.media.j3d.Appearance appearance)
Adds an ellipsoid representing the mass and inertia of the link at its center of mass with the specified appearance.

Parameters:
appearance - Appearance to be used with the ellipsoid. See YoAppearance for implementations.