How to render CGAL objects in OpenGL properly? -


i quite new cgal opengl. know cgal provides qt interface display objects want use opengl , able render polyhedrons , nef polyhedrons in opengl(i referred polyhedron demo). question is, how display polyhedrons of different size efficiently in opengl. apply translation in program using gltranslatef view objects properly. problem is, may not work each , every object because of difference in size. therefore need apply translations based on size of object. if can find longest diagonal of object may possible adjusting value of parameters pass gltranslatef(). there way in cgal?

treat objects collection of points, , create bounding volume it. size of bounding volume should give scaling required. example, might wish center view around center of bounding sphere, , scale view based on radius.

see chapter on bounding volumes.

also, want use glscale scale view in addition gltranslate center it.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -