|
@@ -75,6 +75,21 @@ add_forces_from(const ForceNode &other) {
|
|
|
(*last)->_force_node = this;
|
|
(*last)->_force_node = this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+// Function : remove_force
|
|
|
|
|
+// Access : public
|
|
|
|
|
+// Description : remove operation
|
|
|
|
|
+////////////////////////////////////////////////////////////////////
|
|
|
|
|
+void ForceNode::
|
|
|
|
|
+remove_force(BaseForce *f) {
|
|
|
|
|
+ vector< PT(BaseForce) >::iterator found;
|
|
|
|
|
+ PT(BaseForce) ptbf = f;
|
|
|
|
|
+ found = find(_forces.begin(), _forces.end(), ptbf);
|
|
|
|
|
+ if (found == _forces.end())
|
|
|
|
|
+ return;
|
|
|
|
|
+ _forces.erase(found);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function : remove_force
|
|
// Function : remove_force
|
|
|
// Access : public
|
|
// Access : public
|