當前位置: 首頁>>代碼示例>>C#>>正文


C# Angle類代碼示例

本文整理匯總了C#中Angle的典型用法代碼示例。如果您正苦於以下問題:C# Angle類的具體用法?C# Angle怎麽用?C# Angle使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Angle類屬於命名空間,在下文中一共展示了Angle類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Camera

		/// <summary>
		/// Default constructor.
		/// </summary>
		public Camera(Scene scene)
		{
			_scene = scene;
			
			// set default positioning
			_position = new Vector(0.0, 0.0, 9.0);
			_upVec = new Vector(0.0, 1.0, 0.0);
			_center = new Vector();
			
			// set default field of view
			fov = new Angle();
			fov["deg"] = 28.0;
			
			// set default interaction factors
			dollyFactor = 0.15;
			panFactor = 0.05;
			
			lastDirection = ViewDirection.Front;

			Frustum = new FrustumDef();

			DefaultAnimationOptions.Duration = 4.0;
			DefaultAnimationOptions.EaseType = EaseType.Quadratic;

			UseInertia = true;
			InertiaAnimationOptions = new AnimationOptions() {
				Duration = 6.0,
				EaseType = EaseType.Linear
			};
			InertiaType = InteractionType.None;
		}
開發者ID:erisonliang,項目名稱:monoworks,代碼行數:34,代碼來源:Camera.cs

示例2: Camera

 public Camera()
 {
     _position = new Vector3(0.0f, 0.0f, 0.0f);
     _rotation = new Vector3(0.0f, 0.0f, 0.0f);
     _fieldOfView = Angle.CreateDegrees(90).Radians;
     _aspect = new Vector2(16, 9);
 }
開發者ID:killowatt,項目名稱:Dunamis,代碼行數:7,代碼來源:Camera.cs

示例3: Start

    void Start()
    {
        angle = GetComponent<Angle> ();
        speed = Random.Range (4, 12);

        EnemyManager.get().enemies.Add (this);
    }
開發者ID:JonathanMcCaffrey,項目名稱:Demo_AssetStorePrototype,代碼行數:7,代碼來源:Enemy.cs

示例4: Move

    // Update is called once per frame
    public void Move()
    {
        if ( !Dead && GameController.mode == 3 ) {
            DegreeAngle += dirrection * DegreesPerSecond * Time.deltaTime;

            transform.position = DegreeAngle.PointByRadius (Radius);

            //get radius changes
            ChangeRingDirrection = InputController.GetInput ();

            Radius += ChangeRingDirrection * RadiusLerpSpeed * Time.deltaTime;
            if ( Radius < InitialRadius )
                Radius = InitialRadius;
            else if ( Radius > FinalRadius )
                Radius = FinalRadius;

            //draw surrounding circle
        }
        else {
            if ( SurroundingCircle != null ) {
                foreach ( GameObject i  in SurroundingCircle )
                    i.GetComponent<LineRenderer>().renderer.enabled = true;
                SurroundingCircle = null;
            }
        }
    }
開發者ID:valiro21,項目名稱:AtomicPlus,代碼行數:27,代碼來源:PlayerMovement.cs

示例5: Create_Angle_Check_Value_Less_Than_Two_Pi

        public static void Create_Angle_Check_Value_Less_Than_Two_Pi()
        {
            Angle angle = new Angle(-3 * Math.PI);
            angle = angle.ReduceAngle();

            Assert.AreEqual(Math.PI, angle.Value, 0.00001);
        }
開發者ID:jystic,項目名稱:Triangles-in-space,代碼行數:7,代碼來源:AngleTests.cs

示例6: OtherAngle

        // Return the shared angle in both congruences
        public Angle OtherAngle(Angle thatAngle)
        {
            if (angle1.Equates(thatAngle)) return angle2;
            if (angle2.Equates(thatAngle)) return angle1;

            return null;
        }
開發者ID:wcatykid,項目名稱:GeoShader,代碼行數:8,代碼來源:AnglePairRelation.cs

