几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 03:47 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】adjusting texture bitmap

adjusting texture bitmap
adjusting texture bitmap
hi
i use the odavebitmap class to receive information of a texture bitmap position and scaling. so, the methods :
odavebitmap::scaleu();
....
and odavebitmap::scalev();
work fine for the map style fit to object, but they return incorrect values if i choose fixed scale map style and set the object size value.
in fact, there is no difference between fit to object and fixed scale - the returned values are the same.
my question is: can i get the object size value and to re-calculate the scale factor?
hi,
if i understand properly, you mean the "adjust material bitmap placement dialog box" in acad. the object size value refers only to preview in dialog and is not used while rendering.
quote:
object size
adjusts the size of the preview cube. you can use this option to preview the number of times the pattern tiles across the render objects. the larger the cube, the more material tiles are displayed.
scale specifies the number of times the bitmap fits onto the object in the u or v direction.
regards,
sergey vishnevetsky
hi,
that was the first thing i supposed but in fact in acad when i used the fixed scale option and the object size was set to some value it changed the scale factor not only for the preview but for the real render action - in dwgdirect the returned scale factor is equal for the fixed scale and fit to object. is it a difference between acad and dwgdirect?
thanks in advance
hi,
let's try to clear the subject up...
quote:
can i get the object size value and to re-calculate the scale factor?
at the moment (in dd 1.13 and previous) the preview objectsize value is missed in ave interface. it will be added in the next dd release.
quote:
in dwgdirect the returned scale factor is equal for the fixed scale and fit to object. is it a difference
between acad and dwgdirect?
in ddt the scale factor is returned/set by the methods:
odavebitmap::scaleu();
odavebitmap::scalev();
odavebitmap::setscaleu();
odavebitmap::setscalev();
independently of the methods:
odavebitmap::fittoobject();
odavebitmap::setfittoobject();
in acad a user can set the "scale" field in "adjust material bitmap placement" dialog box independently of "fixed scale/fit to object" and "object size" options.
quote:
when i used the fixed scale option and the object size was set to some value it changed the scale factor not only for the preview but for the real render action
as i know, the "object size" field does not have an influence on "scale" field in acad "adjust material bitmap placement" dialog box (the same for scale factor stored in file).
could you attach the drawings where the preview "objectsize" field affects real rendering?
regards,
sergey vishnevetsky
hi sergey,
you were right. object_size is used only for the preview. my problem was at another place. the differences between the results in fixed scale and fit to object are provoked by the real object size used for the first mode. this value is ignored for the second mode. i solved the problem by using the oddbentity::getgeomextents().
thank you for the support!
i have antoher question related to some scene settings for the render process: 1. ambient light ; 2. fog functionality.
i have explored the ave classes in the dwgdirect and i've noticed that they are kept in the odavefogopt class(for the fog) and odavepref class(for the ambient light) but i couldn't see how can i get a reference or a pointer to some objects of these classes.
note: for the scene lights i used the global functoin oddbgetlights().
is there anything similar way to get the fog and ambient light data?
thanks in advance
nino
hi,
code:
odaverenderoption renderopt;
renderopt.getrenderoption(pdb);
renderopt.m_pref;
renderopt.m_fogopt;
regards,
sergey vishnevetsky
thanks a lot!
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】about the display of the texture yang686526 DirectDWG 0 2009-05-04 03:24 PM
【转帖】rouble extracting png bitmap preview picture in asp.net application yang686526 SolidWorks二次开发 0 2009-04-12 10:42 PM
【转帖】bitmap button on property manager page yang686526 SolidWorks二次开发 0 2009-04-12 08:18 PM
OpenCSG-1.0.2 sample yogy vc编程 2 2007-07-22 04:43 PM
纹理映射:JeffMolofee(NeHe)的OPENGL教程-第六课 huangyhg OpenGL图形显示 0 2007-04-28 03:06 PM


所有的时间均为北京时间。 现在的时间是 05:55 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多