pfSCS transformation Matrix Question

New Message Reply Date view Thread view Subject view Author view

John D. Jamulla (jjamulla++at++concentric.net)
Fri, 24 Dec 1999 12:22:58 -0500


I am trying to "transform" a pfGeoSet made with pfdNewArrow() up the Z-axis by some amount, lets say 5 units.

I have examined the matrix created, and for some reason I get the Identity 4x4 matrix when created below, but "weird" values
in the 4th row if I mess with the X, Y, Z values. All the docs I see seem to show me I am doing this correctly.

I am running this on Linux. I am assuming that the byte-swapped nature of a PC has nothing to do with this, but I'm not sure.
The program is a modification of hello.C using a scene graph and nothing fancy.

Here's the relevant parts of the code. If someone could tell me what I'm doing wrong, I'd appreciate it.
    pfMatrix z_trans_mat;
    pfMakeTransMat(&z_trans_mat, 0.0f, 0.0f, 5.0f);
    pfSCS *zaxise = new pfSCS(z_trans_mat);

    void *arena = pfGetSharedArena();
    pfVec4 *bluec = new pfVec4;
    bluec->set(0.0f, 0.0f, 1.0f, 1.0f);
    pfGeoSet *gset_zarrow = pfdNewArrow(10, arena);
    gset_zarrow->setAttr(PFGS_COLOR4, PFGS_OVERALL, bluec, NULL);

    pfGeode *geode_gset_zarrow = new pfGeode;
    geode_gset_zarrow->addGSet(gset_zarrow);

    zaxise->addChild(geode_gset_zarrow);
    pfScene *scene = new pfScene;

...

    scene->addChild((pfNode *) zaxise);

....

// CODE THE CALLS pfFrame()
...
// end of program

Thanks in Advance


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Dec 24 1999 - 09:23:07 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.