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

Method PyGetVectorDoubleDotAt

trinity/TriPythonThunkers.cpp:208–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208PyObject* 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

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.45
SetVectorMethod · 0.45

Tested by

no test coverage detected