use of com.bulletphysics.collision.shapes.CompoundShape in project jmonkeyengine by jMonkeyEngine.
the class CompoundCollisionShape method addChildShapeDirect.
private void addChildShapeDirect(CollisionShape shape, Vector3f location, Matrix3f rotation) {
if (shape instanceof CompoundCollisionShape) {
throw new IllegalStateException("CompoundCollisionShapes cannot have CompoundCollisionShapes as children!");
}
Transform transA = new Transform(Converter.convert(rotation));
Converter.convert(location, transA.origin);
Converter.convert(rotation, transA.basis);
((CompoundShape) cShape).addChildShape(transA, shape.getCShape());
}
Aggregations