![]() |
【转帖】how to improve precision
how to improve precision
how to improve precision take circle for example, a circle will be simplified as polyline. in other words, a circle will be simplified into a lot of short arcs on screen. but if i zoom in the circle. it will looks like a polygon. so i want to know if there exist some variable to control the precision of a circle or an ellipse. if i want to make the circle more smooth, which function can i use. my client class is derived from odgigeometrysimplifier and odgsbasevectorizedevice. just like the class exgssimpledevice portrayed in odvectorizeex. thanks for any answer. i had similar problem once and solved it by overriding these 2 virtual member functions: double myview::deviation(const odgideviationtype, const odgepoint3d&) const { return 0.01; } double myview::modeldeviation(const odgideviationtype /*type*/, const odgepoint3d& /*modelpoint*/) const { return 0.01; } the stuff looks smooth enough. however, you can change this constants or even make them depending on the current zoom factor. myview is derived from odgsbasevectorizeview and odgigeometrysimplifier best regards chudomir quote: originally posted by xbull my client class is derived from odgigeometrysimplifier and odgsbasevectorizedevice. just like the class exgssimpledevice portrayed in odvectorizeex. odgigeometrysimplifier::setdeviation should be used for this purpose. exgigdigeometry.cpp and gsopenglvectorizer.cpp contains examples of using this method. sincerely yours, george udov done! thanks very much! |
所有的时间均为北京时间。 现在的时间是 10:47 AM. |