GetPixels() private method

private GetPixels ( ) : Color[]
return Color[]
Example #1
0
 static public int GetPixels(IntPtr l)
 {
     try{
         if (matchType(l, 2, typeof(System.Int32)))
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             System.Int32          a1;
             checkType(l, 2, out a1);
             UnityEngine.Color[] ret = self.GetPixels(a1);
             pushValue(l, ret);
             return(1);
         }
         else if (matchType(l, 2))
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             UnityEngine.Color[]   ret  = self.GetPixels();
             pushValue(l, ret);
             return(1);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int GetPixels(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             var ret = self.GetPixels();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             System.Int32          a1;
             checkType(l, 2, out a1);
             var ret = self.GetPixels(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #3
0
 static public int GetPixels(IntPtr l)
 {
     try {
         UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
         var ret = self.GetPixels();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #4
0
 static public int GetPixels__Int32(IntPtr l)
 {
     try {
         UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
         System.Int32          a1;
         checkType(l, 2, out a1);
         var ret = self.GetPixels(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GetPixels(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             var ret = self.GetPixels();
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (argc == 2)
         {
             UnityEngine.Texture3D self = (UnityEngine.Texture3D)checkSelf(l);
             System.Int32          a1;
             checkType(l, 2, out a1);
             var ret = self.GetPixels(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function GetPixels to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #6
0
 void Create3DLutTex(int dim)
 {
     _3dlut = new Texture3D (dim, dim, dim, TextureFormat.ARGB32, false);
     _3dlut.wrapMode = TextureWrapMode.Clamp;
     _3dlut.filterMode = FilterMode.Bilinear;
     _3dlut.anisoLevel = 0;
     _3dcolors = _3dlut.GetPixels ();
 }
    protected override void OnScriptAwake()
    {
        base.OnScriptAwake();

        _mesh = GetComponentInChildren<MeshFilter>().sharedMesh;
        _renderer = GetComponentInChildren<MeshRenderer>();
        _texture = (Texture3D)_renderer.sharedMaterial.mainTexture;
        _colors = _texture.GetPixels();
    }