public class PhysicsTestHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
createBallShooter(Application app,
Node rootNode,
PhysicsSpace space)
creates the necessary input listener and action to shoot balls from the camera
|
static Geometry |
createGImpactTestFloor(AssetManager assetManager,
float floorDimensions,
Vector3f position)
Creates a curved "floor" with a GImpactCollisionShape provided as the RigidBodyControl's collision
shape.
|
static Geometry |
createMeshTestFloor(AssetManager assetManager,
float floorDimensions,
Vector3f position)
Creates a curved "floor" with a MeshCollisionShape provided as the RigidBodyControl's collision shape.
|
static Geometry |
createPhysicsTestBox(AssetManager assetManager)
creates a box geometry with a RigidBodyControl
|
static Node |
createPhysicsTestNode(AssetManager manager,
CollisionShape shape,
float mass)
creates an empty node with a RigidBodyControl
|
static Geometry |
createPhysicsTestSphere(AssetManager assetManager)
creates a sphere geometry with a RigidBodyControl
|
static void |
createPhysicsTestWorld(Node rootNode,
AssetManager assetManager,
PhysicsSpace space)
creates a simple physics test world with a floor, an obstacle and some test boxes
|
static void |
createPhysicsTestWorldSoccer(Node rootNode,
AssetManager assetManager,
PhysicsSpace space) |
public static void createPhysicsTestWorld(Node rootNode, AssetManager assetManager, PhysicsSpace space)
rootNode - where lights and geometries should be addedassetManager - for loading assetsspace - where collision objects should be addedpublic static void createPhysicsTestWorldSoccer(Node rootNode, AssetManager assetManager, PhysicsSpace space)
public static Geometry createPhysicsTestBox(AssetManager assetManager)
assetManager - for loading assetspublic static Geometry createPhysicsTestSphere(AssetManager assetManager)
assetManager - for loading assetspublic static Node createPhysicsTestNode(AssetManager manager, CollisionShape shape, float mass)
manager - for loading assetsshape - a shape for the collision objectmass - a mass for rigid bodypublic static void createBallShooter(Application app, Node rootNode, PhysicsSpace space)
app - the application that's runningrootNode - where ball geometries should be addedspace - where collision objects should be addedpublic static Geometry createGImpactTestFloor(AssetManager assetManager, float floorDimensions, Vector3f position)
assetManager - for loading assetsfloorDimensions - width/depth of the "floor" (X/Z)position - sets the floor's local translationpublic static Geometry createMeshTestFloor(AssetManager assetManager, float floorDimensions, Vector3f position)
assetManager - for loading assetsfloorDimensions - width/depth of the "floor" (X/Z)position - sets the floor's local translation