Skip to content

palerzhang/Fast-Quadric-Mesh-Simplification-OO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Fast-Quadric-Mesh-Simplification-OO

The original project is Fast-Quadric-Mesh-Simplification by Spacerat. It is Procedure-Oriented programmed with C/C++.

For some kinds of use, I re-arrange Fast-Quadric-Mesh-Simplification with OO programming in C++.

Note that:

  1. I do not change the main structure of original codes in Fast-Quadric-Mesh-Simplification.
  2. I create a class to wrap the original C codes in Fast-Quadric-Mesh-Simplification.
  3. I tried to change type 'double' to type 'float', but got wrong result (some coordinates of vertex are NaN). It might because of the low precision of 'float'

What's new in Fast-Quadric-Mesh-Simplification-OO?

  1. I implement a function called 'OptimizeVertices' to do merge and remove the duplicates. Call this function before the simplification and after initilization of data. I notice that when there are vertices with same position in the vertex list, the simplified result will be wrong. For example, a corner of a cube may have more than 3 vertices. They have same position but different normal, uv and index. Actually, In many representations of 3D model (file or runtime), this kind of situation occurs because position, normal, uv and index are treated as attributes of a vertex. However, they need to be treated as one single vertex in Fast-Quadric-Mesh-Simplification.

License: MIT license

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages