MCPcopy Create free account
hub / github.com/carbonengine/trinity / OnListModified

Method OnListModified

trinity/Particle/Tr2ParticleSystem.cpp:220–243  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Implements IListNotify interface. Binds added particle constraints to the system. Arguments: event - List event type key - First element index (unused) key2 - Second element index (unused) value - Element value theList - The list being modified Return Value: true always -----------------------------

Source from the content-addressed store, hash-verified

218// true always
219// --------------------------------------------------------------------------------------
220void Tr2ParticleSystem::OnListModified(
221 long event,
222 ssize_t key,
223 ssize_t key2,
224 IRoot* value,
225 const IList* theList )
226{
227 if( theList == &m_constraints )
228 {
229 // Bind added constaint to this system
230 if( ( event & BELIST_EVENTMASK ) == BELIST_INSERTED )
231 {
232 if( value )
233 {
234 ITr2GenericParticleConstraint* constraint = NULL;
235 if( value->QueryInterface( BlueInterfaceIID<ITr2GenericParticleConstraint>(), (void**)&constraint ) )
236 {
237 constraint->Bind( this );
238 constraint->Unlock();
239 }
240 }
241 }
242 }
243}
244
245// --------------------------------------------------------------------------------------
246// Description:

Callers

nothing calls this directly

Calls 3

QueryInterfaceMethod · 0.80
BindMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected