| 124 | |
| 125 | |
| 126 | PyObject* ITriVectorFunction_Thunk::PyUpdateVector( PyObject* args ) |
| 127 | { |
| 128 | PyObject* t; |
| 129 | if( !PyArg_ParseTuple( args, "O", &t ) ) |
| 130 | return NULL; |
| 131 | |
| 132 | ITriVectorPtr q; |
| 133 | q.Attach( new OTriVector ); |
| 134 | |
| 135 | if( PyLong_Check( t ) ) |
| 136 | { |
| 137 | Vector3 tmpResult; |
| 138 | q->SetVector( GetValueAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) ); |
| 139 | } |
| 140 | else if( PyFloat_Check( t ) ) |
| 141 | { |
| 142 | Vector3 tmpResult; |
| 143 | q->SetVector( GetValueAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) ); |
| 144 | } |
| 145 | else |
| 146 | { |
| 147 | BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" ); |
| 148 | return nullptr; |
| 149 | } |
| 150 | return PyOS->WrapBlueObject( q ); |
| 151 | } |
| 152 | |
| 153 | |
| 154 | PyObject* ITriVectorFunction_Thunk::PyGetVectorAt( PyObject* args ) |