public class Bullet extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
VERSION
The version of the Bullet library used by this wrapper.
|
| Constructor and Description |
|---|
Bullet() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Node> |
getShapeParts(Iterable<T> nodes,
Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> out,
int offset,
Pool<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> pool) |
static void |
getShapeParts(Node node,
boolean applyTransform,
Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> out,
int offset,
Pool<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> pool) |
static void |
init()
Loads the native Bullet native library and initializes the gdx-bullet extension.
|
static void |
init(boolean useRefCounting)
Loads the native Bullet native library and initializes the gdx-bullet extension.
|
static void |
init(boolean useRefCounting,
boolean logging)
Loads the native Bullet native library and initializes the gdx-bullet extension.
|
static btCollisionShape |
obtainStaticNodeShape(Array<Node> nodes)
Obtain a
btCollisionShape based on the specified nodes, which can be used for a static body but not for a dynamic
body. |
static btCollisionShape |
obtainStaticNodeShape(Node node,
boolean applyTransform) |
static btCollisionShape |
obtainStaticShape(Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> parts) |
public static final int VERSION
public static void init()
public static void init(boolean useRefCounting)
useRefCounting - Whether to use reference counting, causing object to be destroyed when no longer referenced. You must
use BulletBase.obtain() and BulletBase.release() when using reference counting.public static void init(boolean useRefCounting,
boolean logging)
useRefCounting - Whether to use reference counting, causing object to be destroyed when no longer referenced. You must
use BulletBase.obtain() and BulletBase.release() when using reference counting.logging - Whether to log an error on potential errors in the application.public static void getShapeParts(Node node, boolean applyTransform, Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> out, int offset, Pool<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> pool)
public static <T extends Node> void getShapeParts(Iterable<T> nodes, Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> out, int offset, Pool<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> pool)
public static btCollisionShape obtainStaticNodeShape(Node node, boolean applyTransform)
public static btCollisionShape obtainStaticNodeShape(Array<Node> nodes)
btCollisionShape based on the specified nodes, which can be used for a static body but not for a dynamic
body. Depending on the specified nodes the result will be either a btBvhTriangleMeshShape or a
btCompoundShape of multiple btBvhTriangleMeshShape's. Where possible, the same btBvhTriangleMeshShape will be reused
if multiple nodes use the same (mesh) part. The node transformation (translation and rotation) will be included, but scaling
will be ignored.nodes - The nodes for which to obtain a node, typically this would be: `model.nodes`.public static btCollisionShape obtainStaticShape(Array<com.badlogic.gdx.physics.bullet.Bullet.ShapePart> parts)
Copyright © 2021. All rights reserved.