protected Vector3 SetMass(float mass) { PrimitiveProperties primitiveProperties = new PrimitiveProperties(PrimitiveProperties.MassDistributionEnum.Solid, PrimitiveProperties.MassTypeEnum.Density, mass); collision.GetMassProperties(primitiveProperties, out junk, out com, out it, out itCoM); body.BodyInertia = itCoM; body.Mass = junk; return(com); }
public Vector3 SetMass(float mass) { PrimitiveProperties primitiveProperties = new PrimitiveProperties(PrimitiveProperties.MassDistributionEnum.Solid, PrimitiveProperties.MassTypeEnum.Density, mass); float junk; Vector3 com; Matrix it, itCoM; collision.GetMassProperties(primitiveProperties, out junk, out com, out it, out itCoM); body.BodyInertia = itCoM; body.Mass = junk; centerOfMass = com; return(com); }
internal Vector3 SetMass(float mass) { PrimitiveProperties primitiveProperties = new PrimitiveProperties( PrimitiveProperties.MassDistributionEnum.Solid, PrimitiveProperties.MassTypeEnum.Mass, mass); float oMass; Vector3 com = new Vector3(); Matrix it, itCom; Skin.GetMassProperties(primitiveProperties, out oMass, out com, out it, out itCom); body.BodyInertia = itCom; body.Mass = oMass; return(com); }
private Vector3 ApplyMass(float mass) { float junk; Vector3 com; Microsoft.Xna.Framework.Matrix it; Microsoft.Xna.Framework.Matrix itCoM; var primitiveProperties = new PrimitiveProperties(PrimitiveProperties.MassDistributionEnum.Solid, PrimitiveProperties.MassTypeEnum.Mass, mass); collisionSkin.GetMassProperties(primitiveProperties, out junk, out com, out it, out itCoM); PhysicsBody.BodyInertia = itCoM; PhysicsBody.Mass = junk; return(com); }
private static Vector3 SetMass(float mass, CollisionSkin skin, Body body) { PrimitiveProperties primitiveProperties = new PrimitiveProperties( PrimitiveProperties.MassDistributionEnum.Solid, PrimitiveProperties.MassTypeEnum.Mass, mass); float junk; Vector3 com; Matrix4 it; Matrix4 itCoM; skin.GetMassProperties(primitiveProperties, out junk, out com, out it, out itCoM); body.BodyInertia = itCoM; body.Mass = junk; return(com); }