IPointBase3D PointRelativeToAxisSystem(IAxisSystemBase3D iRefAxisSystem) { IPointBase3D ReturnPoint = new PointBase3D(); ReturnPoint = this.TranslatePointAlongVector(ReturnPoint, iRefAxisSystem.XAxis, this._BasePoint.X); ReturnPoint = this.TranslatePointAlongVector(ReturnPoint, iRefAxisSystem.YAxis, this._BasePoint.Y); ReturnPoint = this.TranslatePointAlongVector(ReturnPoint, iRefAxisSystem.ZAxis, this._BasePoint.Z); return(ReturnPoint); }
public PointByCoordinates(double iX, double iY, double iZ, IAxisSystemBase3D iRefAxisSystem) { this.RefAxisSystem = iRefAxisSystem; IPointBase3D NewPoint = this.TranslatePointAlongVector(iRefAxisSystem.Origin, iRefAxisSystem.XAxis, iX); NewPoint = this.TranslatePointAlongVector(NewPoint, iRefAxisSystem.YAxis, iY); NewPoint = this.TranslatePointAlongVector(NewPoint, iRefAxisSystem.ZAxis, iZ); this.X = NewPoint.X; this.Y = NewPoint.Y; this.Z = NewPoint.Z; }
public void AddRefAxisSystem(IAxisSystemBase3D iRefAxisSystem) { if (!this.RefPoint.Equals(new PointBase3D())) { throw new Exception("The Point Already Uses a Reference Point."); } // Store the Original Coordinates this._BasePoint.SetCoordinates(this.GetCoordinates()); // Set the Reference Point this.RefPoint = iRefAxisSystem.Origin; // Set the Reference AxisSystem this.RefAxisSystem = iRefAxisSystem; // Update the Coordinates this.SetCoordinates(this._BasePoint.GetCoordinates()); }
public void RemoveRefAxisSystem() { this.RefPoint = new PointBase3D(); this.RefAxisSystem = null; this.SetCoordinates(this._BasePoint.GetCoordinates()); }
public PointByCoordinates(double iX, double iY, double iZ, IPointBase3D iRefPoint, IAxisSystemBase3D iRefAxisSystem) { this.RefAxisSystem = iRefAxisSystem; this.RefPoint = iRefPoint; }
public IPointByCoordinates AddNewPointCoordWithReference(double iX, double iY, double iZ, IPointBase3D iRefPoint = null, IAxisSystemBase3D iRefAxisSystem = null) { if (iRefPoint == null && iRefAxisSystem == null) { return(new PointByCoordinates(iX, iY, iZ)); } else { if (iRefPoint == null) { return(new PointByCoordinates(iX, iY, iZ, iRefAxisSystem)); } else if (iRefAxisSystem == null) { return(new PointByCoordinates(iX, iY, iZ, iRefPoint)); } else { return(new PointByCoordinates(iX, iY, iZ, iRefPoint, iRefAxisSystem)); } } }