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); } }
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); }
public void Render(AABBXna aabb) { }