Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 public void render(SpriteBatch spriteBatch, Matrix transform, RenderHints hints)
 {
     render(spriteBatch.GraphicsDevice, transform, hints);
 }