| 239 | ///////////////////////////////////////////////////////////////////////////////////////// |
| 240 | |
| 241 | PyObject* ITriQuaternionFunction_Thunk::PyUpdateQuaternion( PyObject* args ) |
| 242 | { |
| 243 | PyObject* t; |
| 244 | if( !PyArg_ParseTuple( args, "O", &t ) ) |
| 245 | return NULL; |
| 246 | |
| 247 | ITriQuaternionPtr q; |
| 248 | q.Attach( new OTriQuaternion ); |
| 249 | |
| 250 | if( PyLong_Check( t ) ) |
| 251 | { |
| 252 | Quaternion tmpResult; |
| 253 | q->SetQuaternion( Update( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) ); |
| 254 | } |
| 255 | else if( PyFloat_Check( t ) ) |
| 256 | { |
| 257 | Quaternion tmpResult; |
| 258 | q->SetQuaternion( Update( &tmpResult, PyFloat_AS_DOUBLE( t ) ) ); |
| 259 | } |
| 260 | else |
| 261 | { |
| 262 | BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" ); |
| 263 | return nullptr; |
| 264 | } |
| 265 | return PyOS->WrapBlueObject( q ); |
| 266 | } |
| 267 | |
| 268 | |
| 269 | PyObject* ITriQuaternionFunction_Thunk::PyGetQuaternionAt( PyObject* args ) |
nothing calls this directly
no test coverage detected