示例#1
0
    /// <summary>
    /// Reads a PlanarJoint_Base from the given XmlReader.
    /// </summary>
    /// <param name="reader"></param>
    /// <returns></returns>
    private static PlanarJoint_Base ReadPlanarJoint_3_0(XmlReader reader)
    {
        // Create a new PlanarJoint_Base.
        PlanarJoint_Base planarJoint = (PlanarJoint_Base)SkeletalJoint_Base.JOINT_FACTORY(SkeletalJointType.PLANAR);

        foreach (string name in IOUtilities.AllElements(reader))
        {
            switch (name)
            {
            case "BXDVector3":
                switch (reader["VectorID"])
                {
                case "Normal":
                    // Assign the BXDVector3 to the normal.
                    planarJoint.normal = ReadBXDVector3_3_0(reader.ReadSubtree());
                    break;

                case "BasePoint":
                    // Assign the BXDVector3 to the basePoint.s
                    planarJoint.basePoint = ReadBXDVector3_3_0(reader.ReadSubtree());
                    break;
                }
                break;
            }
        }

        return(planarJoint);
    }
示例#2
0
    /// <summary>
    /// Used for writing the data of a PlanarJoint_Base.
    /// </summary>
    /// <param name="joint"></param>
    /// <param name="writer"></param>
    private static void WritePlanarJoint(PlanarJoint_Base joint, XmlWriter writer)
    {
        writer.WriteStartElement("PlanarJoint");

        WriteBXDVector3(joint.normal, writer, "Normal");
        WriteBXDVector3(joint.basePoint, writer, "BasePoint");

        writer.WriteEndElement();
    }
示例#3
0
 public LinearDOF_Impl(PlanarJoint_Base pjb, int axis)
 {
     this.pjb  = pjb;
     this.axis = axis;
 }
示例#4
0
 public AngularDOF_Impl(PlanarJoint_Base pjb)
 {
     this.pjb = pjb;
 }