当前位置: 首页>>代码示例>>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;未经允许,请勿转载。