Jump to content
JBenghiat

Setting texture map

Recommended Posts

I'm having trouble seeing a VWObject's texture mapping.  The code below properly assigns a texture, but the mapping remains unchanged. Is anyone mapping textures successfully with SetTextureMappingInfo()?

 

void ApplyTextureToObject(VWFC::VWObjects::VWObject &inObject, const double &mf)
{
    inObject.SetTexture(fTextureID, kTexturePart_Overall);
    TextureMappingInfoSDK txtrMap;
    txtrMap.f2DScale = mf;
    txtrMap.fParamSpaceKind = kParamSpaceKind_Plane;
    inObject.SetTextureMappingInfo(kTexturePart_Overall, txtrMap);
}

 

Share this post


Link to post

Hi, Joshua(@JBenghiat)

 

I'm also trying the texture mapping and not going anywhere 💀

Did you finally manage to set up the texture mapping?

 

Thanks

--Carles

Edited by Carles Olle

Share this post


Link to post

Yes, add this line after defining the texture mapping info variable:

inObject.GetTextureMappingInfo(kTexturePart_Overall, txtrMap);

This makes sure the structure is properly initialized for the object type.

  • Like 1

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...