void UpdateThis() { IPointBase3D RefPoint = (this.Orientation == true) ? this.RefPoint1 : this.RefPoint2; IPointBase3D TranslatedPoint = this.TranslatePointAlongVector(RefPoint, this._RefVector, this._RefVector.Magnitude * this._Ratio); this.SetCoordinates(TranslatedPoint.GetCoordinates()); }
public PointBetween(IPointBase3D iPoint1, IPointBase3D iPoint2) { this.RefPoint1 = iPoint1; this.RefPoint2 = iPoint2; IPointBase3D TranslatedPoint = this.TranslatePointAlongVector(this.RefPoint1, this._RefVector, this._RefVector.Magnitude * this._Ratio); this.SetCoordinates(TranslatedPoint.GetCoordinates()); }
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 IPointBase3D TranslatePointAlongVector(IPointBase3D iRefPoint, IVectorBase3D iRefVector, double iOffset) { double X = (iRefVector.UnitVector.I * iOffset) + iRefPoint.X; double Y = (iRefVector.UnitVector.J * iOffset) + iRefPoint.Y; double Z = (iRefVector.UnitVector.K * iOffset) + iRefPoint.Z; IPointBase3D ReturnPoint = new PointBase3D(); ReturnPoint.SetCoordinates(new double[] { X, Y, Z }); return(ReturnPoint); }
public override void SetCoordinates(double[] iCoordinates) { this._BasePoint.SetCoordinates(iCoordinates); if (this.RefAxisSystem == null) { base.SetCoordinates(((PointBase3D)this._BasePoint + (PointBase3D)this.RefPoint).GetCoordinates()); } else { IPointBase3D TranslatedPoint = this.PointRelativeToAxisSystem(this.RefAxisSystem); base.SetCoordinates(((PointBase3D)TranslatedPoint + (PointBase3D)this.RefPoint).GetCoordinates()); } }
public override bool Equals(object obj) { bool ReturnBoolean = false; if ((IPointBase3D)obj is IPointBase3D) { IPointBase3D ValidationPoint = (IPointBase3D)obj; if (this.X.Equals(ValidationPoint.X) && this.Y.Equals(ValidationPoint.Y) && this.Z.Equals(ValidationPoint.Z)) { ReturnBoolean = true; } } return(ReturnBoolean); }
public void AddRefPoint(IPointBase3D iRefPoint) { if (this.RefAxisSystem != null) { throw new Exception("The Point Already Uses a Reference AxisSystem."); } // Store the Original Coordinates this._BasePoint.SetCoordinates(this.GetCoordinates()); // Set the Reference Point this.RefPoint = iRefPoint; // Update the Coordinates this.SetCoordinates(this._BasePoint.GetCoordinates()); }
public void SetRefPoints(IPointBase3D iRefPoint1, IPointBase3D iRefPoint2) { this.RefPoint1 = iRefPoint1; this.RefPoint2 = iRefPoint2; this.UpdateThis(); }
public void SetRefPoint2(IPointBase3D iRefPoint) { this.RefPoint2 = iRefPoint; this.UpdateThis(); }
public PointByCoordinates(double iX, double iY, double iZ, IPointBase3D iRefPoint, IAxisSystemBase3D iRefAxisSystem) { this.RefAxisSystem = iRefAxisSystem; this.RefPoint = iRefPoint; }
public PointByCoordinates(double iX, double iY, double iZ, IPointBase3D iRefPoint) { this.X = iRefPoint.X + iX; this.Y = iRefPoint.Y + iY; this.Z = iRefPoint.Z + iZ; }
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)); } } }