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

Method PyUpdateVector

trinity/TriPythonThunkers.cpp:126–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126PyObject* 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
154PyObject* ITriVectorFunction_Thunk::PyGetVectorAt( PyObject* args )

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.45
SetVectorMethod · 0.45

Tested by

no test coverage detected