public DrawSurfaceCurveTool(FScene scene, SceneObject target) { this.scene = scene; this.target = target; behaviors = new InputBehaviorSet(); // TODO is this where we should be doing this?? behaviors.Add( new DrawSurfaceCurveTool_2DBehavior(scene.Context) { Priority = 5 }); behaviors.Add( new DrawSurfaceCurveTool_SpatialDeviceBehavior(scene.Context) { Priority = 5 }); // shut off transform gizmo scene.Context.TransformManager.PushOverrideGizmoType(TransformManager.NoGizmoType); scene.SelectionChangedEvent += Scene_SelectionChangedEvent; // restore radius //if (SavedSettings.Restore("DrawSurfaceCurveTool_width") != null) // width = (float)SavedSettings.Restore("DrawSurfaceCurveTool_width"); }
public void PushCockpit(ICockpitInitializer initializer) { Cockpit trackingInitializer = null; if (activeCockpit != null) { trackingInitializer = activeCockpit; inputBehaviors.Remove(activeCockpit.InputBehaviors); overrideBehaviors.Remove(activeCockpit.OverrideBehaviors); cockpitStack.Push(activeCockpit); activeCockpit.RootGameObject.SetActive(false); } Cockpit c = new Cockpit(this); activeCockpit = c; if (Use2DCockpit) { c.UIElementLayer = FPlatform.UILayer; } c.Start(initializer); if (trackingInitializer != null) { c.InitializeTracking(trackingInitializer); } inputBehaviors.Add(c.InputBehaviors); overrideBehaviors.Add(c.OverrideBehaviors); mouseCursor.ResetCursorToCenter(); }
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); }
public BaseSingleClickTool(FScene scene) { this.Scene = scene; // do this here ?? behaviors = new InputBehaviorSet(); behaviors.Add( new BaseSingleClickTool_2DBehavior(scene.Context, ObjectFilter) { Priority = 5 }); }
public DrawPrimitivesTool(FScene scene) { this.scene = scene; behaviors = new InputBehaviorSet(); // TODO is this where we should be doing this?? behaviors.Add( new DrawPrimitivesTool_MouseBehavior(scene.Context) { Priority = 5 }); behaviors.Add( new DrawPrimitivesTool_SpatialDeviceBehavior(scene.Context) { Priority = 5 }); // shut off transform gizmo scene.Context.TransformManager.SetOverrideGizmoType(TransformManager.NoGizmoType); }
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; }
public BaseSurfacePointTool(FScene scene) { this.Scene = scene; // do this here ?? behaviors = new InputBehaviorSet(); behaviors.Add( new BaseSurfacePointTool_2DBehavior(scene.Context, ObjectFilter) { Priority = 5 }); if (FPlatform.IsUsingVR()) { behaviors.Add( new BaseSurfacePointTool_SpatialBehavior(scene.Context, ObjectFilter) { Priority = 5 }); } // shut off transform gizmo Scene.Context.TransformManager.PushOverrideGizmoType(TransformManager.NoGizmoType); }
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); }