/*
* File name: GOAgent1.java (package eas.users.fabian.graphicsonly)
* Author(s): Fabian
* Java version: 6.0
* Generation date: 13.02.2012 (14:37:19)
*
* (c) This file and the EAS (Easy Agent Simulation) framework containing it
* is protected by Creative Commons by-nc-sa license. Any altered or
* further developed versions of this file have to meet the agreements
* stated by the license conditions.
*
* In a nutshell
* -------------
* You are free:
* - to Share -- to copy, distribute and transmit the work
* - to Remix -- to adapt the work
*
* Under the following conditions:
* - Attribution -- You must attribute the work in the manner specified by the
* author or licensor (but not in any way that suggests that they endorse
* you or your use of the work).
* - Noncommercial -- You may not use this work for commercial purposes.
* - Share Alike -- If you alter, transform, or build upon this work, you may
* distribute the resulting work only under the same or a similar license to
* this one.
*
* + Detailed license conditions (Germany):
* http://creativecommons.org/licenses/by-nc-sa/3.0/de/
* + Detailed license conditions (unported):
* http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en
*
* This header must be placed in the beginning of any version of this file.
*/
package eas.users.students.fabian.graphicsonly;
import org.ode4j.math.DVector3;
import org.ode4j.ode.DBody;
import org.ode4j.ode.DGeom;
import org.ode4j.ode.OdeHelper;
import eas.plugins.standard.visualization.visualization3D.VideoPluginLWJGL;
import eas.plugins.standard.visualization.visualization3D.VideoPluginLWJGL.DS_TEXTURE_NUMBER;
import eas.simulation.spatial.sim3D.physicalSimulation.standardAgents.AbstractAgent3DGraphicsOnly;
import eas.startSetup.ParCollection;
/**
* @author Fabian
*
*/
public class GOAgent1 extends AbstractAgent3DGraphicsOnly<GOEnv1> {
/**
*
*/
private static final long serialVersionUID = -7554771199808833533L;
/**
* @param id
* @param env
* @param params
*/
public GOAgent1(int id, GOEnv1 env, ParCollection params) {
super(id, env, params);
this.geoms = new DGeom[1];
this.bodies = new DBody[1];
bodies[0] = OdeHelper.createBody(env.getWorld());
bodies[0].setPosition(new DVector3(1, 0, 10));
geoms[0] = OdeHelper.createBox(1, 1, 1);
geoms[0].setBody(bodies[0]);
}
/* (non-Javadoc)
* @see eas.simulation.spatial.sim3D.physicalSimulation.standardAgents.AbstractAgentLWJGLdrawable#isDrawableInLWJGL()
*/
@Override
public boolean isDrawableInLWJGL() {
return true;
}
@Override
public void drawInLWJGL() {
VideoPluginLWJGL.setTexture(DS_TEXTURE_NUMBER.DS_WOOD);
VideoPluginLWJGL.dsSetColor(0.1f, .5f, 1.f);
super.drawInLWJGL();
}
}