8 Mar
2002
8 Mar
'02
3:14 p.m.
I am having great trouble with boost python whenever I do anything slightly more compilcated than the examples. I have a wrapped a Vector3 class with 3 floats x,y,z. In python: a=m2.Vector3(1,2,3) a.x 1.0 a.x=100 a.x 100.0 This is correct - ie I can disply and modify a.x Unfortunatedly if wrap another class - Camera which contains a member variable : Vector3 pos then I cannot set camera.pos.x Looking in the debugger, I seem to be getting a copy (in fact sometime 3 or more copy constructors are called) of pos and I am modifying this temporary copy! Help. Surely I can wrap no pointer member variables? Regards, Andrew