コード例 #1
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            if (!_body.IsStaticOrInactive)
            {
                _matWorld = _matScale * (_body.Orientation * JMatrix.CreateTranslation(_body.Position));

                SetPosition(_body.Position, false);
            }
        }
コード例 #2
0
        void DrawPoly(List <JVector> poly, JVector pos, JMatrix o, Color color)
        {
            for (int i = 0; i < poly.Count - 1; i++)
            {
                JVector a = JVector.Transform(poly[i], o * JMatrix.CreateTranslation(pos));
                JVector b = JVector.Transform(poly[i + 1], o * JMatrix.CreateTranslation(pos));
                DebugDrawer.DrawLine(a, b, color);
            }
            JVector c = JVector.Transform(poly[0], o * JMatrix.CreateTranslation(pos));
            JVector d = JVector.Transform(poly[poly.Count - 1], o * JMatrix.CreateTranslation(pos));

            DebugDrawer.DrawLine(c, d, color);
        }