Beispiel #1
0
        public void Render(AABBXna aabb)
        {
            var scaleMat = Matrix.CreateScale(
                    aabb.Width.X,
                    aabb.Width.Y,
                    aabb.Width.Z);
            var transMat = Matrix.CreateTranslation(aabb.Corner);
            BasicEffect.World = MathUtilXna.ToXnaMatrix(scaleMat * transMat);

            foreach (EffectPass pass in BasicEffect.CurrentTechnique.Passes)
            {
                pass.Apply();
                GraphicsDevice.DrawUserIndexedPrimitives<VertexPositionColor>(PrimitiveType.LineList, Vertices, 0, Vertices.Length, Indices, 0, 12);
            }
        }
Beispiel #2
0
        public void DrawAABB(AABBCollisionPrimitive primitive, Color color)
        {
            var aabb = new AABBXna()
            {
                Corner = primitive.Corner,
                Width = primitive.Width,
            };

            var renderParam = new AABBRenderParameter()
            {
                Color = color,
            };

            RenderManager.RenderAABB(aabb, renderParam);
        }
Beispiel #3
0
        public void Render(AABBXna aabb)
        {

        }