示例7: TestSelection

        public void TestSelection()
        {
            Point start, center, stop, p;
            Selection s;

            start = new Point (0, 10);
            stop = new Point (10, 0);
            center = new Point (0, 0);
            Angle a = new Angle (start, center, stop);

            p = new Point (0.1, 0.3);
            s = a.GetSelection (p, 0.5);
            Assert.AreEqual (SelectionPosition.AngleCenter, s.Position);
            Assert.AreEqual (p.Distance (center), s.Accuracy);

            p = new Point (9.8, 0.3);
            s = a.GetSelection (p, 0.5);
            Assert.AreEqual (SelectionPosition.AngleStop, s.Position);
            Assert.AreEqual (p.Distance (stop), s.Accuracy);

            p = new Point (0.2, 9.9);
            s = a.GetSelection (p, 0.5);
            Assert.AreEqual (SelectionPosition.AngleStart, s.Position);
            Assert.AreEqual (p.Distance (start), s.Accuracy);

            p = new Point (5, 5);
            s = a.GetSelection (p, 0.5);
            Assert.IsNull (s);
        }
開發者ID:GNOME,項目名稱:longomatch,代碼行數:29,代碼來源:TestAngle.cs

示例8: Seg

 public Seg(World world,Vertex start,Vertex end,Linedef linedef,bool isbackside,Angle angle,Fixed offset)
 {
     if (world == null)
         throw new ArgumentNullException("world");
     if (start == null)
         throw new ArgumentNullException("start");
     if (end == null)
         throw new ArgumentNullException("end");
     if (linedef == null)
         throw new ArgumentNullException("linedef");
     if (start.World != world)
         throw new ArgumentException("Start vertex is from another world.");
     if (end.World != world)
         throw new ArgumentException("End vertex is from another world.");
     if (linedef.World != world)
         throw new ArgumentException("Linedef is from another world.");
     this.world = world;
     // TODO :: start
     // TODO :: end
     // TODO :: linedef
     if (!isbackside)
     {
         this.front = linedef.Front;
         this.back = linedef.Back;
     }
     else
     {
         this.front = linedef.Back;
         this.back = linedef.Front;
     }
     // TODO :: angle
     // TODO :: offset
 }
開發者ID:VenoMpie,項目名稱:DoomSharp,代碼行數:33,代碼來源:Seg.cs

示例9: Coordinate

        public Coordinate(Angle aTheta, Angle aPhi)
        {
            iTheta = aTheta;
            iPhi = aPhi;

            InitVector();
        }
開發者ID:JoostZ,項目名稱:vixencontrol,代碼行數:7,代碼來源:Coordinate.cs

示例10: EuclideanVector

 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="start">Start point.</param>
 /// <param name="direction">Angular direction of the vector</param>
 /// <param name="magnitude">Magnitude of the vector.</param>
 public EuclideanVector(Point start, Angle direction, float magnitude)
 {
     Start = start;
     Direction = direction;
     Magnitude = magnitude;
     End = CalculateEndPoint(start, direction, magnitude);
 }
開發者ID:ianlee74,項目名稱:NETMFx,代碼行數:13,代碼來源:EuclideanVector.cs

示例11: InstantiateTheorem

        private static List<EdgeAggregator> InstantiateTheorem(Angle a1, Angle a2)
        {
            List<EdgeAggregator> newGrounded = new List<EdgeAggregator>();

            // Acquire all circles in which the angles are inscribed
            List<Circle> circles1 = Circle.IsInscribedAngle(a1);
            List<Circle> circles2 = Circle.IsInscribedAngle(a2);

            //Acquire the common circles in which both angles are inscribed
            List<Circle> circles = (circles1.Intersect(circles2)).ToList();

            //For each common circle, check for equivalent itercepted arcs
            foreach (Circle c in circles)
            {
                Arc i1 = Arc.GetInterceptedArc(c, a1);
                Arc i2 = Arc.GetInterceptedArc(c, a2);

                if (i1.StructurallyEquals(i2))
                {
                    GeometricCongruentAngles gcas = new GeometricCongruentAngles(a1, a2);

                    //For hypergraph
                    List<GroundedClause> antecedent = new List<GroundedClause>();
                    antecedent.Add(c);
                    antecedent.Add(a1);
                    antecedent.Add(a2);
                    antecedent.Add(i1);

                    newGrounded.Add(new EdgeAggregator(antecedent, gcas, annotation));
                }
            }

            return newGrounded;
        }
