virtual public void Setup() { brushIndicator = new BrushCursorSphere() { PositionF = () => { return(lastBrushPosW.Origin); }, Radius = fDimension.World(() => { return(radius.WorldValue); }) }; primaryBrushMat = MaterialUtil.CreateTransparentMaterialF(Colorf.CornflowerBlue, 0.2f); secondaryBrushMat = MaterialUtil.CreateTransparentMaterialF(Colorf.ForestGreen, 0.2f); Indicators.AddIndicator(brushIndicator); brushIndicator.material = primaryBrushMat; }
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; }