![]() |
【转帖】linetype rendering question
linetype rendering question
linetype rendering question hi, we have implemented some initial linetype rendering - our odgsview derived polylinedc() is not working properly yet, but the polyline() function do. some of the linetypes are rendered partially. my 2 questions are: - why after new regen() at different zoom factors the linetype is changed (seem to be dependent to the current view height). is there any property to control this behaviour? - why polylinedc is also needed to render the linetype - isn't a linetyped entity just another common model geometry - why screen information is needed in order to generate the output? this is very bad for us since we're using opengl based library and we need to cache the geometry in display lists - which is very difficuly (rather than impossible) to be done through playing with model and projection matrices for each line segment rendered. thanks for any help in advance. regards chudomir hi, in old vectorization classes (odgismartdrawobject) linetype was wrongly applied in projected 2d screen coordinates. we thought it's better because it produced equal length dashes on a paper and reduced count of points to process in 3d-pipeline. now we see that linetype should be applied in wcs. this probably can be done in old vectorizer but we strongly recommend to use new vectorization classes (v1.10+) where linetype is applied in ocs (that's actually is not absolutely correct but agrees with world caching). besides, the new classes (odgsbasevectorizedevice, odgsbasevectorizeview) are more flexible in general. hi dimitry, thank you very much for your reply. unfortunately i had no time to explore the new vectorize classes. can you please help me in clarifying a thing about them: i saw you support automatically trimming of the elements though a viewport; can this be turned off? if not, then this is not too applicable for us, because we generate a model space cache and adjust it through opengl stencils. so zoom, pan and etc commands are quickly applicable to a viewport. if you generate a "trimmed" elements at the polyline(), polygon() and etc functions, then we cannot cache the whole model space geometry properly as seen through a viewport. or i suppose i can do a "local" vectorize renderer only for the linetyped elements, and to store the geometry in some data structure, then turn back to opengl? ... thanks for your help. regards chudomir hi chudo, >>i saw you support automatically trimming of the elements though a viewport; can this be turned off? what are you talking about ? our new gdi sample device just clips by near/far planes (if they are enabled). our new opengl device sends all 3d geometry to gl. odvectorizeex example clips geometry but it can be simply disabled by commenting out of few lines in exsimpleview::update(). hi dimirty, i talked about the situation, when i have a line seen through a paperspace viewport - if the line is partially hidden, then do you give it back at its full size in world coords, or only the part that is "visible"? in the old smartdrawobject i received the line in its full size, and i had to trim (clip) it by myself when seen through a viewport. sorry for being unclear. regards chudomir hi chudomir, now i see. in this aspect it is all the same in the new devices. thanks for your help dimitry, i'll try to replace my odgsbaseview with odgsbasevectorizeview or whatever and will see what changes are needed in the code to migrate. hope the linetypes will go ok then. i'll post back if having some problems. thanks again. regards chudomir |
所有的时间均为北京时间。 现在的时间是 03:10 AM. |