当前位置: 首页>>代码示例>>C#>>正文


C# Common.Vec2类代码示例

本文整理汇总了C#中Box2D.Common.Vec2的典型用法代码示例。如果您正苦于以下问题:C# Vec2类的具体用法?C# Vec2怎么用?C# Vec2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Vec2类属于Box2D.Common命名空间,在下文中一共展示了Vec2类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WeldJointDef

 public WeldJointDef()
 {
     type = JointType.WELD;
     localAnchorA = new Vec2();
     localAnchorB = new Vec2();
     referenceAngle = 0.0f;
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:7,代码来源:WeldJointDef.cs

示例2: initialize

 /// <summary>
 /// Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
 /// </summary>
 public virtual void initialize(Body bA, Body bB, Vec2 anchor)
 {
     bodyA = bA;
     bodyB = bB;
     bA.getLocalPointToOut(anchor, localAnchorA);
     bB.getLocalPointToOut(anchor, localAnchorB);
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:10,代码来源:FrictionJointDef.cs

示例3: ContactPositionConstraint

 public ContactPositionConstraint()
 {
     for (int i = 0; i < LocalPoints.Length; i++)
     {
         LocalPoints[i] = new Vec2();
     }
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:7,代码来源:ContactPositionConstraint.cs

示例4: Initialize

 /// <summary>
 /// Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
 /// </summary>
 public void Initialize(Body bA, Body bB, Vec2 anchor)
 {
     BodyA = bA;
     BodyB = bB;
     bA.GetLocalPointToOut(anchor, LocalAnchorA);
     bB.GetLocalPointToOut(anchor, LocalAnchorB);
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:10,代码来源:FrictionJointDef.cs

示例5: WeldJointDef

 public WeldJointDef()
 {
     Type = JointType.Weld;
     LocalAnchorA = new Vec2();
     LocalAnchorB = new Vec2();
     ReferenceAngle = 0.0f;
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:7,代码来源:WeldJointDef.cs

示例6: FrictionJointDef

 public FrictionJointDef()
 {
     Type = JointType.Friction;
     LocalAnchorA = new Vec2();
     LocalAnchorB = new Vec2();
     MaxForce = 0f;
     MaxTorque = 0f;
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:8,代码来源:FrictionJointDef.cs

示例7: FrictionJointDef

 public FrictionJointDef()
 {
     type = JointType.FRICTION;
     localAnchorA = new Vec2();
     localAnchorB = new Vec2();
     maxForce = 0f;
     maxTorque = 0f;
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:8,代码来源:FrictionJointDef.cs

示例8: GetInitializedArray

 protected internal Vec2[] GetInitializedArray(int argLength)
 {
     var ray = new Vec2[argLength];
     for (int i = 0; i < ray.Length; i++)
     {
         ray[i] = new Vec2();
     }
     return ray;
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:9,代码来源:Vec2Array.cs

示例9: WorldManifold

 public WorldManifold()
 {
     normal = new Vec2();
     points = new Vec2[Settings.maxManifoldPoints];
     for (int i = 0; i < Settings.maxManifoldPoints; i++)
     {
         points[i] = new Vec2();
     }
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:9,代码来源:WorldManifold.cs

示例10: WorldManifold

 public WorldManifold()
 {
     Normal = new Vec2();
     Points = new Vec2[Settings.MAX_MANIFOLD_POINTS];
     for (int i = 0; i < Settings.MAX_MANIFOLD_POINTS; i++)
     {
         Points[i] = new Vec2();
     }
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:9,代码来源:WorldManifold.cs

示例11: Manifold

 /// <summary> creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.</summary>
 public Manifold()
 {
     points = new ManifoldPoint[Settings.maxManifoldPoints];
     for (int i = 0; i < Settings.maxManifoldPoints; i++)
     {
         points[i] = new ManifoldPoint();
     }
     localNormal = new Vec2();
     localPoint = new Vec2();
     pointCount = 0;
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:12,代码来源:Manifold.cs

示例12: PulleyJointDef

 public PulleyJointDef()
 {
     Type = JointType.Pulley;
     GroundAnchorA = new Vec2(-1.0f, 1.0f);
     GroundAnchorB = new Vec2(1.0f, 1.0f);
     LocalAnchorA = new Vec2(-1.0f, 0.0f);
     LocalAnchorB = new Vec2(1.0f, 0.0f);
     LengthA = 0.0f;
     LengthB = 0.0f;
     Ratio = 1.0f;
     CollideConnected = true;
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:12,代码来源:PulleyJointDef.cs

示例13: FrictionJoint

        /// <param name="argWorldPool"></param>
        /// <param name="def"></param>
        public FrictionJoint(IWorldPool argWorldPool, FrictionJointDef def)
            : base(argWorldPool, def)
        {
            m_localAnchorA = new Vec2(def.localAnchorA);
            m_localAnchorB = new Vec2(def.localAnchorB);

            m_linearImpulse = new Vec2();
            m_angularImpulse = 0.0f;

            m_maxForce = def.maxForce;
            m_maxTorque = def.maxTorque;
        }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:14,代码来源:FrictionJoint.cs

示例14: PulleyJointDef

 public PulleyJointDef()
 {
     type = JointType.PULLEY;
     groundAnchorA = new Vec2(-1.0f, 1.0f);
     groundAnchorB = new Vec2(1.0f, 1.0f);
     localAnchorA = new Vec2(-1.0f, 0.0f);
     localAnchorB = new Vec2(1.0f, 0.0f);
     lengthA = 0.0f;
     lengthB = 0.0f;
     ratio = 1.0f;
     collideConnected = true;
 }
开发者ID:thdtjsdn,项目名称:box2dnet,代码行数:12,代码来源:PulleyJointDef.cs

示例15: PolygonShape

 public PolygonShape()
     : base(ShapeType.Polygon)
 {
     VertexCount = 0;
     Vertices = new Vec2[Settings.MAX_POLYGON_VERTICES];
     for (int i = 0; i < Vertices.Length; i++)
     {
         Vertices[i] = new Vec2();
     }
     Normals = new Vec2[Settings.MAX_POLYGON_VERTICES];
     for (int i = 0; i < Normals.Length; i++)
     {
         Normals[i] = new Vec2();
     }
     Radius = Settings.POLYGON_RADIUS;
     Centroid.SetZero();
 }
开发者ID:gerich-home,项目名称:box2dnet,代码行数:17,代码来源:PolygonShape.cs


注:本文中的Box2D.Common.Vec2类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。