Exemple #1
0
        public virtual ITool Build(FScene scene, List <SceneObject> targets)
        {
            DMeshSO        target = targets.Where(TypeFilterF).First() as DMeshSO;
            MeshEditorTool tool   = new_tool(scene, target);

            tool.OnApplyF        = this.OnApplyF;
            tool.PreviewMaterial = this.PreviewMaterial;
            if (BuildCustomizeF != null)
            {
                BuildCustomizeF(tool);
            }
            return(tool);
        }
Exemple #2
0
        bool update_last_hit(MeshEditorTool tool, Ray3f rayS)
        {
            int hit_id = -1; Frame3f hitFrameS = Frame3f.Identity;

            MeshEditorOpType.ElementType hitType = MeshEditorOpType.ElementType.Triangle;
            if (tool.FindHitElement(rayS, ref hitFrameS, ref hit_id, ref hitType))
            {
                lastHitFrameS      = hitFrameS;
                lastHitElementID   = hit_id;
                lastHitElementType = hitType;
                return(true);
            }
            return(false);
        }
Exemple #3
0
 public MeshEditorTool_2DInputBehavior(MeshEditorTool tool, FContext s)
 {
     this.tool = tool;
     context   = s;
 }