| 206 | } |
| 207 | |
| 208 | PyObject* ITriVectorFunction_Thunk::PyGetVectorDoubleDotAt( PyObject* args ) |
| 209 | { |
| 210 | PyObject* t; |
| 211 | if( !PyArg_ParseTuple( args, "O", &t ) ) |
| 212 | return NULL; |
| 213 | |
| 214 | ITriVectorPtr q; |
| 215 | q.Attach( new OTriVector ); |
| 216 | |
| 217 | if( PyLong_Check( t ) ) |
| 218 | { |
| 219 | Vector3 tmpResult; |
| 220 | q->SetVector( GetValueDoubleDotAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) ); |
| 221 | } |
| 222 | else if( PyFloat_Check( t ) ) |
| 223 | { |
| 224 | Vector3 tmpResult; |
| 225 | q->SetVector( GetValueDoubleDotAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) ); |
| 226 | } |
| 227 | else |
| 228 | { |
| 229 | BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" ); |
| 230 | return nullptr; |
| 231 | } |
| 232 | return PyOS->WrapBlueObject( q ); |
| 233 | } |
| 234 | |
| 235 | |
| 236 | |