public class Pyramid extends Primitive
name, properties| Constructor and Description |
|---|
Pyramid()
Construct a new pyramid instance with default bottom area(10, 10) and default height(5)
|
Pyramid(double xbottom,
double ybottom,
double height)
Construct a new pyramid instance with specified bottom area
|
Pyramid(double xbottom,
double ybottom,
double xtop,
double ytop,
double height)
Construct a new pyramid instance with specified bottom area and top area and height.
|
Pyramid(java.lang.String name,
double xbottom,
double ybottom,
double xtop,
double ytop,
double height)
Construct a new pyramid instance with specified bottom area and top area and height.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Check if two pyramids equal
|
Vector2 |
getBottomArea()
Area of the bottom cap
|
Vector3 |
getBottomOffset()
Offset for bottom vertices
|
double |
getHeight()
Height of the pyramid
|
Vector2 |
getTopArea()
Area of the top cap
|
int |
hashCode()
Gets the hash code of current primitive instance
|
void |
setBottomArea(Vector2 value)
Area of the bottom cap
|
void |
setBottomOffset(Vector3 value)
Offset for bottom vertices
|
void |
setHeight(double value)
Height of the pyramid
|
void |
setTopArea(Vector2 value)
Area of the top cap
|
Mesh |
toMesh()
Convert current object to mesh
|
createEmptyMesh, getCastShadows, getReceiveShadows, merge, setCastShadows, setReceiveShadows, setupgetBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNodegetScenefindProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setPropertypublic Pyramid()
public Pyramid(double xbottom,
double ybottom,
double height)
xbottom - The x-direction length of the bottomybottom - The y-direction length of the bottomheight - The height of the pyramidpublic Pyramid(double xbottom,
double ybottom,
double xtop,
double ytop,
double height)
xbottom - The x-direction length of the bottom areaybottom - The y-direction length of the bottom areaxtop - The x-direction length of the top areaytop - The y-direction length of the top areaheight - The height of the pyramidpublic Pyramid(java.lang.String name,
double xbottom,
double ybottom,
double xtop,
double ytop,
double height)
name - The name of the pyramidxbottom - The x-direction length of the bottom areaybottom - The y-direction length of the bottom areaxtop - The x-direction length of the top areaytop - The y-direction length of the top areaheight - The height of the pyramidpublic Vector2 getBottomArea()
public void setBottomArea(Vector2 value)
value - New valuepublic Vector2 getTopArea()
public void setTopArea(Vector2 value)
value - New valuepublic Vector3 getBottomOffset()
public void setBottomOffset(Vector3 value)
value - New valuepublic double getHeight()
public void setHeight(double value)
value - New valuepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The object to check equality.public Mesh toMesh()
toMesh in interface IMeshConvertibletoMesh in class Primitivepublic int hashCode()
hashCode in class java.lang.ObjectPyramid