本文整理汇总了C#中Angle类的典型用法代码示例。如果您正苦于以下问题:C# Angle类的具体用法?C# Angle怎么用?C# Angle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Angle类属于命名空间,在下文中一共展示了Angle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Hokuyo
public Hokuyo(LidarID lidar)
{
//trameDetails = "VV\n00P\n";
this.lidar = lidar;
semLock = new Semaphore(1, 1);
switch (lidar)
{
case LidarID.LidarSol: model = "URG-04LX-UG01"; break;
}
if (model.Contains("UBG-04LX-F01"))//Hokuyo bleu
{
nbPoints = 725;
angleMesurable = new Angle(240, AnglyeType.Degre);
offsetPoints = 44;
}
else if (model.Contains("URG-04LX-UG01")) //Petit hokuyo
{
nbPoints = 725;
angleMesurable = new Angle(240, AnglyeType.Degre);
offsetPoints = 44;
}
else if (model.Contains("BTM-75LX")) // Grand hokuyo
{
nbPoints = 1080;
angleMesurable = new Angle(270, AnglyeType.Degre);
offsetPoints = 0;
}
position = Robots.GrosRobot.Position;
Robots.GrosRobot.PositionChange += GrosRobot_PositionChange;
}
开发者ID:KiwiJaune,项目名称:GoBot,代码行数:34,代码来源:Hokuyo.cs
示例17: Arrow
public Arrow(Game g, Point p, Angle a, Angle z)
: base(g, 0, 0, new ModelArrow(a, z, p))
{
//texture = t;
//origin = new Vector2(section.Width / 2, section.Height);
world = Matrix.CreateTranslation(new Vector3(displayable.position.x, displayable.position.y, displayable.position.z));
}
开发者ID:chrisdaher,项目名称:3dBubbleBreaker,代码行数:7,代码来源:Arrow.cs
示例18: CheckAndGeneratePerpendicularImplyCongruentAdjacent
private static List<EdgeAggregator> CheckAndGeneratePerpendicularImplyCongruentAdjacent(Perpendicular perp, Angle angle1, Angle angle2)
{
List<EdgeAggregator> newGrounded = new List<EdgeAggregator>();
if (!Utilities.CompareValues(angle1.measure + angle2.measure, 90)) return newGrounded;
// The perpendicular intersection must occur at the same vertex of both angles (we only need check one).
if (!(angle1.GetVertex().Equals(perp.intersect) && angle2.GetVertex().Equals(perp.intersect))) return newGrounded;
// Are the angles adjacent?
Segment sharedRay = angle1.IsAdjacentTo(angle2);
if (sharedRay == null) return newGrounded;
// Do the non-shared rays for both angles align with the segments defined by the perpendicular intersection?
if (!perp.DefinesBothRays(angle1.OtherRayEquates(sharedRay), angle2.OtherRayEquates(sharedRay))) return newGrounded;
//
// Now we have perpendicular -> complementary angles scenario
//
Complementary cas = new Complementary(angle1, angle2);
// Construct hyperedge
List<GroundedClause> antecedent = new List<GroundedClause>();
antecedent.Add(perp);
antecedent.Add(angle1);
antecedent.Add(angle2);
newGrounded.Add(new EdgeAggregator(antecedent, cas, annotation));
return newGrounded;
}
开发者ID:wcatykid,项目名称:GeoShader,代码行数:31,代码来源:AdjacentAnglesPerpendicularImplyComplementary.cs
示例19: Rotate2D
/// <summary>
/// Вернёт frame, в котором повёрнуты координаты X и Y и Yaw равен переданному углу.
/// </summary>
static public Frame3D Rotate2D(Frame3D frame, Angle angle)
{
double x = frame.X * Math.Cos(angle.Radian) - frame.Y * Math.Sin(angle.Radian);
double y = frame.X * Math.Sin(angle.Radian) + frame.Y * Math.Cos(angle.Radian);
return new Frame3D(x, y, frame.Z, Angle.FromGrad(0), angle, Angle.FromGrad(0));
}
开发者ID:DmitryZyr,项目名称:CVARC,代码行数:10,代码来源:FarseerConverter.cs
示例20: Triangle
/// <summary>
/// Create a new triangle bounded by the 3 given segments. The set of points that define these segments should have only 3 distinct elements.
/// </summary>
/// <param name="a">The segment opposite point a</param>
/// <param name="b">The segment opposite point b</param>
/// <param name="c">The segment opposite point c</param>
public Triangle(Segment a, Segment b, Segment c)
: base(a, b, c)
{
SegmentA = a;
SegmentB = b;
SegmentC = c;
Point1 = SegmentA.Point1;
Point2 = SegmentA.Point2;
Point3 = Point1.Equals(SegmentB.Point1) || Point2.Equals(SegmentB.Point1) ? SegmentB.Point2 : SegmentB.Point1;
AngleA = new Angle(Point1, Point2, Point3);
AngleB = new Angle(Point2, Point3, Point1);
AngleC = new Angle(Point3, Point1, Point2);
isRight = isRightTriangle();
provenRight = false;
givenRight = false;
isIsosceles = IsIsosceles();
provenIsosceles = false;
isEquilateral = IsEquilateral();
provenEquilateral = false;
congruencePairs = new List<Triangle>();
similarPairs = new List<Triangle>();
addSuperFigureToDependencies();
}
开发者ID:wcatykid,项目名称:GeoShader,代码行数:34,代码来源:Triangle.cs
注:本文中的Angle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论