示例#1
0
        // Adds a bounding box to the vertex cache, and returns the index of the segment it belongs to.
        public uint AddTopBox(BoundingBox box, Color color, float thickness, bool warp)
        {
            if (VertexCount >= MaxVertexSpace)
            {
                return(0);
            }

            int numVertex = VertexCount + (int)Drawer3D.PrimitiveVertexCounts.TopBox;

            if (numVertex >= MaxTriangles * 3)
            {
                Grow();
            }

            Drawer3D.WriteTopBox(box.Min, box.Max - box.Min, color, thickness, warp, VertexCount, Verticies);
            return(AddSegment((int)Drawer3D.PrimitiveVertexCounts.TopBox));
        }