14#ifndef PHYSICSMANAGER_H
15#define PHYSICSMANAGER_H
44 typedef pvector<Physical *> PhysicalsVector;
74 virtual void output(std::ostream &out)
const;
78 virtual void write(std::ostream &out,
int indent=0)
const;
83 friend class Physical;
87 PN_stdfloat _viscosity;
88 PhysicalsVector _physicals;
89 LinearForceVector _linear_forces;
90 AngularForceVector _angular_forces;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pure virtual parent of all quat-based forces.
Pure virtual base class for physical modeling.
This is a convenience class to specialize ConfigVariable as an integer type.
A force that acts on a PhysicsObject by way of an Integrator.
Pure virtual base class for physical modeling.
Graph node that encapsulated a series of physical objects.
PN_stdfloat get_viscosity() const
Get the global viscosity.
void do_physics(PN_stdfloat dt)
This is the main high-level API call.
void attach_linear_integrator(LinearIntegrator *i)
Hooks a linear integrator into the manager.
void clear_angular_forces()
Resets the physics manager force vector.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual void write_linear_forces(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void remove_physical_node(PhysicalNode *p)
Removes a physicalnode from the manager.
void clear_physicals()
Resets the physics manager objects vector.
virtual void write_angular_forces(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void clear_linear_forces()
Resets the physics manager force vector.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void attach_physicalnode(PhysicalNode *p)
Please call attach_physical_node instead.
void attach_physical(Physical *p)
Registers a Physical class with the manager.
void set_viscosity(PN_stdfloat viscosity)
Set the global viscosity.
void attach_angular_integrator(AngularIntegrator *i)
Hooks an angular integrator into the manager.
void remove_angular_force(AngularForce *f)
takes an angular force out of the physics list
void attach_physical_node(PhysicalNode *p)
Registers a physicalnode with the manager.
virtual void debug_output(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void init_random_seed()
One-time config function, sets up the random seed used by the physics and particle systems.
void remove_physical(Physical *p)
takes a physical out of the object list
PhysicsManager()
Default Constructor.
void add_linear_force(LinearForce *f)
Adds a global linear force to the physics manager.
void remove_linear_force(LinearForce *f)
takes a linear force out of the physics list
void add_angular_force(AngularForce *f)
Adds a global angular force to the physics manager.
virtual void write_physicals(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.