problem with pfMatrix

New Message Reply Date view Thread view Subject view Author view

Torbjörn Håkansso (torbjorn.hakansson++at++telia.com)
Sun, 30 May 1999 21:42:14 +0200


Hi all pf Users
  
I have a problem with pfMatrix, I wonder why the Matrix's value don't change when I rotate or translate the parent pfDCS, the parent pfDCS is moved by input data from a sensor in a Flock of Birds, the child in my model shall represent two eyes, I thought that performer did the matrix multiplication automatically

Thanks in advance !

-------------------------------------------------------------------------
Code example !!

 pfDCS *Head; // attached to Flock of Bird Sensor
 pfDCS *L_Eye;
 pfDCS *R_Eye;

    pfCoord CamSens;
    pfCoord HandSens;
    pfMatrix L_EyeMat ;
 pfMatrix R_EyeMat ;

 L_Eye = new pfDCS;
 R_Eye = new pfDCS;
 Head = new pfDCS;
  
 Head->addChild(L_Eye);
 Head->addChild(R_Eye);
  

 L_Eye->setTrans(-0.50f,0.0f,0.0f);
 R_Eye->setTrans(0.50f,0.0f,0.0f);
  
 float alfa = 0.0f
  
  
 while(exitFlag)
 {
 alfa++;
  
 getSensorData(); // my code to fetch FOB sensor data

 Head->setRot(0.50f*alfa,0.0f,0.0f);
  
 L_Eye->getMat ( L_EyeMat ); // why does this Matrix dont change value ?
 R_Eye->getMat ( R_EyeMat ); // why does this Matrix dont change value ?
  
    chan0->setViewMat( L_EyeMat );
 chan1->setViewMat( R_EyeMat );
  
 pfFrame();
  
 }

********************************************************************
Torbjörn Håkansson

URL: http://www.hbg.lth.se/~m96tha
Mail : torbjorn.hakansson++at++telia.com
Phone: +46-(0)40-320595
ICQ: 281022
********************************************************************


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Sun May 30 1999 - 12:42:03 PDT

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