public ICoordinateSystemEntity Scale(double scaleX, double scaleY, double scaleZ) { CoordinateEntity cs = new CoordinateEntity(); cs.Set(this.Origin, this.XAxis.Scale(scaleX), this.YAxis.Scale(scaleY), this.ZAxis.Scale(scaleZ)); return(cs); }
public ICoordinateSystemEntity Scale(double scaleX, double scaleY, double scaleZ) { CoordinateEntity cs = new CoordinateEntity(); cs.Set(this.Origin, this.XAxis, this.YAxis, this.ZAxis); cs.XAxis.Scale(scaleX); cs.YAxis.Scale(scaleY); cs.ZAxis.Scale(scaleZ); return cs; }
public ICoordinateSystemEntity Translate(IVectorEntity translationVector) { CoordinateEntity cs = new CoordinateEntity(); PointEntity pt = new PointEntity() { X = cs.Origin.X + translationVector.X, Y = cs.Origin.Y + translationVector.Y, Z = cs.Origin.Z + translationVector.Z }; cs.Set(pt, this.XAxis, this.YAxis, this.ZAxis); return(cs); }
public ICoordinateSystemEntity CoordinateSystemBySphericalCoordinates(ICoordinateSystemEntity contextCS, double radius, double theta, double phi) { DSGeometryApplication.Check(); CoordinateEntity cs = new CoordinateEntity(); cs.Set(new PointEntity() { X = radius * Math.Sin(DegreeToRadian(theta)) * Math.Cos(DegreeToRadian(phi)), Y = radius * Math.Sin(DegreeToRadian(theta)) * Math.Sin(DegreeToRadian(phi)), Z = radius * Math.Cos(DegreeToRadian(theta)) }, contextCS.XAxis, contextCS.YAxis, contextCS.ZAxis); return(cs); }
public ICoordinateSystemEntity CoordinateSystemByCylindricalCoordinates(ICoordinateSystemEntity contextCS, double radius, double theta, double height) { DSGeometryApplication.Check(); CoordinateEntity cs = new CoordinateEntity(); cs.Set(new PointEntity() { X = radius * Math.Cos(DegreeToRadian(theta)), Y = radius * Math.Sin(DegreeToRadian(theta)), Z = height }, contextCS.XAxis, contextCS.YAxis, contextCS.ZAxis); return(cs); // return new CoordinateEntity() { Origin = new PointEntity() { X = radius*Math.Sin(theta), Y = radius*Math.Cos(theta), Z = height } }; // return new CoordinateEntity(); }
public void UpdateCuboid(double[] data, double length, double width, double height) { PointEntity origin = new PointEntity(data[0], data[1], data[2]); ContextCoordinateSystem = new CoordinateEntity(origin, DsVector.ByCoordinates(length, 0, 0), DsVector.ByCoordinates(0, width, 0), DsVector.ByCoordinates(0, 0, height)); }
public ICoordinateSystemEntity Translate(IVectorEntity translationVector) { CoordinateEntity cs = new CoordinateEntity(); PointEntity pt = new PointEntity() { X = cs.Origin.X + translationVector.X, Y = cs.Origin.Y + translationVector.Y, Z = cs.Origin.Z + translationVector.Z }; cs.Set(pt, this.XAxis, this.YAxis, this.ZAxis); return cs; }
public ICoordinateSystemEntity CoordinateSystemBySphericalCoordinates(ICoordinateSystemEntity contextCS, double radius, double theta, double phi) { DSGeometryApplication.Check(); CoordinateEntity cs = new CoordinateEntity(); cs.Set(new PointEntity() { X = radius * Math.Sin(DegreeToRadian(theta)) * Math.Cos(DegreeToRadian(phi)), Y = radius * Math.Sin(DegreeToRadian(theta)) * Math.Sin(DegreeToRadian(phi)), Z = radius * Math.Cos(DegreeToRadian(theta)) }, contextCS.XAxis, contextCS.YAxis, contextCS.ZAxis); return cs; }
public ICoordinateSystemEntity CoordinateSystemByCylindricalCoordinates(ICoordinateSystemEntity contextCS, double radius, double theta, double height) { DSGeometryApplication.Check(); CoordinateEntity cs = new CoordinateEntity(); cs.Set(new PointEntity() { X = radius * Math.Cos(DegreeToRadian(theta)), Y = radius * Math.Sin(DegreeToRadian(theta)), Z = height }, contextCS.XAxis, contextCS.YAxis, contextCS.ZAxis); return cs; // return new CoordinateEntity() { Origin = new PointEntity() { X = radius*Math.Sin(theta), Y = radius*Math.Cos(theta), Z = height } }; // return new CoordinateEntity(); }