예제 #1
0
        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);
        }
예제 #2
0
 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;
 }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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();
        }
예제 #6
0
 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));
 }
예제 #7
0
 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;
 }
예제 #8
0
 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;
 }
예제 #9
0
 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();
 }
예제 #10
0
        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));
        }