jme.geometry
Interface Geometry

All Known Subinterfaces:
Model
All Known Implementing Classes:
Md3Model, MilkshapeModel, Primitive

public interface Geometry

Geometry defines an interface to maintain and render a three dimensional object. It is intended that all graphical "entities" be derived from Geometry

Version:
0.1.0
Author:
Mark Powell

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 any required attributes of the geometry object.
 void render()
          render is responsible to presenting the geometry to the OpenGL context.
 void setColor(float red, float green, float blue, float alpha)
          setColor sets the color of the geometry.
 void setTexture(java.lang.String filename)
          setTexture sets the associated texture of this geometry to the passed texture file.
 

Method Detail

initialize

public void initialize()
initialize sets up any required attributes of the geometry object. Typically, this includes retrieving the valid GL and GLU objects.


render

public void render()
render is responsible to presenting the geometry to the OpenGL context.


setTexture

public void setTexture(java.lang.String filename)
setTexture sets the associated texture of this geometry to the passed texture file.

Parameters:
filename - the image file to use as the texture for this geometry object.

setColor

public void setColor(float red,
                     float green,
                     float blue,
                     float alpha)
setColor sets the color of the geometry. This uses a RGBA color. Where alpha of 1 is opaque and 0 is clear.

Parameters:
red - the red color of the geometry.
green - the green color of the geometry;
blue - the green color of the geometry.
alpha - the transparency of the geometry.

getPoints

public Vector[] getPoints()
getPoints returns an array of Vectors that represents each point that makes up the piece of geometry.

Returns:
the array of vectors for the points.