27class EXPCL_PANDA_PHYSICS
ForceNode :
public PandaNode {
29 explicit ForceNode(
const std::string &name);
31 INLINE
BaseForce *get_force(
size_t index)
const;
32 INLINE
size_t get_num_forces()
const;
33 MAKE_SEQ(get_forces, get_num_forces, get_force);
44 virtual void output(std::ostream &out)
const;
46 virtual void write(std::ostream &out,
int indent=0)
const;
57 typedef pvector< PT(
BaseForce) > ForceVector;
64 static void init_type() {
65 PandaNode::init_type();
67 PandaNode::get_class_type());
69 virtual TypeHandle get_type()
const {
70 return get_class_type();
72 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
75 static TypeHandle _type_handle;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pure virtual base class for all forces that could POSSIBLY exist.
A force that lives in the scene graph and is therefore subject to local coordinate systems.
virtual void output(std::ostream &out) const
Write a string representation of this instance to <out>.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...
insert_force
insert operation
ForceNode(const std::string &name)
default constructor
virtual void write_forces(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
set_force
replace operation
remove_force
remove operation
void add_forces_from(const ForceNode &other)
append operation
A basic node of the scene graph or data graph.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
TypeHandle is the identifier used to differentiate C++ class types.
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.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...