chan: disable AnimControl copy ctor and assignment operators

This commit is contained in:
rdb 2018-10-17 19:43:41 +02:00
parent 775e4cecff
commit eac88fc64a
2 changed files with 5 additions and 3 deletions

View File

@ -32,14 +32,14 @@ AnimControl(const std::string &name, PartBundle *part,
Namable(name),
_pending_lock(name),
_pending_cvar(_pending_lock),
_bound_joints(BitArray::all_on())
_bound_joints(BitArray::all_on()),
_part(part)
{
#ifdef DO_MEMORY_USAGE
MemoryUsage::update_type(this, get_class_type());
#endif
_pending = true;
_part = part;
_anim = nullptr;
_channel_index = -1;
set_frame_rate(frame_rate);

View File

@ -39,6 +39,8 @@ class EXPCL_PANDA_CHAN AnimControl : public TypedReferenceCount, public AnimInte
public:
AnimControl(const std::string &name, PartBundle *part,
double frame_rate, int num_frames);
AnimControl(const AnimControl &copy) = delete;
void setup_anim(PartBundle *part, AnimBundle *anim, int channel_index,
const BitArray &bound_joints);
void set_bound_joints(const BitArray &bound_joints);
@ -82,7 +84,7 @@ private:
// This is a PT(PartGroup) instead of a PT(PartBundle), just because we
// can't include partBundle.h for circular reasons. But it actually keeps a
// pointer to a PartBundle.
PT(PartGroup) _part;
const PT(PartGroup) _part;
PT(AnimBundle) _anim;
int _channel_index;