Package zombie.core.physics
Class Bullet
java.lang.Object
zombie.core.physics.Bullet
-
Field Summary
Modifier and TypeFieldDescriptionstatic ByteBuffer
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
activateChunkMap
(int playerIndex, int wx, int wy, int chunkGridWidth) static int
addHingeConstraint
(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB) static int
addPhysicsObject
(float x, float y) static int
addPointConstraint
(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB) static int
addRopeConstraint
(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB, float linearLimit) static void
addVehicle
(int ID, float x, float y, float z, float qx, float qy, float qz, float qw, String scriptName) static void
applyCentralForceToVehicle
(int ID, float fx, float fy, float fz) static void
applyTorqueToVehicle
(int ID, float tx, float ty, float tz) static void
beginUpdateChunk
(IsoChunk chunk) static void
static void
controlVehicle
(int ID, float engineForce, float brakeForce, float steerAngle) static void
createServerCell
(int x, int y) static void
deactivateChunkMap
(int playerIndex) static void
defineVehicleScript
(String name, float[] params) static void
static void
static int
getObjectPhysics
(float[] out) static int
getOwnVehiclePhysics
(int vid, float[] out) static int
static int
getVehiclePhysics
(int offset, float[] out) static void
init()
static void
initWorld
(int offsetX, int offsetY, boolean bServer) static void
initWorld
(int offsetX, int offsetY, int wx, int wy, int chunkGridWidth) static void
removeConstraint
(int id) static void
removeServerCell
(int x, int y) static void
removeVehicle
(int ID) static void
scrollChunkMap
(int playerIndex, int dir) static void
scrollChunkMapDown
(int playerIndex) static void
scrollChunkMapLeft
(int playerIndex) static void
scrollChunkMapRight
(int playerIndex) static void
scrollChunkMapUp
(int playerIndex) static int
setOwnVehiclePhysics
(int vid, float[] data) static void
setTireInflation
(int ID, int wheelIndex, float inflation) static void
setTireRemoved
(int ID, int wheelIndex, boolean removed) static void
setVehicleActive
(int ID, boolean active) static void
setVehicleActive
(BaseVehicle vehicle, boolean isActive) static int
setVehicleMass
(int vid, float mass) static int
setVehicleParams
(int vid, float[] data) static int
setVehicleStatic
(int vid, boolean isStatic) static int
setVehicleStatic
(BaseVehicle vehicle, boolean isStatic) static void
setVehicleVelocityMultiplier
(int vid, float maxSpeed, float multiplier) static void
stepSimulation
(float timeStep, int maxSubSteps, float fixedTimeStep) static void
teleportVehicle
(int ID, float x, float y, float z, float qx, float qy, float qz, float qw) static void
updateChunk
(int x, int y, int z, int numShapes, byte[] shapes) static void
updatePlayerList
(ArrayList<IsoPlayer> players)
-
Field Details
-
cmdBuf
-
TO_ADD_VEHICLE
public static final byte TO_ADD_VEHICLE- See Also:
-
TO_SCROLL_CHUNKMAP
public static final byte TO_SCROLL_CHUNKMAP- See Also:
-
TO_ACTIVATE_CHUNKMAP
public static final byte TO_ACTIVATE_CHUNKMAP- See Also:
-
TO_INIT_WORLD
public static final byte TO_INIT_WORLD- See Also:
-
TO_UPDATE_CHUNK
public static final byte TO_UPDATE_CHUNK- See Also:
-
TO_DEBUG_DRAW_WORLD
public static final byte TO_DEBUG_DRAW_WORLD- See Also:
-
TO_STEP_SIMULATION
public static final byte TO_STEP_SIMULATION- See Also:
-
TO_UPDATE_PLAYER_LIST
public static final byte TO_UPDATE_PLAYER_LIST- See Also:
-
TO_END
public static final byte TO_END- See Also:
-
-
Constructor Details
-
Bullet
public Bullet()
-
-
Method Details
-
init
public static void init() -
CatchToBullet
-
initWorld
public static void initWorld(int offsetX, int offsetY, boolean bServer) -
destroyWorld
public static void destroyWorld() -
activateChunkMap
public static void activateChunkMap(int playerIndex, int wx, int wy, int chunkGridWidth) -
deactivateChunkMap
public static void deactivateChunkMap(int playerIndex) -
initWorld
public static void initWorld(int offsetX, int offsetY, int wx, int wy, int chunkGridWidth) -
updatePlayerList
-
beginUpdateChunk
-
updateChunk
public static void updateChunk(int x, int y, int z, int numShapes, byte[] shapes) -
endUpdateChunk
public static void endUpdateChunk() -
scrollChunkMap
public static void scrollChunkMap(int playerIndex, int dir) -
scrollChunkMapLeft
public static void scrollChunkMapLeft(int playerIndex) -
scrollChunkMapRight
public static void scrollChunkMapRight(int playerIndex) -
scrollChunkMapUp
public static void scrollChunkMapUp(int playerIndex) -
scrollChunkMapDown
public static void scrollChunkMapDown(int playerIndex) -
setVehicleActive
-
setVehicleStatic
-
addVehicle
public static void addVehicle(int ID, float x, float y, float z, float qx, float qy, float qz, float qw, String scriptName) -
removeVehicle
public static void removeVehicle(int ID) -
controlVehicle
public static void controlVehicle(int ID, float engineForce, float brakeForce, float steerAngle) -
setVehicleActive
public static void setVehicleActive(int ID, boolean active) -
applyCentralForceToVehicle
public static void applyCentralForceToVehicle(int ID, float fx, float fy, float fz) -
applyTorqueToVehicle
public static void applyTorqueToVehicle(int ID, float tx, float ty, float tz) -
teleportVehicle
public static void teleportVehicle(int ID, float x, float y, float z, float qx, float qy, float qz, float qw) -
setTireInflation
public static void setTireInflation(int ID, int wheelIndex, float inflation) -
setTireRemoved
public static void setTireRemoved(int ID, int wheelIndex, boolean removed) -
stepSimulation
public static void stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) -
getVehicleCount
public static int getVehicleCount() -
getVehiclePhysics
public static int getVehiclePhysics(int offset, float[] out) -
getOwnVehiclePhysics
public static int getOwnVehiclePhysics(int vid, float[] out) -
setOwnVehiclePhysics
public static int setOwnVehiclePhysics(int vid, float[] data) -
setVehicleParams
public static int setVehicleParams(int vid, float[] data) -
setVehicleMass
public static int setVehicleMass(int vid, float mass) -
getObjectPhysics
public static int getObjectPhysics(float[] out) -
createServerCell
public static void createServerCell(int x, int y) -
removeServerCell
public static void removeServerCell(int x, int y) -
addPhysicsObject
public static int addPhysicsObject(float x, float y) -
defineVehicleScript
-
setVehicleVelocityMultiplier
public static void setVehicleVelocityMultiplier(int vid, float maxSpeed, float multiplier) -
setVehicleStatic
public static int setVehicleStatic(int vid, boolean isStatic) -
addHingeConstraint
public static int addHingeConstraint(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB) -
addPointConstraint
public static int addPointConstraint(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB) -
addRopeConstraint
public static int addRopeConstraint(int vidA, int vidB, float pivotXA, float pivotYA, float pivotZA, float pivotXB, float pivotYB, float pivotZB, float linearLimit) -
removeConstraint
public static void removeConstraint(int id)
-