Todd R Pravata (tpravata++at++rts.dseg.ti.com)
Tue, 4 Oct 94 09:39:57 CDT
Thanks,
Todd
Here's the code:
/* Ignore stamps for any other than highest level of detail */
if (mrf.is_stamp && lod == 0) {
pfVec3 pos;
/* Create SCS to scale stamp model */
scs = create_SCS(mrf.scale.x, &ZERO_VECTOR, &ZERO_VECTOR);
pfAddChild(parent, (pfNode *)scs);
bboard = pfNewBboard();
pfAddChild((pfGroup *)scs, (pfNode *)bboard);
/* Find the GeoSet in the model hierarchy and add it to the Bboard */
add_stamp_geoset(bboard, model);
/* Establish the position of this geoset in the billboard */
pfSetVec3(pos, trans.x, trans.y, trans.z);
pfBboardPos(bboard, 0, pos);
}
pfSCS *create_SCS(REAL_4 scale, R4P3D *rot, R4P3D *trans)
{
pfDCS *dcs;
pfSCS *scs;
pfMatrix *matrix;
void *shared_arena = pfGetSharedArena();
dcs = pfNewDCS();
matrix = (pfMatrix *)pfCalloc(1, sizeof(pfMatrix), shared_arena);
pfDCSScale(dcs, scale);
pfDCSRot(dcs, rot->x, rot->y, rot->z);
pfDCSTrans(dcs, trans->x, trans->y, trans->z);
pfGetDCSMat(dcs, *matrix);
pfDelete(dcs);
scs = pfNewSCS(*matrix);
return(scs);
}
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:35 PDT