A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an edge. A joint edge belongs to a doubly linked list maintained in each attached body. Each joint has two joint nodes, one for each attached body.
コード例 #1
0
ファイル: Joint.cs プロジェクト: dvgamerr/GhostLegend-XNA
        /// <summary>
        /// Constructor for fixed joint
        /// </summary>
        protected Joint(Body body)
        {
            BodyA = body;

            //Connected bodies should not collide by default
            CollideConnected = false;

            EdgeA = new JointEdge();
        }
コード例 #2
0
ファイル: Joint.cs プロジェクト: dropsonic/artificergame
        public JointEdge Copy()
        {
            JointEdge result = new JointEdge();

            result.Joint = this.Joint;
            result.Next  = this.Next;
            result.Other = this.Other;
            result.Prev  = this.Prev;
            return(result);
        }
コード例 #3
0
ファイル: Joint.cs プロジェクト: dvgamerr/GhostLegend-XNA
        protected Joint(Body body, Body bodyB)
        {
            Debug.Assert(body != bodyB);

            BodyA = body;
            EdgeA = new JointEdge();
            BodyB = bodyB;
            EdgeB = new JointEdge();

            //Connected bodies should not collide by default
            CollideConnected = false;
        }
コード例 #4
0
ファイル: Joint.cs プロジェクト: dropsonic/artificergame
        public Joint Copy()
        {
            Joint result = (Joint)this.MemberwiseClone();

            JointEdge resultEdgeA = EdgeA.Copy();

            resultEdgeA.Joint = result;
            result.EdgeA      = resultEdgeA;

            JointEdge resultEdgeB = EdgeB.Copy();

            resultEdgeB.Joint = result;
            result.EdgeB      = resultEdgeB;

            return(result);
        }
コード例 #5
0
ファイル: PaddleBall.cs プロジェクト: zfogg/Bounce
        void removeJoints(JointEdge jointEdge)
        {
            scene.World.RemoveJoint(jointEdge.Joint);

            if (jointEdge.Next != null)
                removeJoints(jointEdge.Next);
        }
コード例 #6
0
        /// <summary>
        /// Constructor for fixed joint
        /// </summary>
        protected Joint(Body body)
        {
            BodyA = body;

            //Connected bodies should not collide by default
            CollideConnected = false;

            EdgeA = new JointEdge();
        }
コード例 #7
0
        protected Joint(Body body, Body bodyB)
        {
            Debug.Assert(body != bodyB);

            BodyA = body;
            EdgeA = new JointEdge();
            BodyB = bodyB;
            EdgeB = new JointEdge();

            //Connected bodies should not collide by default
            CollideConnected = false;
        }