예제 #1
0
        public void TestParenting()
        {
            TestManager.Helpers.CreateTestScene("TestParenting");

#if HK_ANARCHY
            String[] shapesToTest = new String[] { "Entity", "Lights (Dynamic) - Omni Light", "Lights (Dynamic) - Spot Light", "Particle System", "Sphere", "GroundPlane", "Plane", "XAxis", "YAxis", "ZAxis", "AABox", "Fan", "Cyclone", "Point", "Mirror" };
#else
            String[] shapesToTest = new String[] { "Entity", "Lights (Dynamic) - Omni Light", "Lights (Dynamic) - Spot Light", "Volumetric Cone", "Particle System", "Sphere", "GroundPlane", "Plane", "XAxis", "YAxis", "ZAxis", "AABox", "Fan", "Cyclone", "Point", "Mirror" };
#endif

            // test all possibly parenting combinations
            foreach (string parentShapeName in shapesToTest)
            {
                foreach (string childShapeName in shapesToTest)
                {
                    PerformShapeParentingTest(parentShapeName, childShapeName);
                }
            }

            //test ParentingModes.NoParentTransformation using shapes with this property as child and test it with String[] shapesToTest as parents
            NoParentTransformShapeCreator noParentTransformShapeCreator = new NoParentTransformShapeCreator();
            EditorManager.ShapeCreatorPlugins.Add(noParentTransformShapeCreator); //register NoParentTransformShape creatorplugin
            foreach (string parentShapeName in shapesToTest)
            {
                PerformShapeParentingNoTransformationTest(parentShapeName, "NoParentTransformShape");
            }
            EditorManager.ShapeCreatorPlugins.Remove(noParentTransformShapeCreator);

            TestManager.Helpers.CloseTestProject();
        }
예제 #2
0
        public void TestParenting()
        {
            TestManager.Helpers.CreateTestScene("TestParenting");

            #if HK_ANARCHY
              String[] shapesToTest = new String[] { "Entity", "Lights (Dynamic) - Omni Light", "Lights (Dynamic) - Spot Light", "Particle System", "Sphere", "GroundPlane", "Plane", "XAxis", "YAxis", "ZAxis", "AABox", "Fan", "Cyclone", "Point", "Mirror" };
            #else
              String[] shapesToTest = new String[] { "Entity", "Lights (Dynamic) - Omni Light", "Lights (Dynamic) - Spot Light", "Volumetric Cone", "Particle System", "Sphere", "GroundPlane", "Plane", "XAxis", "YAxis", "ZAxis", "AABox", "Fan", "Cyclone", "Point", "Mirror" };
            #endif

              // test all possibly parenting combinations
              foreach (string parentShapeName in shapesToTest)
            foreach (string childShapeName in shapesToTest)
              PerformShapeParentingTest(parentShapeName, childShapeName);

              //test ParentingModes.NoParentTransformation using shapes with this property as child and test it with String[] shapesToTest as parents
              NoParentTransformShapeCreator noParentTransformShapeCreator  = new NoParentTransformShapeCreator();
              EditorManager.ShapeCreatorPlugins.Add(noParentTransformShapeCreator); //register NoParentTransformShape creatorplugin
              foreach (string parentShapeName in shapesToTest)
            PerformShapeParentingNoTransformationTest(parentShapeName, "NoParentTransformShape");
              EditorManager.ShapeCreatorPlugins.Remove(noParentTransformShapeCreator);

              TestManager.Helpers.CloseTestProject();
        }