| 152 | |
| 153 | |
| 154 | PyObject* ITriVectorFunction_Thunk::PyGetVectorAt( PyObject* args ) |
| 155 | { |
| 156 | PyObject* t; |
| 157 | if( !PyArg_ParseTuple( args, "O", &t ) ) |
| 158 | return NULL; |
| 159 | |
| 160 | ITriVectorPtr q; |
| 161 | q.Attach( new OTriVector ); |
| 162 | |
| 163 | if( PyLong_Check( t ) ) |
| 164 | { |
| 165 | Vector3 tmpResult( 0, 0, 0 ); |
| 166 | q->SetVector( GetValueAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) ); |
| 167 | } |
| 168 | else if( PyFloat_Check( t ) ) |
| 169 | { |
| 170 | Vector3 tmpResult( 0, 0, 0 ); |
| 171 | q->SetVector( GetValueAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) ); |
| 172 | } |
| 173 | else |
| 174 | { |
| 175 | BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" ); |
| 176 | return nullptr; |
| 177 | } |
| 178 | return PyOS->WrapBlueObject( q ); |
| 179 | } |
| 180 | |
| 181 | PyObject* ITriVectorFunction_Thunk::PyGetVectorDotAt( PyObject* args ) |
| 182 | { |