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

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】extures (http://www.dimcax.com/hust/showthread.php?t=18752)

yang686526 2009-05-07 04:54 PM

【转帖】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.


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