BEPUphysics.Entities.MorphableEntity.SetCollisionInformation C# (CSharp) Method

SetCollisionInformation() public method

Sets the collision information of the entity to another collidable.
public SetCollisionInformation ( EntityCollidable newCollisionInformation, float newMass, Matrix3x3 newInertia ) : void
newCollisionInformation BEPUphysics.BroadPhaseEntries.MobileCollidables.EntityCollidable New collidable to use.
newMass float New mass to use for the entity.
newInertia BEPUutilities.Matrix3x3 New inertia tensor to use for the entity.
return void
        public void SetCollisionInformation(EntityCollidable newCollisionInformation, float newMass, Matrix3x3 newInertia)
        {
            //Temporarily remove the object from the space.  
            //The reset process will update any systems that need to be updated.
            //This is not thread safe, but this operation should not be performed mid-frame anyway.
            ISpace space = Space;
            if (space != null)
                Space.Remove(this);

            CollisionInformation.Entity = null;

            Initialize(newCollisionInformation, newMass, newInertia);

            if (space != null)
                space.Add(this);
        }

Same methods

MorphableEntity::SetCollisionInformation ( EntityCollidable newCollisionInformation ) : void
MorphableEntity::SetCollisionInformation ( EntityCollidable newCollisionInformation, float newMass ) : void