public void renderWhenReady(GraphicsDevice graphicsDevice, Matrix transform, RenderHints hints) { ConvexRenderStuff stuff = new ConvexRenderStuff(); stuff.Convex = this; stuff.GraphcisDevice = graphicsDevice; stuff.Transform = transform; stuff.Hints = hints; readyToBeDrawn.Add(stuff); }
public void render(GraphicsDevice graphicsDevice, Matrix transform, RenderHints hints) { PrimitiveBatch primBatch = PrimitiveBatch.getInstance(graphicsDevice); primBatch.Transform = transform; primBatch.Begin(hints.PrimitiveType); VectorSet vSet = calculateTrans(); vSet.forEachVector(v => { primBatch.AddVertex(v, hints.Color); }); primBatch.End(); }
/// <summary> /// Draws the Bound /// </summary> /// <param name="info">The RenderInfo needed to draw an object</param> /// <param name="hints">any special instructions for drawing</param> public void draw(RenderInfo info, RenderHints hints) { //convex.Origin -= Vector.One; convex.render(info.SpriteBatch, info.Transform, hints); }
public void render(SpriteBatch spriteBatch, Matrix transform, RenderHints hints) { render(spriteBatch.GraphicsDevice, transform, hints); }