us.ihmc.utilities.math.geometry
Class FrameEllipsoid3d

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

public class FrameEllipsoid3d
extends java.lang.Object
implements FrameShape3d


Constructor Summary
FrameEllipsoid3d(FrameEllipsoid3d other)
           
FrameEllipsoid3d(ReferenceFrame referenceFrame, double xRadius, double yRadius, double zRadius)
           
FrameEllipsoid3d(ReferenceFrame referenceFrame, double xRadius, double yRadius, double zRadius, javax.media.j3d.Transform3D transform)
           
FrameEllipsoid3d(ReferenceFrame referenceFrame, Ellipsoid3d ellipsoid)
           
 
Method Summary
 void applyTransform(javax.media.j3d.Transform3D transform)
          Apply the given transform to translate and rotate this shape.
 FrameShape3d applyTransformCopy(javax.media.j3d.Transform3D transform)
          Create a copy of this shape, then apply the given transform to translate and rotate the copy.
 void changeFrame(ReferenceFrame desiredFrame)
           
 ReferenceFrameHolder changeFrameCopy(ReferenceFrame desiredFrame)
           
 void checkReferenceFrameMatch(ReferenceFrame frame)
           
 void checkReferenceFrameMatch(ReferenceFrameHolder referenceFrameHolder)
           
 double distance(FramePoint point)
          Find the distance from the closest point on this shape to the given point.
 void getClosestPointAndNormalAt(FramePoint closestPointToPack, FrameVector normalToPack, FramePoint pointInWorldToCheck)
          Find the closest point on the surface of this shape to the given point as well as the surface normal at that point.
 Ellipsoid3d getEllipsoid3d()
           
 ReferenceFrame getReferenceFrame()
           
 boolean isInsideOrOnSurface(FramePoint pointToCheck)
          Determine whether the given point is on or inside the surface of this shape.
 boolean isInsideOrOnSurface(FramePoint pointToCheck, 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 pointToCheckAndPack)
          Find the closest point on the surface of this shape to the given point.
 FramePoint orthogonalProjectionCopy(FramePoint pointToCheck)
          Find the closest point on the surface of this shape to the given point.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrameEllipsoid3d

public FrameEllipsoid3d(FrameEllipsoid3d other)

FrameEllipsoid3d

public FrameEllipsoid3d(ReferenceFrame referenceFrame,
                        Ellipsoid3d ellipsoid)

FrameEllipsoid3d

public FrameEllipsoid3d(ReferenceFrame referenceFrame,
                        double xRadius,
                        double yRadius,
                        double zRadius,
                        javax.media.j3d.Transform3D transform)

FrameEllipsoid3d

public FrameEllipsoid3d(ReferenceFrame referenceFrame,
                        double xRadius,
                        double yRadius,
                        double zRadius)
Method Detail

getEllipsoid3d

public Ellipsoid3d getEllipsoid3d()

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

changeFrame

public void changeFrame(ReferenceFrame desiredFrame)

applyTransform

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

Specified by:
applyTransform in interface FrameShape3d

applyTransformCopy

public FrameShape3d applyTransformCopy(javax.media.j3d.Transform3D transform)
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:

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:

getClosestPointAndNormalAt

public void getClosestPointAndNormalAt(FramePoint closestPointToPack,
                                       FrameVector normalToPack,
                                       FramePoint pointInWorldToCheck)
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:
closestPointToPack - out parameter packed with the resulting closest point on the shape
normalToPack - out parameter packed with the resulting normal vector

isInsideOrOnSurface

public boolean isInsideOrOnSurface(FramePoint pointToCheck)
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 pointToCheck,
                                   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:

orthogonalProjection

public void orthogonalProjection(FramePoint pointToCheckAndPack)
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:
pointToCheckAndPack - both an input parameter (the point to check), and an output parameter (packed with the resulting ortho point).

orthogonalProjectionCopy

public FramePoint orthogonalProjectionCopy(FramePoint pointToCheck)
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

changeFrameCopy

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