Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        bool AddTexture(string filename, Pixel.Rhino.DocObjects.TextureType which, bool front)
        {
            IntPtr pMaterial = NonConstMaterialPointer(front);

            return(UnsafeNativeMethods.ON_Material_AddTexture(pMaterial, filename, (int)which));
        }