private float agl = 0.0f;
protected void simpleInitGame()
{
//Sphere dome = new Sphere("TankDome", new Vector3f(-1.0f,1.0f,0.5f),16,16,.5f);
TriMesh dome = new Dome("TankDome", new Vector3f(0, 0, 0), 16, 16, .5f);
dome.setLocalTranslation(new Vector3f(-1.0f,1.0f,0.5f));
//Cylinder canon = new Cylinder("Canon", 16, 16, 0.25f, 3.0f,true);
TriMesh mesh = new TriMesh("TankMesh");
Vector3f[] vertexes = {
new Vector3f(1.0f,.5f,0.0f),
new Vector3f(0.0f,0.0f,0.0f),
new Vector3f(0.0f,1.0f,0.0f),
new Vector3f(-2.0f,0.0f,0.0f),
new Vector3f(-2.0f,1.0f,0.0f),
new Vector3f(-3.0f,0.5f,0.0f),
new Vector3f(1.0f,.5f,1.0f),
new Vector3f(0.0f,0.0f,1.0f),
new Vector3f(0.0f,1.0f,1.0f),
new Vector3f(-2.0f,0.0f,1.0f),
new Vector3f(-2.0f,1.0f,1.0f),
new Vector3f(-3.0f,0.5f,1.0f)};
Vector3f[] normals={
new Vector3f(0,0,-1),
new Vector3f(0,0,-1),
new Vector3f(0,0,-1),
new Vector3f(0,0,-1),
new Vector3f(0,0,-1),
new Vector3f(0,0,-1),
new Vector3f(0,0,1),
new Vector3f(0,0,1),
new Vector3f(0,0,1),
new Vector3f(0,0,1),
new Vector3f(0,0,1),
new Vector3f(0,0,1)};
int[] indexes = {0,1,2,2,3,1,2,4,3,4,5,3,6,7,8,8,9,7,
8,10,9,10,11,9,1,7,9,1,3,9,9,3,11,3,11,5,
6,0,8,8,2,0,8,10,2,10,4,2,4,11,5,10,4,11,1,7,6,0,6,1};
mesh.reconstruct(BufferUtils.createFloatBuffer(vertexes),
BufferUtils.createFloatBuffer(normals),
null, null,BufferUtils.createIntBuffer(indexes));
mesh.setModelBound(new BoundingBox());
mesh.updateModelBound();
tankNode = new Node("TankNode");
tankTurret = new Node("tankTurret");
tankTurretBarrel = new Cylinder("tankTurretBarrel", 16, 16, .1f, BARREL_LENGTH );
tankTurretBarrel.setModelBound(new BoundingBox());