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

Method GetValue

trinity/Curves/Tr2CurveVector3Expression.cpp:114–132  ·  view source on GitHub ↗

--------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

112
113// --------------------------------------------------------------------------------
114Vector3 Tr2CurveVector3Expression::GetValue( double time ) const
115{
116 Vector3 result( 0, 0, 0 );
117 float* components = &result.x;
118
119 m_arguments.m_time = float( time / m_timeScale );
120 auto self = this;
121 void* buffers[] = { (void*)&m_arguments, (void*)&self };
122
123 for( size_t i = 0; i < 3; ++i )
124 {
125 if( !m_programs[i] )
126 {
127 continue;
128 }
129 components[i] = m_programs[i].Eval( buffers, m_tempArena.get() );
130 }
131 return result;
132}
133
134// --------------------------------------------------------------------------------
135std::string Tr2CurveVector3Expression::GetExpression( size_t index ) const

Callers

nothing calls this directly

Calls 2

EvalMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected