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

Method PyGetQuaternionAt

trinity/TriPythonThunkers.cpp:269–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267
268
269PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionAt( PyObject* args )
270{
271 PyObject* t;
272 if( !PyArg_ParseTuple( args, "O", &t ) )
273 return NULL;
274
275 ITriQuaternionPtr q;
276 q.Attach( new OTriQuaternion );
277
278 if( PyLong_Check( t ) )
279 {
280 Quaternion tmpResult;
281 q->SetQuaternion( GetValueAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) );
282 }
283 else if( PyFloat_Check( t ) )
284 {
285 Quaternion tmpResult;
286 q->SetQuaternion( GetValueAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) );
287 }
288 else
289 {
290 BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" );
291 return nullptr;
292 }
293 return PyOS->WrapBlueObject( q );
294}
295
296
297PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionDotAt( PyObject* args )

Callers

nothing calls this directly

Calls 2

SetQuaternionMethod · 0.80
AttachMethod · 0.45

Tested by

no test coverage detected