Record Class SphereShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.SphereShape
- All Implemented Interfaces:
RefOptimizer<Shape>, Shape
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CustomRegistryType<io.netty.buffer.ByteBuf, Shape> static final CustomRegistryType.Unit<io.netty.buffer.ByteBuf, Shape> Fields inherited from interface Shape
CODEC, DATA_TYPE, REGISTRY, STREAM_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildLines(float x, float y, float z, VertexCallback callback) voidbuildQuads(float x, float y, float z, VertexCallback callback) 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.optimize()floatsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Shape> type()
-
Field Details
-
UNIT_SPHERE
-
TYPE
-
-
Constructor Details
-
SphereShape
public SphereShape(float size) Creates an instance of aSphereShaperecord class.- Parameters:
size- the value for thesizerecord component
-
-
Method Details
-
type
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
contains
-
optimize
- Specified by:
optimizein interfaceRefOptimizer<Shape>
-
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. -
size
public float size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-