Re: remove edge



roboos wrote:
hi

I need help. How can I remove an edge from mesh.
I have cube mesh loaded from file.
I use Index buffer to get faces and vertex buffer to get vertices,

Cube has 24 vertices and 12 faces, how can I remove one edge. I dont
know what vertices are shared

Normal cube have 8 vertices and 12 faces, how can i recognize what
vertices from 24 are shared by cube faces. I want to collapse one
edge.

Please help


Well you got a Cube with 24 Vertices... that sounds quite normal because a Cube has 6 sides each of one with 4 vertices (makes 24).
(12 faces because every side is shown via 2 triangles)

The reason they are duplicated is because normally you want sharp edges (with lighting), but you can just define one normal per vertex. If you really want to collapse them the easiest approach would be:
for every vertex:
check all others:
if they are identical (ore slightly different):
replace one by the other

(it could be faster with some sorting or whatever, but well.. thats just 24 vertices...)

In general, i dont know why you would do that. Some Modelling tools have such a functon,. but as this is for sharp edges, its useless.

By the way, what you want is not to remove an edge (well i suppose), but the vertices, if you really want to remove dges, there are plenty of edge-collapse technices)
.



Relevant Pages

  • Mesh Face/Vertices Relationship Problem
    ... I want the user to be able to select a point on a mesh, ... I've created a test harness program that draws a simply cube on ... is not creating an index buffer at all? ... the IntersectInformation that I get returned from my intersection test ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: Mesh Face/Vertices Relationship Problem
    ... index buffer you have to share everything about those vertices colors, ... face based on the normals at each corner. ... However a cube doesn't need vertex normals - ... > I want the user to be able to select a point on a mesh, ...
    (microsoft.public.win32.programmer.directx.managed)
  • remove edge
    ... I use Index buffer to get faces and vertex buffer to get vertices, ... Cube has 24 vertices and 12 faces, how can I remove one edge. ... Normal cube have 8 vertices and 12 faces, ... I want to collapse one ...
    (microsoft.public.win32.programmer.directx.managed)
  • remove edge
    ... I use Index buffer to get faces and vertex buffer to get vertices, ... Cube has 24 vertices and 12 faces, how can I remove one edge. ... Normal cube have 8 vertices and 12 faces, ... I want to collapse one ...
    (comp.graphics.algorithms)
  • edge remove
    ... I use Index buffer to get faces and vertex buffer to get vertices, ... Cube has 24 vertices and 12 faces, how can I remove one edge. ... Normal cube have 8 vertices and 12 faces, ... I want to collapse one ...
    (microsoft.public.win32.programmer.directx.graphics)