static void TestRay(Graphics.Software.Mesh mesh) { Graphics.Software.Triangle t; float dist; object ud; var ray = new Ray(new Vector3(-10, -10, -10), Vector3.Normalize(new Vector3(1, 1, 1))); Console.WriteLine("Ray " + ray); mesh.KDTree.IntersectClosest(ray, out t, out dist, out ud); }
public void DrawLines(Software.Vertex.Position3[] lines, Color color) { Software.Mesh mesh = new Graphics.Software.Mesh { MeshType = Graphics.MeshType.LineStrip, NVertices = lines.Length, NFaces = lines.Length - 1, VertexStreamLayout = Software.Vertex.Position3.Instance, VertexBuffer = new Software.VertexBuffer <Software.Vertex.Position3>(lines) }; var m = Content.MeshConcretize.Concretize10(view.Content, mesh, mesh.VertexStreamLayout); DrawLines(m, color); m.Dispose(); }
public override void Release(MeshConcretize metaResource, ContentPool content, Graphics.Software.Mesh resource) { }
public void DrawLines(Software.Vertex.Position3[] lines, Color color) { Software.Mesh mesh = new Graphics.Software.Mesh { MeshType = Graphics.MeshType.LineStrip, NVertices = lines.Length, NFaces = lines.Length - 1, VertexStreamLayout = Software.Vertex.Position3.Instance, VertexBuffer = new Software.VertexBuffer<Software.Vertex.Position3>(lines) }; var m = Content.MeshConcretize.Concretize10(view.Content, mesh, mesh.VertexStreamLayout); DrawLines(m, color); m.Dispose(); }