|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme.geometry.primitive.Primitive
Primitive
defines a basic geometry shape. This typically
denotes objects such as: Spheres, Cubes, Disks, Cylinders and the like.
Field Summary | |
protected float |
alpha
the transparency of the object. |
protected float |
blue
the blue component of the object's color. |
protected float |
green
the green component of the object's color. |
protected float |
red
the red component of the object's color. |
Constructor Summary | |
Primitive()
|
Method Summary | |
void |
clean()
clean should be called after any render call. |
int |
getTextureId()
getTextureId returns the texture id associated with
this object. |
abstract void |
render()
render is an abstract method that should handle the
displaying of the geometry data. |
void |
setColor(float red,
float green,
float blue,
float alpha)
setColor sets the RGBA values for this object. |
void |
setTexture(java.lang.String filename)
setTexture takes an image file, and adds it to the
texture system. |
java.lang.String |
toString()
toString returns the string representation of this
geometry object in the format: Geometry: jme.geometry.primitive.Sphere@10e3293 Color: {RGBA VALUE} TextureID: {VALUE} |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jme.geometry.Geometry |
getPoints, initialize |
Field Detail |
protected float red
protected float green
protected float blue
protected float alpha
Constructor Detail |
public Primitive()
Method Detail |
public void setTexture(java.lang.String filename)
setTexture
takes an image file, and adds it to the
texture system. The TextureManager
handles the
creation of the texture.
setTexture
in interface Geometry
filename
- the image file to use as a texture.public int getTextureId()
getTextureId
returns the texture id associated with
this object.
public void setColor(float red, float green, float blue, float alpha)
setColor
sets the RGBA values for this object.
setColor
in interface Geometry
red
- the red component of the color.green
- the green component of the color.blue
- the blue component of the color.alpha
- the transparency component of the color.public abstract void render()
render
is an abstract method that should handle the
displaying of the geometry data.
render
in interface Geometry
public void clean()
clean
should be called after any render
call.
This disables the texture 2d state if appropriate.
public java.lang.String toString()
toString
returns the string representation of this
geometry object in the format:
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |