コード例 #1
0
        private void Start()
        {
            this.pointCloud = new Vector3[0];
            subscriber      = this.GetComponent <SubscribePointCloud2>();
            subscriber.AddListenerToNewPointCloud(NewPointCloud);

            materialPropertyBlock = new MaterialPropertyBlock();

            CreateCubeMesh();
        }
コード例 #2
0
        static public GameObject PointCloud2(string name, string defaultTopic, bool canTransform)
        {
            GameObject           pc2GameObject = new GameObject(name);
            SubscribePointCloud2 subscribe     = pc2GameObject.AddComponent <SubscribePointCloud2>();
            VisualizePointCloud2 visualize     = pc2GameObject.AddComponent <VisualizePointCloud2>();

            subscribe.Topic = defaultTopic;

            MyExposeToEditor myExposeToEditor = pc2GameObject.AddComponent <MyExposeToEditor>();

            myExposeToEditor.CanTransform  = canTransform;
            myExposeToEditor.ShowTransform = canTransform;

            pc2GameObject.tag = "RosData";

            return(pc2GameObject);
        }
コード例 #3
0
        static public GameObject PointCloud2(string name, string defaultTopic, bool canTransform, bool startSubscribe, Color color)
        {
            GameObject           pc2GameObject = new GameObject(name);//Create gameObj that name is 'name'
            SubscribePointCloud2 subscribe     = pc2GameObject.AddComponent <SubscribePointCloud2>();
            VisualizePointCloud2 visualize     = pc2GameObject.AddComponent <VisualizePointCloud2>();

            subscribe.Topic   = defaultTopic;
            subscribe.Enabled = startSubscribe;

            visualize.PointColor = color;

            MyExposeToEditor myExposeToEditor = pc2GameObject.AddComponent <MyExposeToEditor>();

            myExposeToEditor.CanTransform  = canTransform;
            myExposeToEditor.ShowTransform = canTransform;

            pc2GameObject.tag = "RosData";

            return(pc2GameObject);
        }