com.kuka.nav.geometry
Class Circle

java.lang.Object
  extended by com.kuka.geometry.SpatialForm
      extended by com.kuka.nav.geometry.SpatialForm2D
          extended by com.kuka.nav.geometry.Circle

public class Circle
extends SpatialForm2D

Implements a circle as a spatial form. The sphere is defined with a radius and a frame in the center.


Constructor Summary
Circle(double radius)
          Creates a new circle instance with a given radius.
 
Method Summary
 boolean approxEquals(SpatialForm2D other, double epsilon)
          Compares this form with another form and permits a degree of inaccuracy.
 boolean equals(Object obj)
           
 com.kuka.geometry.Frame getCenter()
          Gets the center frame of the sphere.
 double getRadius()
          Gets the radius.
 int hashCode()
           
 void setRadius(double radius)
          Sets the radius.
 
Methods inherited from class com.kuka.nav.geometry.SpatialForm2D
getName, setName
 
Methods inherited from class com.kuka.geometry.SpatialForm
createFrame, getOwnerObject, getReferenceFrame, setOwnerObject, setReferenceFrame
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Circle

public Circle(double radius)
Creates a new circle instance with a given radius. The reference frame is the center of the sphere.

Parameters:
radius - radius of the sphere
Method Detail

getRadius

public double getRadius()
Gets the radius.

Returns:
radius of the sphere

setRadius

public void setRadius(double radius)
Sets the radius.

Parameters:
radius - radius of the sphere

getCenter

public com.kuka.geometry.Frame getCenter()
Gets the center frame of the sphere.

Returns:
center frame

hashCode

public int hashCode()
Overrides:
hashCode in class SpatialForm2D

equals

public boolean equals(Object obj)
Overrides:
equals in class SpatialForm2D

approxEquals

public boolean approxEquals(SpatialForm2D other,
                            double epsilon)
Description copied from class: SpatialForm2D
Compares this form with another form and permits a degree of inaccuracy.

Specified by:
approxEquals in class SpatialForm2D
Parameters:
other - another form
epsilon - the maximum envelope that coordinates can differ to still be considered equal
Returns:
true if the other form is of the same shape type and its parameters are within the epsilon envelope of this one


Copyright © 2019. All rights reserved.