mConstraints.Clear();
}
+void PropertyOwner::ConnectToSceneGraph()
+{
+ // Notification for observers
+ const ConstObserverIter endIter = mObservers.End();
+ for( ConstObserverIter iter = mObservers.Begin(); iter != endIter; ++iter)
+ {
+ (*iter)->PropertyOwnerConnected( *this );
+ }
+}
+
void PropertyOwner::DisconnectFromSceneGraph( BufferIndex updateBufferIndex )
{
// Notification for observers
(*iter)->PropertyOwnerDisconnected( updateBufferIndex, *this );
}
- // Clear observers as they are not interested in destroyed if they have received a disconnect
- mObservers.Clear();
-
// Remove all constraints when disconnected from scene-graph
mConstraints.Clear();
}
(*iter)->ResetToBaseValue( updateBufferIndex );
}
- // Reset constraint weights
- const ConstraintIter constraintEndIter = mConstraints.End();
- for( ConstraintIter iter = mConstraints.Begin(); constraintEndIter != iter; ++iter )
- {
- (*iter)->mWeight.ResetToBaseValue( updateBufferIndex );
- }
-
// Notification for derived classes, to reset default properties
ResetDefaultProperties( updateBufferIndex );
}
void PropertyOwner::RemoveConstraint( ConstraintBase* constraint )
{
- // Reset constraint weights
const ConstraintIter constraintEndIter = mConstraints.End();
for( ConstraintIter iter = mConstraints.Begin(); constraintEndIter != iter; ++iter )
{