public override bool Run(FeatureContext context)
        {
            ArrowWidget arrow = new ArrowWidget();

            arrow.SetFixedSize(true);

            context.ShowSceneNode(arrow);


            return(true);
        }
Example #2
0
        public override void Run(RenderControl render)
        {
            var arrowMaterial = MeshPhongMaterial.Create("arrow");

            arrowMaterial.SetColor(ColorTable.Red);
            mArrow = ArrowWidget.Create(2, 10, arrowMaterial);
            mArrow.SetPickable(false);
            render.ShowSceneNode(mArrow);


            var shape = ShapeBuilder.MakeBox(GP.XOY(), 10, 20, 30);
            var mat   = MeshStandardMaterial.Create("ss");

            mat.SetColor(Vector3.LightGray);

            var node = BrepSceneNode.Create(shape, mat, null);

            render.ShowSceneNode(node);
        }
Example #3
0
        public override bool Run(FeatureContext context)
        {
            {
                ArrowWidget arrow = new ArrowWidget();
                context.ShowSceneNode(arrow);
                context.RenderView.FitAll();
                context.RequestDraw();
            }


            ElementId id = context.CurrentId;

            MessageBox.Show("Remove Node");

            SceneManager sceneMgr = context.RenderView.SceneManager;
            SceneNode    node     = sceneMgr.FindNode(id);

            if (node != null)
            {
                sceneMgr.RemoveNode(node);
            }

            return(true);
        }
Example #4
0
 public void SetFromRef(Transform player, ArrowWidget arrowWidget)
 {
     this.player      = player;
     this.arrowWidget = arrowWidget;
 }