44 explicit Physical(
int total_objects = 1,
bool pre_alloc =
false);
52 INLINE
NodePath get_physical_node_path()
const;
55 INLINE
void clear_linear_forces();
56 INLINE
void clear_angular_forces();
57 INLINE
void clear_physics_objects();
64 INLINE
int get_num_linear_forces()
const;
65 INLINE PT(
LinearForce) get_linear_force(
int index)
const;
66 MAKE_SEQ(get_linear_forces, get_num_linear_forces, get_linear_force);
67 MAKE_SEQ_PROPERTY(linear_forces, get_num_linear_forces, get_linear_force);
68 INLINE
int get_num_angular_forces()
const;
69 INLINE PT(
AngularForce) get_angular_force(
int index)
const;
70 MAKE_SEQ(get_angular_forces, get_num_angular_forces, get_angular_force);
71 MAKE_SEQ_PROPERTY(angular_forces, get_num_angular_forces, get_angular_force);
73 INLINE
void set_viscosity(PN_stdfloat viscosity);
74 INLINE PN_stdfloat get_viscosity()
const;
75 MAKE_PROPERTY(viscosity, get_viscosity);
78 MAKE_PROPERTY(objects, get_objects);
80 virtual void output(std::ostream &out = std::cout)
const;
81 virtual void write_physics_objects(
82 std::ostream &out = std::cout,
int indent=0)
const;
83 virtual void write_linear_forces(
84 std::ostream &out = std::cout,
int indent=0)
const;
85 virtual void write_angular_forces(
86 std::ostream &out = std::cout,
int indent=0)
const;
87 virtual void write(std::ostream &out = std::cout,
int indent=0)
const;
98 PN_stdfloat _viscosity;
119 static void init_type() {
120 TypedReferenceCount::init_type();
122 TypedReferenceCount::get_class_type());
125 return get_class_type();
127 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pure virtual parent of all quat-based forces.
A force that acts on a PhysicsObject by way of an Integrator.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Graph node that encapsulated a series of physical objects.
Defines a set of physically modeled attributes.
Physics don't get much higher-level than this.
This is a set of zero or more PhysicsObjects.
A body on which physics will be applied.
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is our own Panda specialization on the default STL vector.
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.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.