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);
36 void add_forces_from(
const ForceNode &other);
37 void set_force(
size_t index,
BaseForce *force);
38 void insert_force(
size_t index,
BaseForce *force);
40 void remove_force(
size_t index);
42 MAKE_SEQ_PROPERTY(forces, get_num_forces, get_force, set_force, remove_force, insert_force);
44 virtual void output(std::ostream &out)
const;
45 virtual void write_forces(std::ostream &out,
int indent=0)
const;
46 virtual void write(std::ostream &out,
int indent=0)
const;
64 static void init_type() {
65 PandaNode::init_type();
67 PandaNode::get_class_type());
70 return get_class_type();
72 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A basic node of the scene graph or data graph.
A force that lives in the scene graph and is therefore subject to local coordinate systems.
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 base class for all forces that could POSSIBLY exist.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
virtual PandaNode * make_copy() const
Returns a newly-allocated PandaNode that is a shallow copy of this one.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool safe_to_flatten() const
Returns true if it is generally safe to flatten out this particular kind of PandaNode by duplicating ...