開發者ID:wcatykid,項目名稱:GeoShader,代碼行數:34,代碼來源:TwoInterceptedArcsHaveCongruentAngles.cs

示例12: VerifyAllEnums

 public void VerifyAllEnums()
 {
     var acceleration = new Acceleration(1, AccelerationUnit.BaseUnit);
     var angle = new Angle(1, AngleUnit.BaseUnit);
     var angularAcceleration = new AngularAcceleration(1, AngularAccelerationUnit.BaseUnit);
     var area = new Area(1, AreaUnit.BaseUnit);
     var density = new MassDensity(1, MassDensityUnit.BaseUnit);
     var electricCurrent = new ElectricCurrent(1, ElectricCurrentUnit.BaseUnit);
     var electricResistance = new ElectricResistance(1, ElectricResistanceUnit.BaseUnit);
     var electricVoltage = new ElectricPotential(1, ElectricPotentialUnit.BaseUnit);
     var energy = new Energy(1, EnergyUnit.BaseUnit);
     var force = new Force(1, ForceUnit.BaseUnit);
     var frequency = new Frequency(1, FrequencyUnit.BaseUnit);
     var jerk = new Jerk(1, JerkUnit.BaseUnit);
     var length = new Length(1, LengthUnit.BaseUnit);
     var mass = new Mass(1, MassUnit.BaseUnit);
     var massFlowRate = new MassFlowRate(1, MassFlowRateUnit.BaseUnit);
     var momentum = new Momentum(1, MomentumUnit.BaseUnit);
     var numeric = new Numeric(1, NumericUnit.BaseUnit);
     var power = new Power(1, PowerUnit.BaseUnit);
     var pressure = new Pressure(1, PressureUnit.BaseUnit);
     var speed = new Speed(1, SpeedUnit.BaseUnit);
     var temperature = new Temperature(1, TemperatureUnit.BaseUnit);
     var time = new Time(1, TimeUnit.BaseUnit);
     var torque = new Torque(1, TorqueUnit.BaseUnit);
     var volume = new Volume(1, VolumeUnit.BaseUnit);
     var volumetricFlowRate = new VolumetricFlowRate(1, VolumetricFlowRateUnit.BaseUnit);
 }
開發者ID:EddieGarmon,項目名稱:GraduatedCylinder,代碼行數:28,代碼來源:EnumerationVerification.cs

示例13: Frame2D

 public Frame2D(double x, double y, Angle angle)
 {
     X = x;
     Y = y;
     Angle = angle;
     Center = new Point2D(x, y);
 }
開發者ID:DmitryZyr,項目名稱:CVARC,代碼行數:7,代碼來源:Frame2D.cs

示例14: CadViewPort

 public CadViewPort(String name, Model parentMdl,
  Point center, Double height, Double width,
  Vector scaleVec,
  Angle rotation)
     : this(name, parentMdl, center, new Vector(width, height, null), scaleVec, rotation)
 {
 }
開發者ID:catashd,項目名稱:NetVecCad,代碼行數:7,代碼來源:CadViewPort.cs

示例15: Revive

 public void Revive()
 {
     DegreeAngle = 0f;
     Radius = NewRadius = InitialRadius;
     Dead = false;
     x = -1;
 }
開發者ID:valiro21,項目名稱:AtomicPlus,代碼行數:7,代碼來源:PlayerMovement.cs


注:本文中的Angle類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。