Exemple #1
0
        bool SetTexture(Rhino.DocObjects.Texture texture, Rhino.DocObjects.TextureType which, bool front)
        {
            IntPtr pMaterial = NonConstMaterialPointer(front);
            IntPtr pTexture  = texture.ConstPointer();

            return(UnsafeNativeMethods.ON_Material_SetTexture(pMaterial, pTexture, (int)which));
        }
Exemple #2
0
        Rhino.DocObjects.Texture GetTexture(Rhino.DocObjects.TextureType which, bool front)
        {
            IntPtr pConstMaterial = ConstMaterialPointer(front);
            int    index          = UnsafeNativeMethods.ON_Material_GetTexture(pConstMaterial, (int)which);

            if (index >= 0)
            {
                return(new Rhino.DocObjects.Texture(index, this, front));
            }
            return(null);
        }
Exemple #3
0
        bool AddTexture(string filename, Rhino.DocObjects.TextureType which, bool front)
        {
            IntPtr pMaterial = NonConstMaterialPointer(front);

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