CC Subdivide Surface With TexCoord

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CC Subdivide Surface With TexCoord

Bo Schwarzstein-2
Hi all,
    I am trying to process texcoord on origin control mesh when the CGAL subdivide the mesh, But it seems that it's very difficult to do that, should I modify the geometry policy as the manual said "You are allowed to use any point class as long as it is defined as the Point 3 in your polyhedron. You may need to modify the geometry policy to support the computation and the assignment of the specialized point. This extension is not unusual in graphics applications. For example, you might want to subdivide the texture coordinates for your subdivision surface" ? Could you give me some tutorial or some others learning material ?
   Thanks very much.
Reply | Threaded
Open this post in threaded view
|

Re: CC Subdivide Surface With TexCoord

Peter Schröder
Bo Schwarzstein wrote:
Hi all,
    I am trying to process texcoord on origin control mesh when the CGAL subdivide the mesh, But it seems that it's very difficult to do that, should I modify the geometry policy as the manual said "You are allowed to use any point class as long as it is defined as the Point 3 in your polyhedron. You may need to modify the geometry policy to support the computation and the assignment of the specialized point. This extension is not unusual in graphics applications. For example, you might want to subdivide the texture coordinates for your subdivision surface" ? Could you give me some tutorial or some others learning material ?
   Thanks very much.
Unfortunately the way subdivision is implemented in CGAL the Point3 part of subdivision is pretty much baked in. The only way I found that one can change the type of entity that is subdivided is by rewriting part of the class hierarchy (you make your own derivation at a certain point of the class hierarchy but it does lead to copying basically all the code that actually performs the subdivision). A better approach might be a redesign with traits classes to abstract out the type of entity which is subdivided. This would also allow all manner of other interesting things such as normal subdivision (on the sphere) and more exotic things.

Peter