73 lines
1.5 KiB
Java
73 lines
1.5 KiB
Java
package io.github.hydos.ginger.engine.elements.objects;
|
|
|
|
import io.github.hydos.ginger.engine.mathEngine.vectors.Vector3f;
|
|
import io.github.hydos.ginger.engine.renderEngine.models.TexturedModel;
|
|
|
|
public class Entity
|
|
{
|
|
private TexturedModel model;
|
|
private Vector3f position;
|
|
private float rotX = 0, rotY = 0, rotZ = 0;
|
|
private Vector3f scale;
|
|
|
|
public Entity(TexturedModel model, Vector3f position, float rotX, float rotY, float rotZ, Vector3f scale)
|
|
{
|
|
this.model = model;
|
|
this.position = position;
|
|
this.rotX = rotX;
|
|
this.rotY = rotY;
|
|
this.rotZ = rotZ;
|
|
this.scale = scale;
|
|
}
|
|
|
|
public void increasePosition(float dx, float dy, float dz)
|
|
{
|
|
this.position.x += dx;
|
|
this.position.y += dy;
|
|
this.position.z += dz;
|
|
}
|
|
|
|
public void increaseRotation(float dx, float dy, float dz)
|
|
{
|
|
this.rotX += dx;
|
|
this.rotY += dy;
|
|
this.rotZ += dz;
|
|
}
|
|
|
|
public TexturedModel getModel()
|
|
{ return model; }
|
|
|
|
public void setModel(TexturedModel model)
|
|
{ this.model = model; }
|
|
|
|
public Vector3f getPosition()
|
|
{ return position; }
|
|
|
|
public void setPosition(Vector3f position)
|
|
{ this.position = position; }
|
|
|
|
public float getRotX()
|
|
{ return rotX; }
|
|
|
|
public void setRotX(float rotX)
|
|
{ this.rotX = rotX; }
|
|
|
|
public float getRotY()
|
|
{ return rotY; }
|
|
|
|
public void setRotY(float rotY)
|
|
{ this.rotY = rotY; }
|
|
|
|
public float getRotZ()
|
|
{ return rotZ; }
|
|
|
|
public void setRotZ(float rotZ)
|
|
{ this.rotZ = rotZ; }
|
|
|
|
public Vector3f getScale()
|
|
{ return scale; }
|
|
|
|
public void setScale(Vector3f scale)
|
|
{ this.scale = scale; }
|
|
}
|