small optimizations to PandaNode etc.
This commit is contained in:
parent
c52f7d6427
commit
aa3c504345
|
|
@ -146,10 +146,7 @@ PandaNode(const PandaNode ©) :
|
|||
if (cdata->_transform != cdata->_prev_transform) {
|
||||
set_dirty_prev_transform();
|
||||
}
|
||||
}
|
||||
{
|
||||
CDReader copy_cdata(copy._cycler);
|
||||
CDWriter cdata(_cycler, true);
|
||||
|
||||
cdata->_effects = copy_cdata->_effects;
|
||||
cdata->_tag_data = copy_cdata->_tag_data;
|
||||
cdata->_draw_control_mask = copy_cdata->_draw_control_mask;
|
||||
|
|
@ -3611,29 +3608,30 @@ fillin_recorder(DatagramIterator &scan, BamReader *) {
|
|||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PandaNode::CData::
|
||||
CData() {
|
||||
_state = RenderState::make_empty();
|
||||
_transform = TransformState::make_identity();
|
||||
_prev_transform = TransformState::make_identity();
|
||||
CData() :
|
||||
_state(RenderState::make_empty()),
|
||||
_transform(TransformState::make_identity()),
|
||||
_prev_transform(TransformState::make_identity()),
|
||||
|
||||
_effects = RenderEffects::make_empty();
|
||||
_draw_control_mask = DrawMask::all_off();
|
||||
_draw_show_mask = DrawMask::all_on();
|
||||
_into_collide_mask = CollideMask::all_off();
|
||||
_user_bounds = NULL;
|
||||
_internal_bounds = NULL;
|
||||
_internal_bounds_stale = true;
|
||||
_final_bounds = false;
|
||||
_fancy_bits = 0;
|
||||
_effects(RenderEffects::make_empty()),
|
||||
_draw_control_mask(DrawMask::all_off()),
|
||||
_draw_show_mask(DrawMask::all_on()),
|
||||
_into_collide_mask(CollideMask::all_off()),
|
||||
_user_bounds(NULL),
|
||||
_internal_bounds(NULL),
|
||||
_internal_bounds_stale(true),
|
||||
_final_bounds(false),
|
||||
_fancy_bits(0),
|
||||
|
||||
_net_collide_mask = CollideMask::all_off();
|
||||
_net_draw_control_mask = DrawMask::all_off();
|
||||
_net_draw_show_mask = DrawMask::all_off();
|
||||
_net_collide_mask(CollideMask::all_off()),
|
||||
_net_draw_control_mask(DrawMask::all_off()),
|
||||
_net_draw_show_mask(DrawMask::all_off()),
|
||||
|
||||
_down(new PandaNode::Down(PandaNode::get_class_type())),
|
||||
_stashed(new PandaNode::Down(PandaNode::get_class_type())),
|
||||
_up(new PandaNode::Up(PandaNode::get_class_type()))
|
||||
{
|
||||
++_next_update;
|
||||
|
||||
_down = new PandaNode::Down(PandaNode::get_class_type());
|
||||
_stashed = new PandaNode::Down(PandaNode::get_class_type());
|
||||
_up = new PandaNode::Up(PandaNode::get_class_type());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public:
|
|||
INLINE CopyOnWriteObj();
|
||||
INLINE CopyOnWriteObj(const Base ©);
|
||||
INLINE CopyOnWriteObj(const CopyOnWriteObj<Base> ©);
|
||||
ALLOC_DELETED_CHAIN(CopyOnWriteObj<Base>);
|
||||
|
||||
protected:
|
||||
virtual PT(CopyOnWriteObject) make_cow_copy();
|
||||
|
|
@ -129,6 +130,9 @@ public:
|
|||
INLINE CopyOnWriteObj1(const Base ©);
|
||||
INLINE CopyOnWriteObj1(const CopyOnWriteObj1<Base, Param1> ©);
|
||||
|
||||
typedef CopyOnWriteObj1<Base, Param1> ThisClass;
|
||||
ALLOC_DELETED_CHAIN(ThisClass)
|
||||
|
||||
protected:
|
||||
virtual PT(CopyOnWriteObject) make_cow_copy();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue