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

Method PyGetQuaternionDotAt

trinity/TriPythonThunkers.cpp:297–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295
296
297PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionDotAt( PyObject* args )
298{
299 PyObject* t;
300 if( !PyArg_ParseTuple( args, "O", &t ) )
301 return NULL;
302
303 ITriQuaternionPtr q;
304 q.Attach( new OTriQuaternion );
305
306 if( PyLong_Check( t ) )
307 {
308 Quaternion tmpResult;
309 q->SetQuaternion( GetValueDotAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) );
310 }
311 else if( PyFloat_Check( t ) )
312 {
313 Quaternion tmpResult;
314 q->SetQuaternion( GetValueDotAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) );
315 }
316 else
317 {
318 BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" );
319 return nullptr;
320 }
321 return PyOS->WrapBlueObject( q );
322}
323
324
325PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionDoubleDotAt( PyObject* args )

Callers

nothing calls this directly

Calls 2

SetQuaternionMethod · 0.80
AttachMethod · 0.45

Tested by

no test coverage detected