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

Method PyGetVectorDotAt

trinity/TriPythonThunkers.cpp:181–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181PyObject* ITriVectorFunction_Thunk::PyGetVectorDotAt( PyObject* args )
182{
183 PyObject* t;
184 if( !PyArg_ParseTuple( args, "O", &t ) )
185 return NULL;
186
187 ITriVectorPtr q;
188 q.Attach( new OTriVector );
189
190 if( PyLong_Check( t ) )
191 {
192 Vector3 tmpResult;
193 q->SetVector( GetValueDotAt( &tmpResult, Be::Time( PyLong_AsLongLong( t ) ) ) );
194 }
195 else if( PyFloat_Check( t ) )
196 {
197 Vector3 tmpResult;
198 q->SetVector( GetValueDotAt( &tmpResult, PyFloat_AS_DOUBLE( t ) ) );
199 }
200 else
201 {
202 BeOS->SetError( BEDEF, Clsid(), "arg must be of type LongLong (Be::Time) or float" );
203 return nullptr;
204 }
205 return PyOS->WrapBlueObject( q );
206}
207
208PyObject* ITriVectorFunction_Thunk::PyGetVectorDoubleDotAt( PyObject* args )
209{

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.45
SetVectorMethod · 0.45

Tested by

no test coverage detected