us.ihmc.utilities.math.geometry
Class FrameBox3d

java.lang.Object
  extended by us.ihmc.utilities.math.geometry.FrameBox3d
All Implemented Interfaces:
FrameShape3d, ReferenceFrameHolder

public class FrameBox3d
extends java.lang.Object
implements FrameShape3d


Constructor Summary
FrameBox3d(FrameBox3d other)
           
FrameBox3d(ReferenceFrame referenceFrame)
           
FrameBox3d(ReferenceFrame referenceFrame, Box3d box3d)
           
FrameBox3d(ReferenceFrame referenceFrame, double lengthX, double widthY, double heightZ)
           
FrameBox3d(ReferenceFrame referenceFrame, javax.media.j3d.Transform3D configuration, double lengthX, double widthY, double heightZ)
           
 
Method Summary
 void applyTransform(javax.media.j3d.Transform3D transformation)
          Apply the given transform to translate and rotate this shape.
 FrameBox3d applyTransformCopy(javax.media.j3d.Transform3D transform3D)
          Create a copy of this shape, then apply the given transform to translate and rotate the copy.
 void changeFrame(ReferenceFrame desiredFrame)
           
 FrameBox3d changeFrameCopy(ReferenceFrame desiredFrame)
           
 void checkReferenceFrameMatch(ReferenceFrame frame)
           
 void checkReferenceFrameMatch(ReferenceFrameHolder referenceFrameHolder)
           
 void computeVertices(javax.vecmath.Point3d[] vertices)
           
 double distance(FramePoint point)
          Find the distance from the closest point on this shape to the given point.
 Box3d getBox3d()
           
 FramePoint getCenter()
           
 void getCenter(FramePoint pointToPack)
           
 FramePoint getCenterCopy()
           
 void getClosestPointAndNormalAt(FramePoint intersectionToPack, FrameVector normalToPack, FramePoint pointToCheck)
          Find the closest point on the surface of this shape to the given point as well as the surface normal at that point.
 double getDimension(Direction direction)
           
 FramePlane3d getFace(Box3d.FaceName faceName)
           
 ReferenceFrame getReferenceFrame()
           
 void getRotation(javax.vecmath.Matrix3d rotationMatrixToPack)
           
 javax.vecmath.Matrix3d getRotationCopy()
           
 void getTransform(javax.media.j3d.Transform3D transformToPack)
           
 javax.media.j3d.Transform3D getTransformCopy()
           
 boolean isInsideOrOnSurface(FramePoint pointToTest)
          Determine whether the given point is on or inside the surface of this shape.
 boolean isInsideOrOnSurface(FramePoint pointToTest, double epsilon)
          Determine whether the given point is on or inside the surface of this shape, within a given tolerance or error level.
 void orthogonalProjection(FramePoint point)
          Find the closest point on the surface of this shape to the given point.
 FramePoint orthogonalProjectionCopy(FramePoint point)
          Find the closest point on the surface of this shape to the given point.
 void packFramePose(FramePose framePoseToPack)
           
 void scale(double scale)
           
 void setAndChangeFrame(FrameBox3d other)
           
 void setTransform(javax.media.j3d.Transform3D transform3D)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameBox3d

public FrameBox3d(FrameBox3d other)

FrameBox3d

public FrameBox3d(ReferenceFrame referenceFrame)

FrameBox3d

public FrameBox3d(ReferenceFrame referenceFrame,
                  Box3d box3d)

FrameBox3d

public FrameBox3d(ReferenceFrame referenceFrame,
                  javax.media.j3d.Transform3D configuration,
                  double lengthX,
                  double widthY,
                  double heightZ)

FrameBox3d

public FrameBox3d(ReferenceFrame referenceFrame,
                  double lengthX,
                  double widthY,
                  double heightZ)
Method Detail

getBox3d

public Box3d getBox3d()

getCenter

public FramePoint getCenter()

getCenter

public void getCenter(FramePoint pointToPack)

getCenterCopy

public FramePoint getCenterCopy()

getDimension

public double getDimension(Direction direction)

getTransform

public void getTransform(javax.media.j3d.Transform3D transformToPack)

getTransformCopy

public javax.media.j3d.Transform3D getTransformCopy()

