mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-16 17:31:28 -04:00
un-inline set_transition/clear_transition. they dont need to be since they call heavyweight operations, and have cross-DLL STL problems
This commit is contained in:
parent
0b8e32771e
commit
c2784ecff8
@ -160,37 +160,6 @@ set_graph_type(TypeHandle graph_type) {
|
||||
attach();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::set_transition
|
||||
// Access: Public
|
||||
// Description: This flavor of set_transition() accepts a specific
|
||||
// TypeHandle, indicating the type of transition that we
|
||||
// are setting, and a NodeTransition pointer indicating
|
||||
// the value of the transition. The NodeTransition may
|
||||
// be NULL indicating that the transition should be
|
||||
// cleared. If the NodeTransition is not NULL, it must
|
||||
// match the type indicated by the TypeHandle.
|
||||
//
|
||||
// The return value is a pointer to the *previous*
|
||||
// transition in the set, if any, or NULL if there was
|
||||
// none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PT(NodeTransition) NodeRelation::
|
||||
set_transition(TypeHandle handle, NodeTransition *trans) {
|
||||
PT(NodeTransition) old_trans =
|
||||
_transitions.set_transition(handle, trans);
|
||||
|
||||
if (old_trans != (NodeTransition *)NULL) {
|
||||
old_trans->removed_from_arc(this);
|
||||
}
|
||||
if (trans != (NodeTransition *)NULL) {
|
||||
trans->added_to_arc(this);
|
||||
}
|
||||
|
||||
changed_transition(handle);
|
||||
return old_trans;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::set_transition
|
||||
// Access: Public
|
||||
@ -229,28 +198,6 @@ set_transition(NodeTransition *trans, int priority) {
|
||||
return set_transition(trans->get_handle(), trans);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::clear_transition
|
||||
// Access: Public
|
||||
// Description: Removes any transition associated with the indicated
|
||||
// handle from the arc.
|
||||
//
|
||||
// The return value is a pointer to the previous
|
||||
// transition in the set, if any, or NULL if there was
|
||||
// none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE PT(NodeTransition) NodeRelation::
|
||||
clear_transition(TypeHandle handle) {
|
||||
PT(NodeTransition) old_trans =
|
||||
_transitions.clear_transition(handle);
|
||||
if (old_trans != (NodeTransition *)NULL) {
|
||||
old_trans->removed_from_arc(this);
|
||||
}
|
||||
|
||||
changed_transition(handle);
|
||||
return old_trans;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::has_transition
|
||||
// Access: Public
|
||||
|
@ -1019,3 +1019,57 @@ force_init_type() {
|
||||
init_type();
|
||||
return get_class_type();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::set_transition
|
||||
// Access: Public
|
||||
// Description: This flavor of set_transition() accepts a specific
|
||||
// TypeHandle, indicating the type of transition that we
|
||||
// are setting, and a NodeTransition pointer indicating
|
||||
// the value of the transition. The NodeTransition may
|
||||
// be NULL indicating that the transition should be
|
||||
// cleared. If the NodeTransition is not NULL, it must
|
||||
// match the type indicated by the TypeHandle.
|
||||
//
|
||||
// The return value is a pointer to the *previous*
|
||||
// transition in the set, if any, or NULL if there was
|
||||
// none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(NodeTransition) NodeRelation::
|
||||
set_transition(TypeHandle handle, NodeTransition *trans) {
|
||||
PT(NodeTransition) old_trans =
|
||||
_transitions.set_transition(handle, trans);
|
||||
|
||||
if (old_trans != (NodeTransition *)NULL) {
|
||||
old_trans->removed_from_arc(this);
|
||||
}
|
||||
if (trans != (NodeTransition *)NULL) {
|
||||
trans->added_to_arc(this);
|
||||
}
|
||||
|
||||
changed_transition(handle);
|
||||
return old_trans;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: NodeRelation::clear_transition
|
||||
// Access: Public
|
||||
// Description: Removes any transition associated with the indicated
|
||||
// handle from the arc.
|
||||
//
|
||||
// The return value is a pointer to the previous
|
||||
// transition in the set, if any, or NULL if there was
|
||||
// none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
PT(NodeTransition) NodeRelation::
|
||||
clear_transition(TypeHandle handle) {
|
||||
PT(NodeTransition) old_trans =
|
||||
_transitions.clear_transition(handle);
|
||||
if (old_trans != (NodeTransition *)NULL) {
|
||||
old_trans->removed_from_arc(this);
|
||||
}
|
||||
|
||||
changed_transition(handle);
|
||||
return old_trans;
|
||||
}
|
||||
|
||||
|
@ -88,11 +88,11 @@ PUBLISHED:
|
||||
INLINE void set_sort(int sort);
|
||||
INLINE void set_graph_type(TypeHandle graph_type);
|
||||
|
||||
INLINE PT(NodeTransition) set_transition(TypeHandle handle,
|
||||
NodeTransition *trans);
|
||||
PT(NodeTransition) set_transition(TypeHandle handle, NodeTransition *trans); /*DONT INLINE THIS*/
|
||||
INLINE PT(NodeTransition) set_transition(NodeTransition *trans);
|
||||
INLINE PT(NodeTransition) set_transition(NodeTransition *trans, int priority);
|
||||
INLINE PT(NodeTransition) clear_transition(TypeHandle handle);
|
||||
PT(NodeTransition) clear_transition(TypeHandle handle); /*DONT INLINE THIS*/
|
||||
|
||||
INLINE bool has_transition(TypeHandle handle) const;
|
||||
INLINE bool has_any_transition() const;
|
||||
INLINE NodeTransition *get_transition(TypeHandle handle) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user