void CODEGeom::get_final_tx(dGeomID g,const dReal* &p,const dReal* &R,dReal * bufV, dReal* bufM) { if(is_transform(g)) { computeFinalTx(g,bufV,bufM); R=bufM;p=bufV; }else { R=dGeomGetRotation(g); p=dGeomGetPosition(g); } }
void dxGeomTransform::computeAABB() { if (!obj) { dSetZero (aabb,6); return; } // backup the relative pos and R pointers of the encapsulated geom object dxPosR* posr_bak = obj->final_posr; // compute temporary pos and R for the encapsulated geom object computeFinalTx(); obj->final_posr = &transform_posr; // compute the AABB obj->computeAABB(); memcpy (aabb,obj->aabb,6*sizeof(dReal)); // restore the pos and R obj->final_posr = posr_bak; }