[Plib-users] scaling with setTransform
Brought to you by:
sjbaker
From: Krippel H. <neu...@su...> - 2003-07-30 08:06:17
|
Hi to all I am writing on a gamedesigner with plib and opende and QT. (www.kcake.org) In this examplecode i get the positon from opende and set it in the plib object and scale it. It works. The problem is that the scaled objects redraw to lat. Example: I drive with a car and the scaled opjects (ramp)are drawed to late in the view. void Barrier::setTransform (ssgTransform *objtrans, const dReal pos[3], const dReal R[12],dVector3 dxyz) { sgMat4 m; m[0][0] = R[0] ; m[0][1] = R[4] ; m[0][2] = R[8] ; m[0][3] = SG_ZERO ; //x m[1][0] = R[1] ; m[1][1] = R[5] ; m[1][2] = R[9] ; m[1][3] = SG_ZERO ; // y m[2][0] = R[2] ; m[2][1] = R[6] ; m[2][2] = R[10] ; m[2][3] = SG_ZERO ; // z m[3][0] = pos [0] ; m[3][1] = pos [1] ; m[3][2] = pos [2] ; m[3][3] = SG_ONE ; sgScaleVec3(m[0], dxyz[0]); sgScaleVec3(m[1], dxyz[1]); sgScaleVec3(m[2], dxyz[2]); objtrans->setTransform(m); } Is the BSphere incorrect ?? A other question: Can I resize objects ? (not scaling) Thank You Harald Krippel Der supergünstige surfEU-Internetzugang - Jetzt registrieren! http://www.surfeu.at/register/ |