查看单个帖子
旧 2009-05-04, 03:33 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】acdbabstractviewtablerecordcenterpoint90

acdbabstractviewtablerecord::centerpoint() ?
acdbabstractviewtablerecord::centerpoint() ?
hi,
i need to render an autocad drawing in the same view that was saved in the drawing itself.
i was using overrided odgsbaseview::setview(
const odgepoint3d& pos,
const odgepoint3d& target,
const odgevector3d& upvec,
double fieldwidth,
double fieldheight,
projection projection);
but it seems to me that it is not the full information needed at all - when there is a middle mouse button pan in acad, then only the viewcenter point is changed (viewctr var) and not the camera parameters passed here.
that's why i'm accessing the acdbviewporttablerecord (when in model space), to achieve the centerpoint stored in the drawing.
but what should do with this view center point to make it work at least for parallel view?
in our output system (based on opengl) i can set position and orientation of the camera, as well as view height. there is no view center and panning means changing the camera position.
i should change the position due to the centerpoint() or "pos" argument passed - how to choose which?
another: activate the 3d orbit command and make a pan only. now its view center that is not changed at all. camera position however looks updated.
thanks in advance for any help for getting out of this total smash...
regards
chudomir
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)