remove old hacks, expose PandaNode output() methods

This commit is contained in:
David Rose 2005-01-06 01:33:22 +00:00
parent bcb8f039d8
commit aafc570976
6 changed files with 3 additions and 40 deletions

View File

@ -108,19 +108,6 @@ transform_changed() {
_mass_center->set_position(transform->get_pos());
}
////////////////////////////////////////////////////////////////////
// Function : output
// Access : Public
// Description : Write a string representation of this instance to
// <out>.
////////////////////////////////////////////////////////////////////
void ActorNode::
output(ostream &out) const {
#ifndef NDEBUG //[
out<<"ActorNode";
#endif //] NDEBUG
}
////////////////////////////////////////////////////////////////////
// Function : write
// Access : Public

View File

@ -46,7 +46,6 @@ PUBLISHED:
// i.e. copy from PhysicsObject to PandaNode
void update_transform();
virtual void output(ostream &out) const;
virtual void write(ostream &out, unsigned int indent=0) const;
private:

View File

@ -116,10 +116,8 @@ remove_force(int index) {
////////////////////////////////////////////////////////////////////
void ForceNode::
output(ostream &out) const {
#ifndef NDEBUG //[
PandaNode::output(out);
out<<" ("<<_forces.size()<<" forces)";
#endif //] NDEBUG
}
////////////////////////////////////////////////////////////////////

View File

@ -108,19 +108,6 @@ remove_physical(int index) {
_physicals.erase(remove);
}
////////////////////////////////////////////////////////////////////
// Function : output
// Access : Public
// Description : Write a string representation of this instance to
// <out>.
////////////////////////////////////////////////////////////////////
void PhysicalNode::
output(ostream &out) const {
#ifndef NDEBUG //[
out<<"PhysicalNode";
#endif //] NDEBUG
}
////////////////////////////////////////////////////////////////////
// Function : write
// Access : Public

View File

@ -44,7 +44,6 @@ PUBLISHED:
void remove_physical(Physical *physical);
void remove_physical(int index);
virtual void output(ostream &out) const;
virtual void write(ostream &out, unsigned int indent=0) const;
public:

View File

@ -58,11 +58,7 @@ apply_friction(ColliderDef &def, LVector3f& vel, const LVector3f& force, float a
if (vel!=LVector3f::zero()) {
float friction_coefficient=0.0f;
// Determine the friction:
if (fabs(force.dot(LVector3f::unit_z()))<0.5f) {
// ...The force is nearly horizontal, it is probably a wall.
physics_debug(" wall friction");
friction_coefficient=0.0f;
} else if (vel.length()<_almost_stationary_speed) {
if (vel.length()<_almost_stationary_speed) {
physics_debug(" static friction");
friction_coefficient=_static_friction_coef;
} else {
@ -149,13 +145,10 @@ apply_net_shove(ColliderDef &def, const LVector3f& net_shove, const LVector3f &f
// This adjustment to our velocity will not reflect us off the surface,
// but will deflect us parallel (or tangent) to the surface:
if (normalize(net_shove).dot(LVector3f::unit_z())>0.5) {
vel=LVector3f::zero();
}
//vel+=adjustment;
vel+=adjustment;
physics_debug(" vel+adj "<<vel<<" len "<<vel.length());
//apply_friction(def, vel, force, angle);
apply_friction(def, vel, force, angle);
} else if (adjustmentLength==0.0f) {
physics_debug(" brushing contact");
} else {