int build_model(PQP_Model *m) { // set num_bvs to 1, the first index for a child bv m->num_bvs = 1; // build recursively build_recurse(m, 0, 0, m->num_tris); // change BV orientations from world-relative to parent-relative PQP_REAL R[3][3],T[3]; Midentity(R); Videntity(T); make_parent_relative(m,0,R #if PQP_BV_TYPE & RSS_TYPE ,T #endif #if PQP_BV_TYPE & OBB_TYPE ,T #endif ); return PQP_OK; }
Tri3B::Tri3B( ) { //sets all vercotrs to the zero vector and id to zero id = 0; Videntity( p1 ); Videntity( p2 ); Videntity( p3 ); Videntity( s12 ); Videntity( s23 ); Videntity( s31 ); Videntity( ns12 ); Videntity( ns23 ); Videntity( ns31 ); Videntity( n ); }