--------------------------------------------------------------------------------
| 112 | |
| 113 | // -------------------------------------------------------------------------------- |
| 114 | Vector3 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 | // -------------------------------------------------------------------------------- |
| 135 | std::string Tr2CurveVector3Expression::GetExpression( size_t index ) const |