| | package cactusServer.entities; |
---|
| | |
---|
| | import org.ntlab.radishforandroidstudio.framework.gameMain.OvergroundActor; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Model3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Object3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Position3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.model3D.Quaternion3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.AngularVelocity3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.Solid3D; |
---|
| | import org.ntlab.radishforandroidstudio.framework.physics.Velocity3D; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Box; |
---|
| | import org.ntlab.radishforandroidstudio.java3d.Primitive; |
---|
| | |
---|
| |
---|
| | |
---|
| | public MovableObject(Position3D position, Velocity3D velocity, AngularVelocity3D angularVelocity, |
---|
| | Quaternion3D angle, Attribute attribute, int modelID) { |
---|
| | setPrim(new Box()); |
---|
| | setObject(new Object3D("", prim)); |
---|
| | setPlaceable(object); |
---|
| | setObject(new Solid3D(new Object3D("", prim))); |
---|
| | setPlaceable(new OvergroundActor((Solid3D) object, null)); |
---|
| | setPosition(position); |
---|
| | setVelocity(velocity); |
---|
| | setAngularVelocity(angularVelocity); |
---|
| | setAngle(angle); |
---|
| |
---|
| | } |
---|
| | |
---|
| | public void setPosition(Position3D position) { |
---|
| | this.position = position; |
---|
| | if(placeable != null)((Object3D)(getPlaceable().getBody())).setPosition(position); |
---|
| | if (placeable != null) |
---|
| | ((Object3D) (getPlaceable().getBody())).setPosition(position); |
---|
| | } |
---|
| | |
---|
| | public void setVelocity(Velocity3D velocity) { |
---|
| | this.velocity = velocity; |
---|
| |
---|
| | } |
---|
| | |
---|
| | public void setAngle(Quaternion3D angle) { |
---|
| | this.angle = angle; |
---|
| | if(placeable != null)((Object3D) getPlaceable().getBody()).apply(angle, false); |
---|
| | if (placeable != null) |
---|
| | ((Object3D) getPlaceable().getBody()).apply(angle, false); |
---|
| | } |
---|
| | |
---|
| | public void setAttribute(Attribute attribute) { |
---|
| | this.attribute = attribute; |
---|
| |
---|
| | |