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

Method PyGetVectorAt

trinity/TriPythonThunkers.cpp:154–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152
153
154PyObject* 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
181PyObject* ITriVectorFunction_Thunk::PyGetVectorDotAt( PyObject* args )
182{

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.45
SetVectorMethod · 0.45

Tested by

no test coverage detected