예제 #1
0
        public SurfaceBrushTool(FScene scene, DMeshSO target)
        {
            this.scene  = scene;
            this.target = target;

            behaviors = new InputBehaviorSet();

            // TODO is this where we should be doing this??
            behaviors.Add(
                new SurfaceBrushTool_2DInputBehavior(this, scene.Context)
            {
                Priority = 5
            });
            if (FPlatform.IsUsingVR())
            {
                behaviors.Add(
                    new SurfaceBrushTool_SpatialBehavior(this, scene.Context)
                {
                    Priority = 5
                });
            }

            // shut off transform gizmo
            scene.Context.TransformManager.PushOverrideGizmoType(TransformManager.NoGizmoType);

            Indicators = new ToolIndicatorSet(this, scene);
        }
예제 #2
0
        public CurveSelectFacesTool(FScene scene, DMeshSO target)
        {
            Scene  = scene;
            Target = target;

            behaviors = new InputBehaviorSet();

            // TODO is this where we should be doing this??
            behaviors.Add(
                new CurveSelectFacesTool_2DBehavior(this, scene.Context)
            {
                Priority = 5
            });

            Indicators = new ToolIndicatorSet(this, scene);
        }
예제 #3
0
        public SculptCurveTool(FScene scene, List <SceneObject> targets)
        {
            this.scene = scene;

            behaviors = new InputBehaviorSet();

            // TODO is this where we should be doing this??
            behaviors.Add(
                new SculptCurveTool_2DInputBehavior(this, scene.Context)
            {
                Priority = 5
            });
            behaviors.Add(
                new SculptCurveTool_SpatialBehavior(this, scene.Context)
            {
                Priority = 5
            });

            // shut off transform gizmo
            scene.Context.TransformManager.PushOverrideGizmoType(TransformManager.NoGizmoType);

            scene.SelectionChangedEvent += Scene_SelectionChangedEvent;
            // initialize active set with input selection
            Scene_SelectionChangedEvent(null, null);


            indicators     = new ToolIndicatorSet(this, scene);
            brushIndicator = new BrushCursorSphere()
            {
                PositionF = () => { return(lastBrushPos.Origin); },
                Radius    = fDimension.World(() => { return(radius.WorldValue); })
            };
            moveSphereMat   = MaterialUtil.CreateTransparentMaterialF(Colorf.CornflowerBlue, 0.2f);
            smoothSphereMat = MaterialUtil.CreateTransparentMaterialF(Colorf.ForestGreen, 0.2f);
            indicators.AddIndicator(brushIndicator);
            brushIndicator.material = moveSphereMat;

            SmoothAlpha      = 0.15f;
            SmoothIterations = 5;
        }