| |||||||||
|
| ||||||||
| |||||||||
#include "vg.h" // main include file for Vega #include "vgperf.h" // for the Vega Performer node functions #include "vgutil.h" #include "pf.h" // main include file for Performer #include "pfutil.h"
bool isObjectWithChannelsFOV(vgObject *obj, vgChannel *chan){ // ############################################################# // # // # Public Function // # // # Returns true if the vgObject is with the current field of // # view of the vgChannel other wise returns false // # // ############################################################# bool result = false;
// // Sanity check we object // if( obj == NULL ) return result;
// // if no channel use the first channel // if( chan == NULL ) chan = vgGetChan(0);
// // We need to get the Objects root pfNode // pfNode *node = vgGetObjPfNode( obj ); if( node == NULL ) return result;
// // We need to get the Channels root pfNode // pfChannel *pfchan = vgGetPfChan( chan ); if( pfchan == NULL ) return result;
// // We need to get the objects bounding sphere // pfSphere bsphere; pfGetNodeBSphere( node, &bsphere);
// // Now do the test and return true is found in side // result = pfChanContainsSphere ( pfchan, &bsphere);
if( (result & PFIS_ALL_IN ) || (result & PFIS_TRUE ) || (result & ( PFIS_TRUE | PFIS_ALL_IN | PFIS_MAYBE) )) return true
return false;
} // isObjectWithChannelsFOV
| ||
© Copyright 2004 Gordon Tomlinson All Rights Reserved. All logos, trademarks and copyrights in this site are property of their respective owner. |