示例#1
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();
        DrawDefaultInspector();
        PointCloudGenerator script = (PointCloudGenerator)target;

        GUILayout.Label("Initializing", EditorStyles.boldLabel);
        if (GUILayout.Button("Generate"))
        {
            script.Generate();
        }
        if (GUILayout.Button("Reset"))
        {
            script.Reset();
        }
        GUILayout.Label("Modifying", EditorStyles.boldLabel);
        if (GUILayout.Button("Displace"))
        {
            script.Displace();
        }
        GUILayout.Label("Exporting", EditorStyles.boldLabel);
        if (GUILayout.Button("Export"))
        {
            script.Export();
        }
        if (GUILayout.Button("Save Baked Colors"))
        {
            string fileName = EditorUtility.SaveFilePanel("Export .png file", "", "", "png");
            File.WriteAllBytes(fileName, script.GetBakedMap().EncodeToPNG());
        }
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     _userDrawnShapePoints  = new List <Vector3>();
     _userDrawnHullVertices = new List <Vector3>();
     _userDrawnHullLines    = new List <Vector3[]>();
     _currentButtons        = new List <GameObject>();
     _pointCloudGenerator   = GetComponent <PointCloudGenerator>();
     movement_control       = GetComponent <MovementControl>();
 }
示例#3
0
文件: FYPCore.cs 项目: cqhchan/FYP_AR
    void Start()
    {
        phyCameraAPI = gameObject.GetComponent <PhysicalCameraIntectorAPI>();

        oculusionRenderer   = mainCamera.gameObject.AddComponent <OculusionRenderer>();
        pointCloudGenerator = mainCamera.gameObject.AddComponent <PointCloudGenerator>();

        SetUpOculusionRenderer();
        SetUpPointCloudGenerator();
    }