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

textures
textures
hi to all,
i am trying to find a functionality in the dwg library for assigning a texture to an object. i have explored the odavematerial class, but it is used only for materials.
any ideas?
thanks in advance
hi,
odavematerial class can keep an image as well.
you can attach a material to object by odavematerial::attachtoobject() method.
to define how material is mapped onto object (texture mapping) acad uses ave_entity_material xdata of object. at the moment dd does not provide separate interface for mapping xdata. as workaround you can use oddbobject::xdata()/setxdata() methods (with "ave_entity_material" as regapp name) to define mapping attributes.
regards,
sergey vishnevetsky
quote:
originally posted by sergey vishnevetsky
hi,
odavematerial class can keep an image as well.
you can attach a material to object by odavematerial::attachtoobject() method.
to define how material is mapped onto object (texture mapping) acad uses ave_entity_material xdata of object. at the moment dd does not provide separate interface for mapping xdata. as workaround you can use oddbobject::xdata()/setxdata() methods (with "ave_entity_material" as regapp name) to define mapping attributes.
thank you for the reply.
is there any documentation on what needs to go into the xdata i.e. how do i define/what is the syntax for the mapping attributes? i just need a simple planar mapping to stretch a texture over a surface.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)