14 #ifndef LINEARDISTANCEFORCE_H 15 #define LINEARDISTANCEFORCE_H 28 FT_ONE_OVER_R_SQUARED,
32 INLINE
void set_radius(PN_stdfloat r);
33 INLINE
void set_falloff_type(FalloffType ft);
34 INLINE
void set_force_center(
const LPoint3& p);
36 INLINE PN_stdfloat get_radius()
const;
37 INLINE FalloffType get_falloff_type()
const;
38 INLINE LPoint3 get_force_center()
const;
40 INLINE PN_stdfloat get_scalar_term()
const;
42 virtual void output(std::ostream &out)
const;
43 virtual void write(std::ostream &out,
int indent=0)
const;
46 LPoint3 _force_center;
52 virtual LVector3 get_child_vector(
const PhysicsObject *po) = 0;
64 static void init_type() {
65 LinearForce::init_type();
67 LinearForce::get_class_type());
70 return get_class_type();
72 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
80 #endif // LINEARDISTANCEFORCE_H This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
A body on which physics will be applied.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Pure virtual class for sinks and sources.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A force that acts on a PhysicsObject by way of an Integrator.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
TypeHandle is the identifier used to differentiate C++ class types.