Package org.joml
Class Circled
- java.lang.Object
-
- org.joml.Circled
-
- All Implemented Interfaces:
Externalizable,Serializable
public class Circled extends Object implements Externalizable
Represents a 2D circle using double-precision floating-point numbers.- Author:
- Kai Burjack
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()voidreadExternal(ObjectInput in)StringtoString()Return a string representation of this circle.StringtoString(NumberFormat formatter)Return a string representation of this circle by formatting the vector components with the givenNumberFormat.Circledtranslate(double x, double y)Translatethisby the vector(x, y).Circledtranslate(double x, double y, Circled dest)Translatethisby the vector(x, y)and store the result indest.Circledtranslate(Vector2dc xy)Translatethisby the given vectorxy.Circledtranslate(Vector2dc xy, Circled dest)Translatethisby the given vectorxyand store the result indest.Circledtranslate(Vector2fc xy)Translatethisby the given vectorxy.Circledtranslate(Vector2fc xy, Circled dest)Translatethisby the given vectorxyand store the result indest.voidwriteExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
Circled
public Circled()
-
Circled
public Circled(Circled source)
Create a newCircledas a copy of the givensource.- Parameters:
source- theCircledto copy from
-
Circled
public Circled(double x, double y, double r)- Parameters:
x- the x coordinate of the circle's centery- the y coordinate of the circle's centerr- the radius of the circle
-
-
Method Detail
-
translate
public Circled translate(Vector2dc xy)
Translatethisby the given vectorxy.- Parameters:
xy- the vector to translate by- Returns:
- this
-
translate
public Circled translate(Vector2dc xy, Circled dest)
Translatethisby the given vectorxyand store the result indest.- Parameters:
xy- the vector to translate bydest- will hold the result- Returns:
- dest
-
translate
public Circled translate(Vector2fc xy)
Translatethisby the given vectorxy.- Parameters:
xy- the vector to translate by- Returns:
- this
-
translate
public Circled translate(Vector2fc xy, Circled dest)
Translatethisby the given vectorxyand store the result indest.- Parameters:
xy- the vector to translate bydest- will hold the result- Returns:
- dest
-
translate
public Circled translate(double x, double y)
Translatethisby the vector(x, y).- Parameters:
x- the x coordinate to translate byy- the y coordinate to translate by- Returns:
- this
-
translate
public Circled translate(double x, double y, Circled dest)
Translatethisby the vector(x, y)and store the result indest.- Parameters:
x- the x coordinate to translate byy- the y coordinate to translate bydest- will hold the result- Returns:
- dest
-
toString
public String toString()
Return a string representation of this circle.This method creates a new
DecimalFormaton every invocation with the format string "0.000E0;-".
-
toString
public String toString(NumberFormat formatter)
Return a string representation of this circle by formatting the vector components with the givenNumberFormat.- Parameters:
formatter- theNumberFormatused to format the components with- Returns:
- the string representation
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-