2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module PhysicsJointSpring
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend PhysicsJoint
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Set the anchor point on body b.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] setAnchr2
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table anchr2
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring self (return value: cc.PhysicsJointSpring)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Set the anchor point on body a.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] setAnchr1
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table anchr1
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring self (return value: cc.PhysicsJointSpring)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Get the spring soft constant.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] getDamping
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Set the spring constant.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] setStiffness
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float stiffness
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring self (return value: cc.PhysicsJointSpring)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Get the distance of the anchor points.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] getRestLength
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Get the anchor point on body b.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] getAnchr2
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Get the anchor point on body a.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] getAnchr1
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Get the spring constant.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] getStiffness
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2015-01-08 10:40:40 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#PhysicsJointSpring] createConstraints
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Set the distance of the anchor points.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] setRestLength
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float restLength
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring self (return value: cc.PhysicsJointSpring)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Set the spring soft constant.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] setDamping
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float damping
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring self (return value: cc.PhysicsJointSpring)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 20:30:15 +08:00
|
|
|
-- Create a fixed distance joint.<br>
|
|
|
|
-- param a A is the body to connect.<br>
|
|
|
|
-- param b B is the body to connect.<br>
|
|
|
|
-- param anchr1 Anchr1 is the anchor point on body a.<br>
|
|
|
|
-- param anchr2 Anchr2 is the anchor point on body b.<br>
|
|
|
|
-- param stiffness It's the spring constant.<br>
|
|
|
|
-- param damping It's how soft to make the damping of the spring.<br>
|
|
|
|
-- return A object pointer.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#PhysicsJointSpring] construct
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.PhysicsBody a
|
|
|
|
-- @param #cc.PhysicsBody b
|
|
|
|
-- @param #vec2_table anchr1
|
|
|
|
-- @param #vec2_table anchr2
|
|
|
|
-- @param #float stiffness
|
|
|
|
-- @param #float damping
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring)
|
|
|
|
|
|
|
|
return nil
|