예제 #1
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
 public static Point operator /(Point p, float s)
 {
     return(new Point(_mm_mul_ps(p.P3, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
예제 #2
0
 public static Line operator ^(Plane a, Plane b)
 {
     Detail.ext00(a.P0, b.P0, out var p1, out var p2);
     return(new Line(p1, p2));
 }
예제 #3
0
 public static Dual operator ^(Plane a, Point b)
 {
     return(new Dual(0, _mm_store_ss(Detail.ext03(false, a.P0, b.P3))));
 }
예제 #4
0
 public Plane Reflect(Plane p)
 {
     Detail.sw00(P0, p.P0, out var p0);
     return(new Plane(p0));
 }
예제 #5
0
 public Point Reflect(Point p) => new Point(Detail.sw30(P0, p.P3));
예제 #6
0
 internal Motor(float angRad, float d, Line l)
 {
     Detail.gpDL(-angRad * 0.5f, d * 0.5f, l.P1, l.P2, out var p1, out var p2);
     Detail.exp(p1, p2, out P1, out P2);
 }
예제 #7
0
        public Direction Normalized()
        {
            __m128 tmp = Detail.rsqrt_nr1(Detail.hi_dp_bc(P3, P3));

            return(new Direction(_mm_mul_ps(P3, tmp)));
        }
예제 #8
0
파일: Line.cs 프로젝트: Ziriax/KleinSharp
        public float SquaredNorm()
        {
            __m128 dp = Detail.hi_dp(P1, P1);

            return(_mm_store_ss(dp));
        }
예제 #9
0
파일: Math.cs 프로젝트: Ziriax/KleinSharp
 public static Line Log(Motor m)
 {
     Detail.log(m.P1, m.P2, out var p1, out var p2);
     return(new Line(p1, p2));
 }
예제 #10
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
 public static float operator |(Point a, Point b)
 {
     return(Detail.dot33(a.P3, b.P3).GetElement(0));
 }
예제 #11
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
        public static Dual operator ^(Point b, Plane a)
        {
            __m128 tmp = Detail.ext03(true, a.P0, b.P3);

            return(new Dual(0, _mm_store_ss(tmp)));
        }
예제 #12
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
 public static Plane operator |(Point a, Line b)
 {
     return(new Plane(Detail.dotPTL(a.P3, b.P1)));
 }
예제 #13
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
 public static Motor operator *(Point b, Plane a)
 {
     Detail.gp03(true, a.P0, b.P3, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
예제 #14
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
 public static Translator operator *(Point a, Point b)
 {
     return(new Translator(Detail.gp33(a.P3, b.P3)));
 }
예제 #15
0
 public Line Conjugate(Line input)
 {
     var(p1, p2) = Detail.swMM(input.P1, input.P2, P1, P2);
     return(new Line(p1, p2));
 }
예제 #16
0
파일: Math.cs 프로젝트: Ziriax/KleinSharp
 public static Motor Exp(Line l)
 {
     Detail.exp(l.P1, l.P2, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
예제 #17
0
 public unsafe void Conjugate(Direction *input, Direction *output, int count)
 {
     Detail.sw312(false, &input->P3, P1, default, &output->P3, count);
예제 #18
0
 public static Motor operator *(Motor a, Motor b)
 {
     Detail.gpMM(a.P1, a.P2, b.P1, b.P2, out var p1, out var p2);
     return(new Motor(p1, p2));
 }
예제 #19
0
 public static Direction operator /(Direction a, float s)
 {
     return(new Direction(_mm_mul_ps(a.P3, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
예제 #20
0
 public unsafe void Conjugate(Plane *input, Plane *output, int count)
 {
     Detail.sw012(true, &input->P0, P1, P2, &output->P0, count);
 }
예제 #21
0
 public float Norm()
 {
     return(_mm_store_ss(Detail.sqrt_nr1(Detail.hi_dp(P0, P0))));
 }
예제 #22
0
 public Plane Conjugate(Plane input)
 {
     return(new Plane(Detail.sw012(true, input.P0, P1, P2)));
 }
예제 #23
0
 public Line Reflect(Line l)
 {
     Detail.sw10(P0, l.P1, out var p1, out var p2);
     p2 = _mm_add_ps(p2, Detail.sw20(P0, l.P2));
     return(new Line(p1, p2));
 }
예제 #24
0
 public unsafe void Conjugate(Point *input, Point *output, int count)
 {
     Detail.sw312(true, &input->P3, P1, P2, &output->P3, count);
 }
예제 #25
0
 public static Plane operator /(Plane p, float s)
 {
     return(new Plane(_mm_mul_ps(p.P0, Detail.rcp_nr1(_mm_set1_ps(s)))));
 }
예제 #26
0
 public Point Conjugate(Point input)
 {
     return(new Point(Detail.sw312(true, input.P3, P1, P2)));
 }
예제 #27
0
 public static Point operator ^(Plane a, Branch b)
 {
     return(new Point(Detail.extPB(a.P0, b.P1)));
 }
예제 #28
0
 public unsafe void Conjugate(Line *input, Line *output, int count)
 {
     Detail.swMM(true, true, &input->P1, P1, P2, &output->P1, count);
 }
예제 #29
0
 public static Point operator ^(Plane a, IdealLine b)
 {
     return(new Point(Detail.ext02(a.P0, b.P2)));
 }
예제 #30
0
파일: Point.cs 프로젝트: Ziriax/KleinSharp
        public Point Normalized()
        {
            __m128 tmp = Detail.rcp_nr1(_mm_swizzle_ps(P3, 0 /* 0, 0, 0, 0 */));

            return(new Point(_mm_mul_ps(P3, tmp)));
        }