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

odgenurbsurface glunurbssurface
odgenurbsurface glunurbssurface
dders,
i have been tyring to get a 3d solid comprised of surfaces view the breps to display correctly in opengl using the glunurbsrenderer.
i have gotton pretty far,in the sense it looks like the shape but square ????
ie: if it is displayed as a circle in autocad, i get a square instead.
ok, what i am doing is as follows, in the
glunurbssurface(g_pnrbs, numknotsinu(), getuknots(),
numknotsinv(), getvknots,
numcontrolpointsinu() * 3, 3,
pctrlpnts,
numcontrolpointsinu(), numcontrolpointsinv(), gl_map2_vertex_3);
does the above seem reasonable that it should work, or am i doing something obviously very stupid ?
cheers
jason

jason, there's nothing obviously very stupid.
a thing that may be key to success - control points in some nurbs representations are stored multiplied by corresponding knots, in some - not multiplied.
maybe using gl_map2_vertex_4 and passing control points multiplied by weight (with weight as 4th coordinate) will help.
sincerely yours,
george udov
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)