コード例 #1
0
    // Use this for initialization
    void Start()
    {
        var senseManager = GameObject.FindObjectOfType(typeof(SenseToolkitManager));

        if (senseManager == null)
        {
            Debug.LogWarning("Sense Manager Object not found and was added automatically");
            senseManager      = (GameObject)Instantiate(Resources.Load("SenseManager"));
            senseManager.name = "SenseManager";
        }

        SetSenseOptions();

        this.gameObject.AddComponent <MeshFilter> ();
        if (this.GetComponent <MeshRenderer>() == null)
        {
            this.gameObject.AddComponent <MeshRenderer> ();
        }

        if (PointCloudMaterial != null)
        {
            this.gameObject.GetComponent <Renderer>().material = PointCloudMaterial;
        }

        _drawImagesComponent = this.gameObject.AddComponent <DrawImages>();

        if (UseUVMap)
        {
            _drawImagesComponent.enabled = true;
        }
        else
        {
            _drawImagesComponent.enabled = false;
        }
    }
コード例 #2
0
	// Use this for initialization
	void Start () 
	{	
		var senseManager = GameObject.FindObjectOfType(typeof(SenseToolkitManager));
		if (senseManager == null)
		{
			Debug.LogWarning("Sense Manager Object not found and was added automatically");			
			senseManager = (GameObject)Instantiate(Resources.Load("SenseManager"));
			senseManager.name = "SenseManager";
		}
		
		SetSenseOptions();
		
		this.gameObject.AddComponent< MeshFilter > ();
		if (this.GetComponent<MeshRenderer>() == null)
		{
			this.gameObject.AddComponent< MeshRenderer > ();	
		}
		
		if (PointCloudMaterial!=null)
		{
			this.gameObject.GetComponent<Renderer>().material = PointCloudMaterial;
		}
		
		_drawImagesComponent = this.gameObject.AddComponent<DrawImages>();
		
		if (UseUVMap)
		{
			_drawImagesComponent.enabled = true;
		}
		else 
		{
			_drawImagesComponent.enabled = false;
		}

	}
コード例 #3
0
ファイル: PointCloudViewer.cs プロジェクト: stone-SJH/perfit
	// Use this for initialization
	void Start () 
	{	
		aFile = new FileStream(LOG_FILE_NAME, FileMode.Create);
		sw = new StreamWriter(aFile);

		var senseManager = GameObject.FindObjectOfType(typeof(SenseToolkitManager));
		if (senseManager == null)
		{
			Debug.LogWarning("Sense Manager Object not found and was added automatically");			
			senseManager = (GameObject)Instantiate(Resources.Load("SenseManager"));
			senseManager.name = "SenseManager";
		}
		
		SetSenseOptions();
		
		this.gameObject.AddComponent< MeshFilter > ();
		if (this.GetComponent<MeshRenderer>() == null)
		{
			this.gameObject.AddComponent< MeshRenderer > ();	
		}
		
		if (PointCloudMaterial!=null)
		{
			this.gameObject.GetComponent<Renderer>().material = PointCloudMaterial;
		}
		
		_drawImagesComponent = this.gameObject.AddComponent<DrawImages>();
		
		if (UseUVMap)
		{
			_drawImagesComponent.enabled = true;
		}
		else 
		{
			_drawImagesComponent.enabled = false;
		}

/*		LineRenderGameObject = GameObject.Find ("line");
		lineRenderer = (LineRenderer)LineRenderGameObject.GetComponent ("LineRenderer");
		lineRenderer.SetVertexCount(lineLength);*/
	}