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

Method PyGetQuaternionDoubleDotAt

trinity/TriPythonThunkers.cpp:325–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324
325PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionDoubleDotAt( PyObject* args )
326{
327 PyObject* t;
328 if( !PyArg_ParseTuple( args, "O", &t ) )
329 return NULL;
330
331 ITriQuaternionPtr q;
332 q.Attach( new OTriQuaternion );
333
334 if( PyLong_Check( t ) )
335 {
336 Quaternion tmpResult;
337 q->SetQuaternion( GetValueDoubleDotAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) );
338 }
339 else if( PyFloat_Check( t ) )
340 {
341 Quaternion tmpResult;
342 q->SetQuaternion( GetValueDoubleDotAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) );
343 }
344 else
345 {
346 BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" );
347 return nullptr;
348 }
349 return PyOS->WrapBlueObject( q );
350}
351
352
353

Callers

nothing calls this directly

Calls 2

SetQuaternionMethod · 0.80
AttachMethod · 0.45

Tested by

no test coverage detected