internal override void createProduct(SimObjectBase instance, BulletScene scene) { btCompoundShape shape = new btCompoundShape(0.0f); ReshapeableRigidBody rigidBody = new ReshapeableRigidBody(this, scene, shape, instance.Translation, instance.Rotation); instance.addElement(rigidBody); }
public void startCompound(string name) { if (currentCompound == null) { currentCompound = new btCompoundShape(ShapeMargin); } else { throw new Exception(String.Format("Error loading compound collision shape {0}. The compound object already exists.", name)); } }
protected override void Dispose() { foreach (var section in sections) { section.Dispose(); } sections.Clear(); compoundShape.Dispose(); compoundShape = null; base.Dispose(); }
public CompoundShapeCollection(btCompoundShape collisionShape, String name) : base(collisionShape, name) { this.count = collisionShape.ChildCount; }
public void stopCompound(string name) { repository.addCollection(new CompoundShapeCollection(currentCompound, name)); currentCompound = null; }
public BulletShapeBuilder() { currentCompound = null; ShapeMargin = 0.04f; }
public ReshapeableRigidBody(ReshapeableRigidBodyDefinition description, BulletScene scene, btCompoundShape collisionShape, Vector3 initialTrans, Quaternion initialRot) : base(description, scene, collisionShape, initialTrans, initialRot) { this.compoundShape = collisionShape; }