Box2D/Box2D_joints.i [344:365]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    %pythoncode %{
        def __set_anchor(self, value):
            if not self.bodyA:
                raise ValueError('bodyA not set.')
            if not self.bodyB:
                raise ValueError('bodyB not set.')
            self.localAnchorA=self.bodyA.GetLocalPoint(value)
            self.localAnchorB=self.bodyB.GetLocalPoint(value)
        def __get_anchor(self):
            if self.bodyA:
                return self.bodyA.GetWorldPoint(self.localAnchorA)
            if self.bodyB:
                return self.bodyB.GetWorldPoint(self.localAnchorB)
            raise ValueError('Neither body was set; unable to get world point.')

        anchor = property(__get_anchor, __set_anchor, 
                doc="""The anchor in world coordinates.
                    Getting the property depends on either bodyA and localAnchorA or 
                    bodyB and localAnchorB.
                    Setting the property requires that both bodies be set.""")
    %}
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



Box2D/Box2D_joints.i [553:573]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    %pythoncode %{
        def __set_anchor(self, value):
            if not self.bodyA:
                raise ValueError('bodyA not set.')
            if not self.bodyB:
                raise ValueError('bodyB not set.')
            self.localAnchorA=self.bodyA.GetLocalPoint(value)
            self.localAnchorB=self.bodyB.GetLocalPoint(value)
        def __get_anchor(self):
            if self.bodyA:
                return self.bodyA.GetWorldPoint(self.localAnchorA)
            if self.bodyB:
                return self.bodyB.GetWorldPoint(self.localAnchorB)
            raise ValueError('Neither body was set; unable to get world point.')
        anchor = property(__get_anchor, __set_anchor, 
                doc="""The anchor in world coordinates.
                    Getting the property depends on either bodyA and localAnchorA or 
                    bodyB and localAnchorB.
                    Setting the property requires that both bodies be set.""")
    %}
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



