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

odgiextcalc
odgiextcalc
hi,
is there any way do ignore some kind of entities while computing extents using odgiextcalc? i've tried to override dodraw but it's not called. cextentscalc derives from odgiextcalc.
code:
odrxobjectimpl<cextentscalc> extcalc;
extcalc.setcontext(pdwgcontext);
extcalc.draw(pspace);
extcalc.getextents(extents);
tia
regards,
micha? ?liwka
quote:
originally posted by sliwka
hi,
is there any way do ignore some kind of entities while computing extents using odgiextcalc? i've tried to override dodraw but it's not called. cextentscalc derives from odgiextcalc.
code:
odrxobjectimpl<cextentscalc> extcalc;
extcalc.setcontext(pdwgcontext);
extcalc.draw(pspace);
extcalc.getextents(extents);
tia
regards,
michal sliwka
this message does not appear in my forum search result, so i post it again.
regards,
michal sliwka
this is implementation of odgiextcalc::draw
code:
void odgiextcalc::draw(const odgidrawable* pdrawable)
{
m_bboxset = false;
pdrawable->setattributes(this);
pdrawable->worlddraw(this);
m_bboxset = false;
}
it call worlddraw. worlddraw will call ::draw() inside and ....
so it seems that you should add check inside void odgiextcalc::draw(const odgidrawable* pdrawable), not inside dodraw.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)