Record Class CircleShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.CircleShape
- All Implemented Interfaces:
Shape
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CustomRegistryType<io.netty.buffer.ByteBuf, Shape> static final CircleShapeFields inherited from interface Shape
CODEC, DATA_TYPE, REGISTRY, STREAM_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCircleShape(float radius) Creates an instance of aCircleShaperecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildBottomQuads(float x, float y, float z, VertexCallback callback, float radius, int detail) voidbuildLines(float x, float y, float z, VertexCallback callback) static voidbuildLines(float x, float y, float z, VertexCallback callback, float radius, int detail) voidbuildQuads(float x, float y, float z, VertexCallback callback) static voidbuildTopQuads(float x, float y, float z, VertexCallback callback, float radius, int detail) booleancontains(org.joml.Vector3fc p) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static CircleShapeof(float size) optimize()floatradius()Returns the value of theradiusrecord component.final StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Shape> type()
-
Field Details
-
UNIT_CIRCLE
-
TYPE
-
-
Constructor Details
-
CircleShape
public CircleShape(float radius) Creates an instance of aCircleShaperecord class.- Parameters:
radius- the value for theradiusrecord component
-
-
Method Details
-
of
-
type
-
optimize
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildLines
public static void buildLines(float x, float y, float z, VertexCallback callback, float radius, int detail) -
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
buildTopQuads
public static void buildTopQuads(float x, float y, float z, VertexCallback callback, float radius, int detail) -
buildBottomQuads
public static void buildBottomQuads(float x, float y, float z, VertexCallback callback, float radius, int detail) -
contains
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
radius
public float radius()Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-