Re: [PyOpenGL-Users] How to call glMultMatrix passing an instance of KFbxXMatrix?
Brought to you by:
mcfletch
From: Ian M. <geo...@gm...> - 2011-09-12 14:47:54
|
On Sun, Sep 11, 2011 at 5:49 PM, Mark Laff <mar...@pe...>wrote: > ** > Newb to both Python and OpenGL, so this may be a trivial question. > > I have C > C++ > sample code which looks like: > > void GlDrawCrossHair(KFbxXMatrix& pGlobalPosition) > { > glColor3f(1.0, 1.0, 1.0); > glLineWidth(1.0); > > glPushMatrix(); > glMultMatrixd((double*) pGlobalPosition); > ... > > but when I try to write, in Python: > > > def DrawCrosshair(pGlobalPosition): > glColor3f(1.0,1.0,1.0) > glLineWidth(1.0) > > glPushMatrix() > glMultMatrixd(pGlobalPosition) > > In your C++ code, class KFbxXMatrix probably has some specified way to convert to an array of type double. You'll need to do whatever the equivalent is in Python; i.e., glMultMatrixd(*pGlobalPosition.getArray()) or whatever. Ian |