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


C# Body.GetLocalVector方法代码示例

本文整理汇总了C#中Body.GetLocalVector方法的典型用法代码示例。如果您正苦于以下问题:C# Body.GetLocalVector方法的具体用法?C# Body.GetLocalVector怎么用?C# Body.GetLocalVector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Body的用法示例。


在下文中一共展示了Body.GetLocalVector方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LineJoint

        public LineJoint(Body bA, Body bB, Vector2 anchor, Vector2 axis)
            : base(bA, bB)
        {
            JointType = JointType.Line;

            LocalAnchorA = bA.GetLocalPoint(anchor);
            LocalAnchorB = bB.GetLocalPoint(anchor);
            LocalXAxis = bA.GetLocalVector(axis);
        }
开发者ID:Nailz,项目名称:MonoGame-Samples,代码行数:9,代码来源:LineJoint.cs

示例2: WheelJoint

 public WheelJoint(Body bA, Body bB, FVector2 anchor, FVector2 axis)
     : base(bA, bB)
 {
     JointType = JointType.Wheel;
     LocalAnchorA = bA.GetLocalPoint(anchor);
     LocalAnchorB = bB.GetLocalPoint(anchor);
     m_localXAxisA = bA.GetLocalVector(axis);
     m_localYAxisA = MathUtils.Cross(1.0f, m_localXAxisA);
 }
开发者ID:pracalic,项目名称:Farseer-Unity3D,代码行数:9,代码来源:WheelJoint.cs

示例3: FixedLineJoint

        public FixedLineJoint(Body body, Vector2 bodyAnchor, Vector2 worldAnchor, Vector2 axis)
            : base(body)
        {
            JointType = JointType.FixedLine;

            //David: Start here
            LocalAnchorA = body.GetLocalPoint(bodyAnchor);
            LocalAnchorB = body.GetLocalPoint(bodyAnchor);
            LocalXAxis = body.GetLocalVector(axis);
        }
开发者ID:HaKDMoDz,项目名称:Zazumo,代码行数:10,代码来源:FixedLineJoint.cs

示例4: FixedLineJoint

        /// <summary>
        /// Initialize the bodies, anchors, axis, and reference angle using the local
        /// anchor and world axis.
        /// This requires defining a line of
        /// motion using an axis and an anchor point. Uses local
        /// anchor points and a local axis so that the initial configuration
        /// can violate the constraint slightly. The joint translation is zero
        /// when the local anchor points coincide in world space. Using local
        /// anchors and a local axis helps when saving and loading a game.
        /// </summary>
        /// <param name="bodyA">The first body.</param>
        /// <param name="worldAnchor">The anchor.</param>
        /// <param name="axis">The axis.</param>
        public FixedLineJoint(Body bodyA, Vector2 worldAnchor, Vector2 axis)
            : base(bodyA)
        {
            JointType = JointType.FixedLine;

            BodyB = bodyA;

            LocalAnchorA = worldAnchor;
            LocalAnchorB = BodyB.GetLocalPoint(worldAnchor);

            _localXAxis1 = bodyA.GetLocalVector(axis);
            _localYAxis1 = MathUtils.Cross(1.0f, _localXAxis1);
            _localYAxis1 = MathUtils.Cross(1.0f, _localXAxis1);

            _limitState = LimitState.Inactive;
        }
开发者ID:dvgamer,项目名称:GhostLegend-XNA,代码行数:29,代码来源:FixedLineJoint.cs

示例5: LineJoint

        /// <summary>
        /// Initialize the bodies, anchors, axis, and reference angle using the local
        /// anchor and world axis.
        /// This requires defining a line of
        /// motion using an axis and an anchor point. Uses local
        /// anchor points and a local axis so that the initial configuration
        /// can violate the constraint slightly. The joint translation is zero
        /// when the local anchor points coincide in world space. Using local
        /// anchors and a local axis helps when saving and loading a game.
        /// </summary>
        /// <param name="bodyA">The first body.</param>
        /// <param name="bodyB">The second body.</param>
        /// <param name="localAnchorA">The first body anchor.</param>
        /// <param name="localAnchorB">The second body anchor.</param>
        /// <param name="axis">The axis.</param>
        public LineJoint(Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB, Vector2 axis)
            : base(bodyA, bodyB)
        {
            JointType = JointType.Line;

            BodyA = bodyA;
            BodyB = bodyB;

            LocalAnchorA = localAnchorA;
            LocalAnchorB = localAnchorB;

            _localXAxis1 = bodyA.GetLocalVector(axis);
            _localYAxis1 = MathUtils.Cross(1.0f, _localXAxis1);
            _localYAxis1 = MathUtils.Cross(1.0f, _localXAxis1);

            _limitState = LimitState.Inactive;
        }
开发者ID:dvgamer,项目名称:GhostLegend-XNA,代码行数:32,代码来源:LineJoint.cs


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