Esempio n. 1
0
 public void BeginSetWorldScale(Frame3f center, Frame3f plane, float minr)
 {
     deadzone_r = minr;
     hitFrame   = plane;
     mYes       = MaterialUtil.CreateTransparentMaterial(ColorUtil.PivotYellow, 0.5f);
     mNo        = MaterialUtil.CreateTransparentMaterial(ColorUtil.MiddleGrey, 0.3f);
     go         = UnityUtil.CreatePrimitiveGO("worldscale_ball", PrimitiveType.Sphere, mNo);
     UnityUtil.SetGameObjectFrame(go, center, CoordSpace.WorldCoords);
 }
            virtual public List <fGameObject> Generate()
            {
                GameObject primGO = UnityUtil.CreatePrimitiveGO("primitive", PrimType, PrimMaterial, true);

                primGO.transform.localScale = new Vector3(PrimSize, PrimSize, PrimSize);
                primGO.transform.Translate(0.0f, 0.0f, -PrimSize);
                primGO.transform.Rotate(-15.0f, 45.0f, 0.0f, Space.Self);
                return(new List <fGameObject>()
                {
                    primGO
                });
            }
            virtual public List <fGameObject> Generate()
            {
                GameObject primGO = UnityUtil.CreatePrimitiveGO("primitive", PrimitiveType.Sphere, SphereMaterial, true);
                GameObject meshGO = UnityUtil.CreateMeshGO("primitive", "icon_meshes/axis_frame", 1.0f,
                                                           UnityUtil.MeshAlignOption.NoAlignment, FrameMaterial, false);

                meshGO.transform.SetParent(primGO.transform, true);
                primGO.transform.localScale = new Vector3(PrimSize, PrimSize, PrimSize);
                primGO.transform.Translate(0.0f, 0.0f, -PrimSize);
                primGO.transform.Rotate(15.0f, 135.0f, 0.0f, Space.Self);
                return(new List <fGameObject>()
                {
                    primGO
                });
            }