Interface ICamApiTexturedVO
Texture aspect of a visual object: an image mapped onto its faces using the mesh UV coordinates (ICamApiMeshBuilder.AddVertexUV). Implemented by the same object as ICamApiVisualObject (it also exposes ICamApiRenderableVO); flat : IUnknown, fetched via QueryInterface. Objects without drawable faces (e.g. a gizmo) do not implement it, so QI returns nil. Textured faces are drawn unlit (self-illuminated): the image shows at full brightness, modulated by the current color (ICamApiRenderableVO.SetColor) so a non-white color tints it. Faces whose vertices carry no UV, and objects with no texture set, render as usual.
Namespace: CAMAPI.ViewPort
Assembly: CAMAPI.ViewPort.dll
Syntax
[Guid("E5B2C9F3-6A48-4D17-8E35-2F7C0A9B1D64")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ICamApiTexturedVO
Methods
SetTextureFromFile(string)
Load an image file (PNG / JPG / BMP / TGA) and map it onto the object's faces via their UV coordinates. Pass an empty path to drop the texture and return to flat/colored faces. The file is read and uploaded to the GPU lazily on the next repaint (so this may be called from any thread).
Declaration
void SetTextureFromFile(string FilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | FilePath |