simogl.factory
Class MeshFactory

java.lang.Object
  extended by simogl.factory.MeshFactory

public class MeshFactory
extends java.lang.Object

This class is used as a factory class for mesh objects

Author:
Frank Bruns

Constructor Summary
MeshFactory()
           
 
Method Summary
static MeshDL createBox(javax.media.opengl.GL gl, float height, float width, float length)
          Creates a box with the specified meassures
static MeshVA createGoblin(javax.media.opengl.GL gl, boolean drawShadow)
          Returns a new instance of a goblin model.
static MeshVA createHouse(javax.media.opengl.GL gl, boolean drawShadow)
          Returns a new instance of a house model.
static MeshDL createSquare(javax.media.opengl.GL gl, float height, float width)
          Creates a simple square with the specified meassures
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeshFactory

public MeshFactory()
Method Detail

createBox

public static MeshDL createBox(javax.media.opengl.GL gl,
                               float height,
                               float width,
                               float length)
Creates a box with the specified meassures

Parameters:
gl -
height - height of the box
width - width of the box
length - length of the box
Returns:
box

createSquare

public static MeshDL createSquare(javax.media.opengl.GL gl,
                                  float height,
                                  float width)
Creates a simple square with the specified meassures

Parameters:
gl -
height - height of the square
width - width of the square
Returns:
square

createGoblin

public static MeshVA createGoblin(javax.media.opengl.GL gl,
                                  boolean drawShadow)
Returns a new instance of a goblin model. Be aware, that shadows can only be drawn, if at least one light source exist. If there is none, this method can produce a runtime error, if the drawShadow flag is set to true

Parameters:
gl -
drawShadow - draw shadow? --> true = yes, false = no
Returns:
goblin model

createHouse

public static MeshVA createHouse(javax.media.opengl.GL gl,
                                 boolean drawShadow)
Returns a new instance of a house model. Be aware, that shadows can only be drawn, if at least one light source exist. If there is none, this method can produce a runtime error, if the drawShadow flag is set to true

Parameters:
gl -
drawShadow - draw shadow? --> true = yes, false = no
Returns:
house model