28 _contact_vector = LVector3::zero();
30 _mass_center = get_physical(0)->get_phys_body();
33 _mass_center->set_name(name);
35 _ok_to_callback =
true;
36 _transform_limit = 0.0;
45 _contact_vector = LVector3::zero();
46 _ok_to_callback =
true;
47 _mass_center = get_physical(0)->get_phys_body();
48 _transform_limit = copy._transform_limit;
64 LMatrix4 lcs = _mass_center->
get_lcs();
67 _ok_to_callback =
false;
69 _ok_to_callback =
true;
80 nassertv(pos[0] < _transform_limit);
81 nassertv(pos[0] > -_transform_limit);
82 nassertv(pos[1] < _transform_limit);
83 nassertv(pos[1] > -_transform_limit);
84 nassertv(pos[2] < _transform_limit);
85 nassertv(pos[2] > -_transform_limit);
95 PandaNode::transform_changed();
98 if (!_ok_to_callback) {
105 if (_transform_limit > 0.0) {
106 test_transform(transform);
111 _mass_center->set_orientation(transform->
get_quat());
125 out.width(
indent); out<<
""; out<<
"ActorNode:\n";
126 out.width(
indent+2); out<<
""; out<<
"_ok_to_callback "<<_ok_to_callback<<
"\n";
127 out.width(
indent+2); out<<
""; out<<
"_mass_center\n";
void set_position(const LPoint3 &pos)
Vector position assignment.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
void update_transform()
this sets the transform generated by the contained Physical, moving the node and subsequent geometry.
virtual void write(std::ostream &out, int indent=0) const
Write a string representation of this instance to <out>.
bool get_oriented() const
See set_oriented().
set_transform
Sets the transform that will be applied to this node and below.
Graph node that encapsulated a series of physical objects.
virtual ~ActorNode()
destructor
void set_active(bool flag)
Process Flag assignment.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
Defines a set of physically modeled attributes.
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>.
ActorNode(const std::string &name="")
Constructor.
TypeHandle is the identifier used to differentiate C++ class types.
Like a physical node, but with a little more.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual LMatrix4 get_lcs() const
returns a transform matrix to this object's local coordinate system.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.