Record Class GuiMeshGradient.Patch
java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiMeshGradient.Patch
- Enclosing class:
GuiMeshGradient
public static record GuiMeshGradient.Patch(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, List<GuiMeshGradient.Point> controls)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPatch(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, List<GuiMeshGradient.Point> controls) Creates an instance of aPatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebottomLeftrecord component.Returns the value of thebottomRightrecord component.static GuiMeshGradient.Patchcolors(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft) static GuiMeshGradient.Patchcontrolled(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, GuiMeshGradient.Point topFirst, GuiMeshGradient.Point topSecond, GuiMeshGradient.Point rightFirst, GuiMeshGradient.Point rightSecond, GuiMeshGradient.Point bottomFirst, GuiMeshGradient.Point bottomSecond, GuiMeshGradient.Point leftFirst, GuiMeshGradient.Point leftSecond) Creates a Coons patch with explicit normalized cubic boundary controls.controls()Returns the value of thecontrolsrecord component.booleancurved()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.point(float u, float v) Samples the normalized Coons-patch geometry.topLeft()Returns the value of thetopLeftrecord component.topRight()Returns the value of thetopRightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Patch
public Patch(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, List<GuiMeshGradient.Point> controls) Creates an instance of aPatchrecord class.- Parameters:
topLeft- the value for thetopLeftrecord componenttopRight- the value for thetopRightrecord componentbottomRight- the value for thebottomRightrecord componentbottomLeft- the value for thebottomLeftrecord componentcontrols- the value for thecontrolsrecord component
-
-
Method Details
-
colors
public static GuiMeshGradient.Patch colors(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft) -
controlled
public static GuiMeshGradient.Patch controlled(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, GuiMeshGradient.Point topFirst, GuiMeshGradient.Point topSecond, GuiMeshGradient.Point rightFirst, GuiMeshGradient.Point rightSecond, GuiMeshGradient.Point bottomFirst, GuiMeshGradient.Point bottomSecond, GuiMeshGradient.Point leftFirst, GuiMeshGradient.Point leftSecond) Creates a Coons patch with explicit normalized cubic boundary controls. -
curved
public boolean curved() -
point
Samples the normalized Coons-patch geometry.- Parameters:
u- horizontal patch parameterv- vertical patch parameter- Returns:
- normalized patch coordinate
-
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 withObjects::equals(Object,Object). -
topLeft
Returns the value of thetopLeftrecord component.- Returns:
- the value of the
topLeftrecord component
-
topRight
Returns the value of thetopRightrecord component.- Returns:
- the value of the
topRightrecord component
-
bottomRight
Returns the value of thebottomRightrecord component.- Returns:
- the value of the
bottomRightrecord component
-
bottomLeft
Returns the value of thebottomLeftrecord component.- Returns:
- the value of the
bottomLeftrecord component
-
controls
Returns the value of thecontrolsrecord component.- Returns:
- the value of the
controlsrecord component
-