|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimogl.geometry.AbstractMesh
public abstract class AbstractMesh
Constructor Summary | |
---|---|
AbstractMesh()
Creates a new mesh object |
Method Summary | |
---|---|
void |
addFace(Face face)
Adds a face (two triangle) to the mesh. |
abstract void |
deleteMesh(javax.media.opengl.GL gl)
Deletes the mesh |
void |
disableRenderOptions(javax.media.opengl.GL gl)
This method must be called after the OpenGL rendering operation took place. |
abstract void |
draw(javax.media.opengl.GL gl)
Call this method to draw the mesh |
void |
drawShadow(javax.media.opengl.GL gl)
Call this method to draw the shadow of a mesh |
void |
enableRenderOptions(javax.media.opengl.GL gl)
This method actives the render options for a mesh. |
BoundingBox |
getBoundingBox()
Returns the bounding box of the mesh |
java.util.ArrayList<Face> |
getFaces()
Returns the faces of the mesh |
Material |
getMaterial()
Returns the current material of the mesh |
Point3D |
getPosition()
Returns the current Position of the mesh |
float |
getPositionX()
Returns the x-coordinate of the mesh's position |
float |
getPositionY()
Returns the y-coordinate of the mesh's position |
float |
getPositionZ()
Returns the z-coordinate of the mesh's position |
float |
getRoationX()
Returns the degree of rotation around the x-axxis of the mesh |
float |
getRoationY()
Returns the degree of rotation around the y-axxis of the mesh |
float |
getRoationZ()
Returns the degree of rotation around the z-axxis of the mesh |
Point3D |
getRotation()
Returns the degrees of roation of this mesh as an instance of Point3D. |
com.sun.opengl.util.texture.Texture |
getTexture()
Returns the current texture of this mesh |
boolean |
isTransparent()
Determines whether the mesh is transparent or solid |
void |
performTransformations(javax.media.opengl.GL gl)
This method performs all translations, rotations and scalings for the mesh. |
void |
rotate(float degX,
float degY,
float degZ)
Rotates the mesh around its x-,y- and z-axxis. |
void |
rotateAxxisX(float degrees)
Rotates the mesh around its x-axxis |
void |
rotateAxxisY(float degrees)
Rotates the mesh around its y-axxis |
void |
rotateAxxisZ(float degrees)
Rotates the mesh around its z-axxis |
void |
scale(float x,
float y,
float z)
Scales the mesh to the specified x-, y-, z-values along its axxises Note: Do not provide a paramter which is equal to 0! |
void |
setDrawShadow(boolean useShadow,
Light light0)
Sets whether the shadow of the mesh ought to be drawn. |
void |
setEnabledFaceCulling(boolean enable)
Specifies if face culling shall applied to the mesh. |
void |
setMaterial(Material material)
Sets the material of the mesh to the specified material |
void |
setPosition(float x,
float y,
float z)
Sets the position of the mesh by the three given parameters |
void |
setPosition(Point3D position)
Sets the position of the mesh with a Point3D object |
void |
setPositionX(float x)
Sets the x-coordinate of this mesh's position |
void |
setPositionY(float y)
Sets the y-coordinate of this mesh's position |
void |
setPositionZ(float z)
Sets the z-coordinate of this mesh's position |
void |
setTexture(com.sun.opengl.util.texture.Texture texture)
Specifies the texture that shall be used for this mesh |
void |
setTransparent(boolean transparency)
Sets whether the mesh shall be transparent or not transparent. |
void |
showBoundingBox(boolean show)
Determines wheter the bounding box shall be visually shown by a box that is drawn around the mesh |
void |
showWireFrame(boolean wireFrameSwitch)
Determines whether the mesh shall be rendered as a wireframe model |
abstract void |
specializedDraw(javax.media.opengl.GL gl)
This method contains only the drawing operation fitting to the special kind of mesh. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMesh()
Method Detail |
---|
public void addFace(Face face)
face
- face that shall be used as a face of the meshpublic java.util.ArrayList<Face> getFaces()
public BoundingBox getBoundingBox()
public void showBoundingBox(boolean show)
show
- shoe bounding box? --> yes = true, no = falsepublic void setMaterial(Material material)
material
- material for the meshpublic Material getMaterial()
public void setPosition(Point3D position)
position
- a Point3D object specifying a 3D positionpublic void setPosition(float x, float y, float z)
x
- x-coordinatey
- y-coordinatez
- z-coordinatepublic void setPositionX(float x)
x
- x-coordinatepublic void setPositionY(float y)
y
- y-coordinatepublic void setPositionZ(float z)
z
- z-coordinatepublic Point3D getPosition()
public float getPositionX()
public float getPositionY()
public float getPositionZ()
public void setTexture(com.sun.opengl.util.texture.Texture texture)
texture
- The texture that shall be used for this meshpublic com.sun.opengl.util.texture.Texture getTexture()
public void rotate(float degX, float degY, float degZ)
degX
- degrees of rotation of x-axxisdegY
- degrees of rotation of y-axxisdegZ
- degrees of rotation of z-axxispublic void rotateAxxisX(float degrees)
degrees
- Specifies the amount of degrees the mesh shall be rotatedpublic void rotateAxxisY(float degrees)
degrees
- Specifies the amount of degrees the mesh shall be rotatedpublic void rotateAxxisZ(float degrees)
degrees
- Specifies the amount of degrees the mesh shall be rotatedpublic Point3D getRotation()
public float getRoationX()
public float getRoationY()
public float getRoationZ()
public void scale(float x, float y, float z)
x
- scale factor along the x-axxisy
- scale factor along the y-axxisz
- scale factor along the z-axxispublic void setEnabledFaceCulling(boolean enable)
enable
- enable face culling? --> true = yes, false = nopublic void setTransparent(boolean transparency)
transparency
- transparent? --> true = yes, false = nopublic boolean isTransparent()
public void setDrawShadow(boolean useShadow, Light light0)
useShadow
- draw shadow? --> true = yes, false = nolight0
- the GL.LIGHT_0 object of the scenepublic void showWireFrame(boolean wireFrameSwitch)
wireFrameSwitch
- true = wireframe on, false = wireframe offpublic void enableRenderOptions(javax.media.opengl.GL gl)
gl
- public void disableRenderOptions(javax.media.opengl.GL gl)
gl
- public void performTransformations(javax.media.opengl.GL gl)
gl
- public abstract void draw(javax.media.opengl.GL gl)
gl
- public abstract void specializedDraw(javax.media.opengl.GL gl)
gl
- public void drawShadow(javax.media.opengl.GL gl)
gl
- public abstract void deleteMesh(javax.media.opengl.GL gl)
gl
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |