Browse Source

syntax and documentation

Josh Wilson 19 years ago
parent
commit
2df88fd9de
2 changed files with 25 additions and 8 deletions
  1. 19 2
      panda/src/ode/odeJoint.cxx
  2. 6 6
      panda/src/ode/odeJoint.h

+ 19 - 2
panda/src/ode/odeJoint.cxx

@@ -37,14 +37,31 @@ destroy() {
   dJointDestroy(_id);
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: OdeJoint::attach_bodies
+//       Access: Published
+//  Description: Attaches two OdeBody objects to this joint.
+//               Order is important.
+//               Consider using the OdeJoint::attach extension
+//               function if you're using the Python interface.
+////////////////////////////////////////////////////////////////////
 void OdeJoint::
-attachBodies(const OdeBody &body1, const OdeBody &body2) {
+attach_bodies(const OdeBody &body1, const OdeBody &body2) {
   nassertv(body1.get_id() != 0 && body2.get_id() != 0);
   dJointAttach(_id, body1.get_id(), body2.get_id());
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: OdeJoint::attach_body
+//       Access: Published
+//  Description: Attaches a single OdeBody to this joint at the
+//               specified index.  The other index will be set to the
+//               environment (null).
+//               Consider using the OdeJoint::attach extension
+//               function if you're using the Python interface.
+////////////////////////////////////////////////////////////////////
 void OdeJoint::
-attachBody(const OdeBody &body, int index) {
+attach_body(const OdeBody &body, int index) {
   nassertv(body.get_id() != 0);
   if (index == 0) {
     dJointAttach(_id, body.get_id(), 0);

+ 6 - 6
panda/src/ode/odeJoint.h

@@ -46,15 +46,15 @@ PUBLISHED:
   virtual ~OdeJoint();
   void destroy();
   
-  // INLINE void set_data(void *data);
-  // INLINE void *get_data();
+  /* INLINE void set_data(void *data); */
+  /* INLINE void *get_data(); */
   INLINE int get_joint_type() const;
   OdeBody get_body(int index) const;
-  // INLINE void set_feedback(dJointFeedback *);
-  // INLINE dJointFeedback *get_feedback();
+  /* INLINE void set_feedback(dJointFeedback *); */
+  /* INLINE dJointFeedback *get_feedback(); */
    
-  void attachBodies(const OdeBody &body1, const OdeBody &body2);
-  void attachBody(const OdeBody &body, int index);
+  void attach_bodies(const OdeBody &body1, const OdeBody &body2);
+  void attach_body(const OdeBody &body, int index);
   void detach();
 
   virtual void write(ostream &out = cout, unsigned int indent=0) const;