예제 #1
0
        public Screw project(Projector projector, bool toFinalBase = true)
        {
            FloatVector screwWrench = this.getWrench();
            FloatVector screwTwist  = this.getTwist();

            screwWrench = projector.project(screwWrench, toFinalBase);
            screwTwist  = projector.project(screwTwist, toFinalBase);
            Screw screw = Screw.fromWrenchAndTwist(screwWrench, screwTwist, projector.project(this.aplicationPoint, toFinalBase));

            return(screw);
        }
예제 #2
0
        public Screw changeApplicationPoint(FloatVector point)
        {
            if (this.aplicationPoint == null)
            {
                throw new NoApplicationPointException();
            }
            FloatVector wrench   = this.getWrench();
            FloatVector twist    = this.getTwist();
            FloatVector oldPoint = this.aplicationPoint;
            FloatVector newPoint = point;

            twist = twist.add(newPoint.substract(oldPoint).vectorialProduct(wrench));
            return(Screw.fromWrenchAndTwist(wrench, twist, newPoint));
        }