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

Method Bind

trinity/Particle/Tr2ElementBlendConstraint.cpp:117–132  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Implements ITr2GenericParticleConstraint interface. Binds the constraint with the provided particle system. Looks up a particle element with the given type/name in the particle system. Arguments: system - Particle system that owns the constraint ------------------------------------------------------

Source from the content-addressed store, hash-verified

115// system - Particle system that owns the constraint
116// --------------------------------------------------------------------------------------
117void Tr2ElementBlendConstraint::Bind( Tr2ParticleSystem* system )
118{
119 m_isValid = false;
120
121 const Tr2ParticleElementDataMap& declaration = system->GetElementDeclaration();
122 auto i = declaration.find( m_name );
123 if( i == declaration.end() )
124 {
125 CCP_LOGERR( "Tr2BlendElementConstraint element \"%s\" not found in the particle system", m_name.GetName().c_str() );
126 }
127 else
128 {
129 m_element = i->second;
130 m_isValid = true;
131 }
132}

Callers

nothing calls this directly

Calls 2

endMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected