bool SetTexture(Pixel.Rhino.DocObjects.Texture texture, Pixel.Rhino.DocObjects.TextureType which, bool front) { IntPtr pMaterial = NonConstMaterialPointer(front); IntPtr pTexture = texture.ConstPointer(); return(UnsafeNativeMethods.ON_Material_SetTexture(pMaterial, pTexture, (int)which)); }
Pixel.Rhino.DocObjects.Texture GetTexture(Pixel.Rhino.DocObjects.TextureType which, bool front) { IntPtr pConstMaterial = ConstMaterialPointer(front); int index = UnsafeNativeMethods.ON_Material_GetTexture(pConstMaterial, (int)which); if (index >= 0) { return(new Pixel.Rhino.DocObjects.Texture(index, this, front)); } return(null); }
bool AddTexture(string filename, Pixel.Rhino.DocObjects.TextureType which, bool front) { IntPtr pMaterial = NonConstMaterialPointer(front); return(UnsafeNativeMethods.ON_Material_AddTexture(pMaterial, filename, (int)which)); }