Hi Robin.

Robin Steinke wrote:
> Matrix oldPos;
>
> oldPos = dot1->getToWorld();
>
> where dot1 is declared as NodePtr dot1 = makeSphere(3,.5); and is a 
> Child Node. What i get is a memory violation. Am i on the right way, or 
> did i get it totaly wrong?
>   
I fear that my quick'n'dirty ICQ-Help wasn't that helpful. So here we go 
again with some more details:

Example:

    NodePtr torus = makeTorus(.5, 2, 16, 16);
   
    ComponentTransformPtr trans1=ComponentTransform::create();
    beginEditCP(trans1);
        trans1->setTranslation(Vec3f(5,3,0));
    endEditCP(trans1);
       
    NodePtr scene=Node::create();
    beginEditCP(scene);
        scene->setCore(trans1);
        scene->addChild(torus);
    endEditCP(scene);

    Matrix m=torus->getToWorld();
    cout<<m<<endl;

Output is (as expected):

[EMAIL PROTECTED]:~$ ./01hello
   1.000    0.000    0.000    5.000
   0.000    1.000    0.000    3.000
   0.000    0.000    1.000    0.000
   0.000    0.000    0.000    1.000

But, regarding the segfault, I think your error is somewhere else.

I send you the modified 01hello tutorial off the list.

Regards,
Dominik



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to