protected bool PointValidate(List <Vector3> points, Vector3 location)
        {
            AddPointCommand addCmd = new AddPointCommand(roadObject.Points, location);

            app.ExecuteCommand(addCmd);

            return(true);
        }
Exemple #2
0
        protected bool ObjectValidate(List <Vector3> points, Vector3 location)
        {
            Vector3          scaleVec = new Vector3(scale, scale, scale);
            Vector3          rotVec   = new Vector3(0, rotation, 0);
            AddObjectCommand addCmd   = new AddObjectCommand(app, parent, String.Format("{0}-{1}", name, objectNumber), meshName, randomRotation, randomScale, minScale, maxScale, location);

            app.ExecuteCommand(addCmd);
            objectNumber++;
            return(true);
        }
 protected bool PointValidate(List <Vector3> points, Vector3 location)
 {
     if (!IntersectionHelperClass.BoundaryIntersectionSearch(points, location, points.Count))
     {
         AddPointCommand addCmd = new AddPointCommand(region.Points, location);
         app.ExecuteCommand(addCmd);
     }
     else
     {
         ErrorHelper.SendUserError("Add region point failed", "Region", app.Config.ErrorDisplayTimeDefault, true, this, app);
     }
     return(true);
 }
Exemple #4
0
 public ICommand CreateCommand()
 {
     if (!(toCollection as WorldObjectCollection).Loaded)
     {
         if (MessageBox.Show("The collection you are Trying to move to is not loaded, would you like to load it now?", "Problem with moving object", MessageBoxButtons.OKCancel) == DialogResult.OK)
         {
             app.ExecuteCommand((new LoadCollectionCommandFactory(app, toCollection as WorldObjectCollection)).CreateCommand());
         }
         else
         {
             return(null);
         }
     }
     return(new ChangeCollectionCommand(objList, toCollection));
 }