コード例 #1
0
        public void Create_NullCollisions_DefaultComponents()
        {
            var parent     = new GameObject("Parent").transform;
            var collisions = UrdfCollisionsExtensions.Create(parent);

            Assert.IsNotNull(collisions);
            Assert.IsNotNull(collisions.GetComponent <UrdfCollisions>());

            Object.DestroyImmediate(parent.gameObject);
        }
コード例 #2
0
        public void ExportCollisionsData_DefaultGeometry_DefaultComponents(Geometry geometryBox)
        {
            var parent     = new GameObject("Parent").transform;
            var collisions = UrdfCollisionsExtensions.Create(parent, new List <Collision>()
            {
                new Collision(geometryBox)
            });
            var urdfColl = collisions.GetComponent <UrdfCollisions>();

            Assert.IsTrue(urdfColl.ExportCollisionsData().Count > 0);

            Object.DestroyImmediate(parent.gameObject);
        }
コード例 #3
0
        public void Create_WithCollisions_DefaultComponents(Geometry geometryBox)
        {
            var parent     = new GameObject("Parent").transform;
            var collisions = UrdfCollisionsExtensions.Create(parent, new List <Collision>()
            {
                new Collision(geometryBox)
            });

            Assert.IsNotNull(collisions);
            Assert.IsTrue(parent.GetComponentsInChildren <UrdfCollisions>().Length > 0);

            Object.DestroyImmediate(parent.gameObject);
        }