Ejemplo n.º 1
0
        public static PTransformer CalcEffectiveMass(PBody b, Vector2f r)
        {
            PTransformer mass = new PTransformer(b.invM + b.invI * r.y * r.y,
                                                 -b.invI * r.x * r.y, -b.invI * r.x * r.y, b.invM + b.invI * r.x
                                                 * r.x);

            mass.InvertEqual();
            return(mass);
        }
Ejemplo n.º 2
0
        public static PTransformer CalcEffectiveMass(PBody b1, PBody b2,
                                                     Vector2f r1, Vector2f r2)
        {
            PTransformer mass = new PTransformer(b1.invM + b2.invM + b1.invI * r1.y
                                                 * r1.y + b2.invI * r2.y * r2.y, -b1.invI * r1.x * r1.y
                                                 - b2.invI * r2.x * r2.y, -b1.invI * r1.x * r1.y - b2.invI
                                                 * r2.x * r2.y, b1.invM + b2.invM + b1.invI * r1.x * r1.x
                                                 + b2.invI * r2.x * r2.x);

            mass.InvertEqual();
            return(mass);
        }
Ejemplo n.º 3
0
		public static PTransformer CalcEffectiveMass(PBody b, Vector2f r) {
			PTransformer mass = new PTransformer(b.invM + b.invI * r.y * r.y,
					-b.invI * r.x * r.y, -b.invI * r.x * r.y, b.invM + b.invI * r.x
							* r.x);
			mass.InvertEqual();
			return mass;
		}
Ejemplo n.º 4
0
		public static PTransformer CalcEffectiveMass(PBody b1, PBody b2,
				Vector2f r1, Vector2f r2) {
			PTransformer mass = new PTransformer(b1.invM + b2.invM + b1.invI * r1.y
					* r1.y + b2.invI * r2.y * r2.y, -b1.invI * r1.x * r1.y
					- b2.invI * r2.x * r2.y, -b1.invI * r1.x * r1.y - b2.invI
					* r2.x * r2.y, b1.invM + b2.invM + b1.invI * r1.x * r1.x
					+ b2.invI * r2.x * r2.x);
			mass.InvertEqual();
			return mass;
		}