|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.geometry.primitive.Primitive
jme.geometry.primitive.Pyramid
Pyramid
defines a primitive object of a pyramid shape. The
pyramid is a four sided pyramid. The pyramid is defined by the size of the
base and the height.
Field Summary |
Fields inherited from class jme.geometry.primitive.Primitive |
alpha, blue, green, red |
Constructor Summary | |
Pyramid(float base,
float height)
Constructor instantiates a new Pyramid object with
the given attributes. |
Method Summary | |
Vector[] |
getPoints()
getPoints returns an array of Vectors that represents
each point that makes up the piece of geometry. |
void |
initialize()
initialize sets up the bounding volumes of the
pyramid. |
void |
preRender()
preRender does not do anything within Pyramid. |
void |
render()
render displays the pyramid with the current parameters. |
void |
setBase(float base)
setBase sets the base size for the pyramid. |
void |
setHeight(float height)
setHeight sets the new peak height of the pyramid. |
void |
useDisplayList(boolean value)
useDisplayList sets the pyramid as a display list for
possibly faster rendering. |
Methods inherited from class jme.geometry.primitive.Primitive |
clean, getTextureId, setColor, setTexture, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Pyramid(float base, float height)
Pyramid
object with
the given attributes.
base
- The size of the base of the pyramid, where the size is
one side of the base.height
- the height of the pyramid at it's peak.
MonkeyRuntimeException
- if base and/or height is negative.
MonkeyGLException
- if OpenGL has not been set up yet.Method Detail |
public void setBase(float base)
setBase
sets the base size for the pyramid. The base is
the size of a single size of the base.
base
- the new size of the pyramid base.
MonkeyRuntimeException
- if the base is negative.public void setHeight(float height)
setHeight
sets the new peak height of the pyramid.
height
- the new peak height of the pyramid.
MonkeyRuntimeException
- if the height is negative.public void useDisplayList(boolean value)
useDisplayList
sets the pyramid as a display list for
possibly faster rendering.
value
- true will use the display list, false will not.public void render()
render
displays the pyramid with the current parameters.
render
in interface Geometry
render
in class Primitive
public void initialize()
initialize
sets up the bounding volumes of the
pyramid.
public void preRender()
preRender
does not do anything within Pyramid.
public Vector[] getPoints()
Geometry
getPoints
returns an array of Vectors that represents
each point that makes up the piece of geometry.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |