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

odgiworldgeometrydumper:ushmodeltransform
odgiworldgeometrydumper:ushmodeltransform
there are two verisions of this method, one which takes in a odgematrix3d and one that takes in a odgevector3d. i have the one which take a matrix figured out, but don't know what i am expected to do with the one taking in a vector. i have not used. i figure i will need to make a matrix from the vector to push onto my stack, but am not that familuar with matrices, and therefore, do not know what to do.
any help would be appreciated.
steve

the method, taking a vector, pushes a matrix, performing transform from ocs to wcs (using arbitrary axis algorithm). if vector is n, this matrix can be obtained using odgematrix3d:lanetoworld(n).
for example if you have custom entity drawing as circle, with center a, normal n, radius r, and center is specified in ocs of this circle, worlddraw can take form:
code:
odcustomcircle::worlddraw(odgiworlddraw* pwd)
{
assertreadenabled();
pwd->geometry().pushmodeltransform(n);
pwd->geometry().circle(a, r, odgevector3d::kzaxis);
pwd->geometry().popmodeltransform();
}
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)