Maciej Ciemborowicz <[email protected]> writes:

> Hello,
>
> I have a class (Car) which
> extends|osg::PositionAttitudeTransform|. Now I want to create camera
> which has the same position. So I get car's matrix in Camera's
> getMatrix() method:
>
> |matrix=  car->asMatrixTransform()->getMatrix(); // osg::Matrixd* matrix|
>
> At this point I get stack overflow. This is call stack from debugger:
>
> osg::Matrixd::set (this=0x64da90, ptr=0xd8)
> osg::Matrixd::Matrixd (this=0x64da90, mat=@0xd8: <error reading variable>)
> Camera::update (this=0x64d970)
> Camera::Camera (this=0x64d970, car=0x64b270)
> main (argc=1, argv=0x7fffffffe5d8)
>
> What am I doing wrong? How can I get matrix from PAT in different way?

Does asMatrixTransform return a non-NULL pointer?
PositionAttidudeTransform does not inherit from MatrixTransform so that
should not work.

HTH,
Philipp Moeller
GeometryFactory
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to