Esempio n. 1
0
 class Meta:
     bodyA = XmlAttr("bodyA", String(), required=True)
     bodyB = XmlAttr("bodyB", String(), required=True)
     anchor = XmlAttr("anchor", Tuple(Float(), Float()))
     localAnchorA = XmlAttr("localAnchorA", Tuple(Float(), Float()))
     localAnchorB = XmlAttr("localAnchorB", Tuple(Float(), Float()))
     axis = XmlAttr("axis", Tuple(Float(), Float()))
     limit = XmlAttr("limit", Tuple(Angle(), Angle()))
     ctrllimit = XmlAttr("ctrllimit", Tuple(Angle(), Angle()))
     typ = XmlAttr("type",
                   Choice("revolute", "friction", "prismatic"),
                   required=True)
     name = XmlAttr("name", String())
     motor = XmlAttr("motor", Bool())
Esempio n. 2
0
 class Meta:
     color = XmlAttr("color", List(Float()))
     name = XmlAttr("name", String())
     typ = XmlAttr("type",
                   Choice("static", "kinematic", "dynamic"),
                   required=True)
     fixtures = XmlChildren("fixture", lambda: XmlFixture)
     position = XmlAttr("position", Point2D())
Esempio n. 3
0
 class Meta:
     typ = XmlAttr(
         "type",
         Choice(
             "xpos",
             "ypos",
             "xvel",
             "yvel",
             "apos",
             "avel",
             "dist",
             "angle",
         ))
     transform = XmlAttr("transform", Choice("id", "sin", "cos"))
     body = XmlAttr("body", String())
     to = XmlAttr("to", String())
     joint = XmlAttr("joint", String())
     local = XmlAttr("local", Point2D())
     com = XmlAttr("com", List(String()))
Esempio n. 4
0
 class Meta:
     typ = XmlAttr("type", Choice("force", "torque"), required=True)
     body = XmlAttr("body",
                    String(),
                    help="name of the body to apply force on")
     bodies = XmlAttr("bodies",
                      List(String()),
                      help="names of the bodies to apply force on")
     joint = XmlAttr("joint", String(), help="name of the joint")
     anchor = XmlAttr(
         "anchor",
         Point2D(),
         help="location of the force in local coordinate frame")
     direction = XmlAttr(
         "direction",
         Point2D(),
         help="direction of the force in local coordinate frame")
     ctrllimit = XmlAttr("ctrllimit",
                         Tuple(Float(), Float()),
                         help="limit of the control input in Newton")