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 |
---|---|
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
|
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, setup
getBoundingBox, getEntityRendererKey, getExcluded, getParentNode, getParentNodes, setExcluded, setParentNode
getScene
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public 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 Mesh toMesh()
toMesh
in interface IMeshConvertible
toMesh
in class Primitive