public class Plane extends Primitive
name, properties
Constructor and Description |
---|
Plane()
Initializes a new instance of the
Plane with default size 1x1. |
Plane(double length,
double width)
Initializes a new instance of the
Plane . |
Plane(java.lang.String name,
double length,
double width,
int lengthSegments,
int widthSegments)
Initializes a new instance of the
Plane . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Check if two planes equal
|
double |
getLength()
Gets the length of the plane.
|
int |
getLengthSegments()
Gets the length segments.
|
Vector3 |
getUp()
Gets the up vector of the plane, default value is (0, 1, 0), this affects the generation of the plane
|
double |
getWidth()
Gets the width of the plane.
|
int |
getWidthSegments()
Gets the width segments.
|
int |
hashCode()
Gets the hash code of current primitive instance
|
void |
setLength(double value)
Sets the length of the plane.
|
void |
setLengthSegments(int value)
Sets the length segments.
|
void |
setUp(Vector3 value)
Sets the up vector of the plane, default value is (0, 1, 0), this affects the generation of the plane
|
void |
setWidth(double value)
Sets the width of the plane.
|
void |
setWidthSegments(int value)
Sets the width segments.
|
Mesh |
toMesh()
Convert current object to mesh
|
createEmptyMesh, getCastShadows, getReceiveShadows, merge, setCastShadows, setReceiveShadows, setup
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Plane()
Plane
with default size 1x1.public Plane(double length, double width)
Plane
.length
- Length of the plane.width
- Width of the plane.public Plane(java.lang.String name, double length, double width, int lengthSegments, int widthSegments)
Plane
.name
- Name.length
- Length of the plane.width
- Width of the plane.lengthSegments
- Length segments.widthSegments
- Width segments.public Vector3 getUp()
public void setUp(Vector3 value)
value
- New valuepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to check equality.public double getLength()
public void setLength(double value)
value
- New valuepublic double getWidth()
public void setWidth(double value)
value
- New valuepublic int getLengthSegments()
public void setLengthSegments(int value)
value
- New valuepublic int getWidthSegments()
public void setWidthSegments(int value)
value
- New valuepublic Mesh toMesh()
toMesh
in interface IMeshConvertible
toMesh
in class Primitive
public int hashCode()
hashCode
in class java.lang.Object
Plane