compile errors

This commit is contained in:
David Rose 2007-05-31 23:54:36 +00:00
parent 81b52e39c5
commit 0284746bc2
4 changed files with 9 additions and 17 deletions

View File

@ -242,11 +242,9 @@ make_child_dynamic(const string &name) {
// This may be called before binding the animation to a
// character to replace certain joints with
// frozen ones.
//
// Returns NULL if the named child cannot be found.
////////////////////////////////////////////////////////////////////
void AnimGroup::
void make_child_fixed(const string &name, const LMatrix4f &mat) {
make_child_fixed(const string &name, const LMatrix4f &mat) {
Children::iterator ci;
for (ci = _children.begin(); ci != _children.end(); ++ci) {
AnimGroup *child = (*ci);
@ -256,13 +254,13 @@ void make_child_fixed(const string &name, const LMatrix4f &mat) {
if (child->is_of_type(AnimChannelMatrix::get_class_type())) {
AnimChannelMatrix *mchild = DCAST(AnimChannelMatrix, child);
AnimChannelMatrixFixed *new_mchild =
new AnimChannelMatrixFixed(this, name, mat);
new AnimChannelMatrixFixed(name, mat);
new_child = new_mchild;
}
if (new_child != (AnimGroup *)NULL) {
new_child->_children.swap(child->_children);
nassertr(_children.back() == new_child, NULL);
nassertv(_children.back() == new_child);
// The new child was appended to the end of our children list
// by its constructor. Reposition it to replace the original
@ -291,19 +289,12 @@ void make_child_fixed(const string &name, const LMatrix4f &mat) {
}
new_children.swap(_children);
}
return new_child;
}
}
AnimGroup *result = child->make_child_fixed(name, mat);
if (result != (AnimGroup *)NULL) {
return result;
child->make_child_fixed(name, mat);
}
}
return (AnimGroup *)NULL;
}
////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,7 @@
#include "typedWritableReferenceCount.h"
#include "pointerTo.h"
#include "namable.h"
#include "luse.h"
class AnimBundle;
class BamReader;

View File

@ -209,12 +209,11 @@ get_control_effect(AnimControl *control) const {
////////////////////////////////////////////////////////////////////
// Function: PartBundle::freeze_joint
// Access: Protected
// Access: Published
// Description: stores away a joint freeze for bind time
////////////////////////////////////////////////////////////////////
INLINE void PartBundle::
freeze_joint(string jointName, LMatrix4f transform) const
{
freeze_joint(const string &jointName, const LMatrix4f &transform) {
JointTransform jt;
jt.name=jointName;
jt.transform=transform;

View File

@ -109,7 +109,8 @@ PUBLISHED:
INLINE int get_num_nodes() const;
INLINE PartBundleNode *get_node(int n) const;
INLINE void freeze_joint(string jointName, LMatrix4f transform) const;
INLINE void freeze_joint(const string &jointName,
const LMatrix4f &transform);
void clear_control_effects();
INLINE void set_control_effect(AnimControl *control, float effect);