Ejemplo n.º 1
0
        public static Texture GetMap(MAP_DATA_TYPE type)
        {
            switch (type)
            {
            case MAP_DATA_TYPE.ColorMap:
                return(CVInterface.GetColorMap());

            case MAP_DATA_TYPE.DepthMap:
                /*if( Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer )
                 *      return CVInterface.GetUsersMap();
                 * else
                 */
                return(CVInterface.GetDepthMap());

            case MAP_DATA_TYPE.UserMap:
                return(CVInterface.GetUsersMap());

            case MAP_DATA_TYPE.ColorPointCloud:
                return(CVInterface.GetColorPointCloud());

            case MAP_DATA_TYPE.VertexPointCloud:
                return(CVInterface.GetVertexPointCloud());

            default:
                return(null);
            }
        }
Ejemplo n.º 2
0
        public static Vector2 GetMapSize(MAP_DATA_TYPE type)
        {
            Vector2 output = new Vector2();
            Texture map    = null;

            switch (type)
            {
            case MAP_DATA_TYPE.ColorMap:
                map = CVInterface.GetColorMap();
                break;

            case MAP_DATA_TYPE.DepthMap:
                if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer)
                {
                    //map = CVInterface.GetUsersMap();
                    map = CVInterface.GetDepthMap();
                }
                else
                {
                    map = CVInterface.GetDepthMap();
                }
                break;

            case MAP_DATA_TYPE.UserMap:
                map = CVInterface.GetUsersMap();
                break;

            case MAP_DATA_TYPE.ColorPointCloud:
                map = CVInterface.GetColorPointCloud();
                break;

            case MAP_DATA_TYPE.VertexPointCloud:
                map = CVInterface.GetVertexPointCloud();
                break;

            default:
                break;
            }
            if (map == null)
            {
                return(output);
            }
            output.x = map.width;
            output.y = map.height;

            return(output);
        }