Record Class CylinderShape
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.shape.CylinderShape
- All Implemented Interfaces:
CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Shape>, CustomRegistryValue<io.netty.buffer.ByteBuf, Shape>, RefOptimizer<Shape>, WithKey, WithRef<Shape>, Shape
-
Field Summary
FieldsFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionCylinderShape(float width, float height) Creates an instance of aCylinderShaperecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildLines(float x, float y, float z, VertexCallback callback) static voidbuildLines(float x, float y, float z, VertexCallback callback, float width, float height, int detail, int hdetail) voidbuildQuads(float x, float y, float z, VertexCallback callback) static voidbuildQuads(float x, float y, float z, VertexCallback callback, float width, float height, 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.floatheight()Returns the value of theheightrecord component.optimize()final StringtoString()Returns a string representation of this record class.DynamicType<io.netty.buffer.ByteBuf, Shape> type()floatwidth()Returns the value of thewidthrecord component.Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Shape
getRegistry, isVisible
-
Field Details
-
UNIT_CYLINDER
-
TYPE
-
-
Constructor Details
-
CylinderShape
public CylinderShape(float width, float height) Creates an instance of aCylinderShaperecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Shape>
-
optimize
- Specified by:
optimizein interfaceRefOptimizer<Shape>
-
buildLines
- Specified by:
buildLinesin interfaceShape
-
buildLines
public static void buildLines(float x, float y, float z, VertexCallback callback, float width, float height, int detail, int hdetail) -
buildQuads
- Specified by:
buildQuadsin interfaceShape
-
buildQuads
public static void buildQuads(float x, float y, float z, VertexCallback callback, float width, float height, 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. -
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-