getRotation

public void getRotation(javax.vecmath.Matrix3d rotationMatrixToPack)

getRotationCopy

public javax.vecmath.Matrix3d getRotationCopy()

getFace

public FramePlane3d getFace(Box3d.FaceName faceName)

setTransform

public void setTransform(javax.media.j3d.Transform3D transform3D)

checkReferenceFrameMatch

public void checkReferenceFrameMatch(ReferenceFrameHolder referenceFrameHolder)
                              throws ReferenceFrameMismatchException
Specified by:
checkReferenceFrameMatch in interface ReferenceFrameHolder
Throws:
ReferenceFrameMismatchException

checkReferenceFrameMatch

public void checkReferenceFrameMatch(ReferenceFrame frame)
                              throws ReferenceFrameMismatchException
Specified by:
checkReferenceFrameMatch in interface ReferenceFrameHolder
Throws:
ReferenceFrameMismatchException

getReferenceFrame

public ReferenceFrame getReferenceFrame()
Specified by:
getReferenceFrame in interface ReferenceFrameHolder

changeFrameCopy

public FrameBox3d changeFrameCopy(ReferenceFrame desiredFrame)
Specified by:
changeFrameCopy in interface ReferenceFrameHolder

changeFrame

public void changeFrame(ReferenceFrame desiredFrame)

distance

public double distance(FramePoint point)
Description copied from interface: FrameShape3d
Find the distance from the closest point on this shape to the given point.

Specified by:
distance in interface FrameShape3d
Returns:

orthogonalProjectionCopy

public FramePoint orthogonalProjectionCopy(FramePoint point)
Description copied from interface: FrameShape3d
Find the closest point on the surface of this shape to the given point. If the given point is on or inside the shape, then it returned unchanged.

Specified by:
orthogonalProjectionCopy in interface FrameShape3d
Returns:
a new point on surface of the shape

orthogonalProjection

public void orthogonalProjection(FramePoint point)
Description copied from interface: FrameShape3d
Find the closest point on the surface of this shape to the given point. If the given point is on or inside the shape, then it is not changed.

Specified by:
orthogonalProjection in interface FrameShape3d
Parameters:
point - both an input parameter (the point to check), and an output parameter (packed with the resulting ortho point).

applyTransformCopy

public FrameBox3d applyTransformCopy(javax.media.j3d.Transform3D transform3D)
Description copied from interface: FrameShape3d
Create a copy of this shape, then apply the given transform to translate and rotate the copy.

Specified by:
applyTransformCopy in interface FrameShape3d
Returns:

applyTransform

public void applyTransform(javax.media.j3d.Transform3D transformation)
Description copied from interface: FrameShape3d
Apply the given transform to translate and rotate this shape.

Specified by:
applyTransform in interface FrameShape3d

isInsideOrOnSurface

public boolean isInsideOrOnSurface(FramePoint pointToTest)
Description copied from interface: FrameShape3d
Determine whether the given point is on or inside the surface of this shape.

Specified by:
isInsideOrOnSurface in interface FrameShape3d
Returns:

isInsideOrOnSurface

public boolean isInsideOrOnSurface(FramePoint pointToTest,
                                   double epsilon)
Description copied from interface: FrameShape3d
Determine whether the given point is on or inside the surface of this shape, within a given tolerance or error level.

Specified by:
isInsideOrOnSurface in interface FrameShape3d
Returns:

getClosestPointAndNormalAt

public void getClosestPointAndNormalAt(FramePoint intersectionToPack,
                                       FrameVector normalToPack,
                                       FramePoint pointToCheck)
Description copied from interface: FrameShape3d
Find the closest point on the surface of this shape to the given point as well as the surface normal at that point.

Specified by:
getClosestPointAndNormalAt in interface FrameShape3d
Parameters:
intersectionToPack - out parameter packed with the resulting closest point on the shape
normalToPack - out parameter packed with the resulting normal vector

setAndChangeFrame

public void setAndChangeFrame(FrameBox3d other)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

packFramePose

public void packFramePose(FramePose framePoseToPack)

scale

public void scale(double scale)

computeVertices

public void computeVertices(javax.vecmath.Point3d[] vertices)