Esempio n. 1
0
        public static InteractablePoint iPoint(Vector3 position)
        {
            InteractablePoint point = InteractablePoint.Constructor();

            point.Position3 = position;
            point.InitializeFigure();
            return(point);
        }
Esempio n. 2
0
        public void makeRevolvedSurface(AbstractLineSegment attachedLine, Vector3 revPoint, Vector3 normDir)
        {
            #region intialize a cylinder, cone or conic /etc.
            InteractablePoint newPoint = InteractablePoint.Constructor();
            newPoint.Position3 = revPoint;            //nullreference on this line from shipswheel

            DependentRevolvedSurface drs = GeoObjConstruction.dRevSurface(newPoint.GetComponent <AbstractPoint>(), attachedLine, normDir);
            HW_GeoSolver.ins.AddDependence(drs, newPoint);
            HW_GeoSolver.ins.AddDependence(drs, attachedLine.GetComponent <MasterGeoObj>());
            #endregion
        }
Esempio n. 3
0
 public override void Stretch(InteractionController iControll)
 {
     if (stretchEnabled && thisIBehave.graspingControllers.Count > 1)
     {
         iControll.ReleaseGrasp();
         InteractablePoint newPoint = GeoObjConstruction.iPoint(this.Position3);
         /*InteractableLineSegment newLineSegment = */ GeoObjConstruction.iLineSegment(this, newPoint);
         if (HW_GeoSolver.ins.thisInteractionMode == HW_GeoSolver.InteractionMode.rigid)
         {
             newPoint.LeapInteraction = false;
             this.LeapInteraction     = false;
         }
         StartCoroutine(waitForStretch);
     }
 }