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

Method Eval

trinity/Controllers/Tr2ControllerExpression.cpp:565–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565std::pair<bool, float> Tr2ControllerExpression::Eval( void* extraBuffer ) const
566{
567 if( !m_controller || !m_program )
568 {
569 return std::make_pair( false, 0.f );
570 }
571 auto owner = m_controller->GetOwner();
572 void* externals[] = { m_controller->GetVariableBuffer(), &owner, (void*)&m_stateMachine, extraBuffer };
573 float result = m_program.Eval( externals, m_controller->GetTempArena() );
574 return std::make_pair( true, result );
575}
576
577void Tr2ControllerExpression::Clear()
578{

Callers 15

CanActivateMethod · 0.80
EvaluateExpressionMethod · 0.80
UpdateMethod · 0.80
EvaluateExpressionMethod · 0.80
StartMethod · 0.80
EvaluateExpressionMethod · 0.80
UpdateMethod · 0.80
EvaluateExpressionMethod · 0.80
UpdateMethod · 0.80
EvaluateExpressionMethod · 0.80
GetValueMethod · 0.80
EvaluateExpressionMethod · 0.80

Calls 3

GetOwnerMethod · 0.45
GetVariableBufferMethod · 0.45
GetTempArenaMethod · 0.45

Tested by

no test coverage detected