public UmlTimeLineGraphicState(DataFragment fragment)
     : base(fragment)
 {
     m_Height = 40.0;
     m_Length = 200.0;
     m_BasePoint = new GePoint(50.0, 20.0, 0.0);
     m_Direction = UnitVector.kXAxis;
 }
Example #2
0
        public void ConstructorTest()
        {
            UnitVector target = new UnitVector(10, 100, -26);

            double expected = 1;
            double actual = target.Vector.Length();

            Assert.AreEqual(expected, actual, "FR.Math.UnitVector.UnitVector");
        }
Example #3
0
 public GePlane(GePoint point, UnitVector Normal)
 {
     Debug.Assert(point != null && Normal != null);
     m_Proxy = MathAdaptorFactory.Instance.CreatePlaneAdaptor(point._Proxy, Normal._Proxy);
 }
Example #4
0
        public void SetRotateTest2()
        {
            GePoint basePosition = new GePoint(8, -2, 0);
            UnitVector axis = new UnitVector(1, -0.5, 6);

            Matrix44 trans = Matrix44.Identity;
            trans.SetRotate(1, axis, basePosition);

            GePoint target = new GePoint(-2, 3, 4);
            GePoint actual = trans * target;

            GePoint expected = new GePoint(-1.67301, -8.19326, 3.01273);

            Assert.AreEqual(expected, actual, "FR.Math.Matrix44.SetRotate did not return the expected value.");
        }
Example #5
0
        public Matrix44 SetRotate(UnitVector fromDirection
            , UnitVector toDirection, GePoint basePoint)
        {
            Debug.Assert(fromDirection != null && toDirection != null
                && basePoint != null);
            if (!(fromDirection != null && toDirection != null
                && basePoint != null)) return this;
            _Proxy.SetRotate(fromDirection._Proxy, toDirection._Proxy, basePoint._Proxy);

            return this;
        }
Example #6
0
 // Rotate the angle is radian
 public Matrix44 SetRotate(double AngleThita, UnitVector axis, GePoint basePoint)
 {
     Debug.Assert(axis != null && basePoint != null);
     if (!(axis != null && basePoint != null)) return this;
     _Proxy.SetRotate(AngleThita, axis._Proxy, basePoint._Proxy);
     return this;
 }
Example #7
0
        public GeLine(GePoint point, UnitVector direction)
        {
            Debug.Assert(point != null && direction != null);

            m_Proxy = MathAdaptorFactory.Instance.CreateLineAdaptor(point._Proxy, direction._Proxy);
        }
Example #8
0
        public void UnitVectorTest()
        {
            Vector target = new Vector(0, 20, 0);

            UnitVector expected = new UnitVector(0, 1, 0);
            UnitVector actual = target.UnitVector;

            Assert.AreEqual(expected, actual, "FR.Math.Vector.UnitVector");
        }
Example #9
0
 public UnitVector Clone()
 {
     UnitVector NewVector = new UnitVector(m_Proxy.Clone());
     return NewVector;
 }