protected virtual bool validate(SSSphere newBodyInfo) { // override to handle collision tests efficiently for a specific shape of a field // or add other clipping tests.. newBodyInfo.radius += m_safetyDistance; if (m_bodyRadius == 0.0f) return true; List<ssBVHNode<SSSphere>> intersectList = m_bodiesSoFar.traverse (newBodyInfo.ToAABB ()); foreach (ssBVHNode<SSSphere> node in intersectList) { if (node.gobjects != null) { foreach (SSSphere sphere in node.gobjects) { if (newBodyInfo.IntersectsSphere (sphere)) { return false; // invalid } } } } m_bodiesSoFar.addObject (newBodyInfo); return true; // valid }
public bool isSphereInsideFrustum(SSSphere sphere) { return isSphereInsideFrustum (sphere.center, sphere.radius); }
public bool isSphereInsideFrustum(SSSphere sphere) { return(isSphereInsideFrustum(sphere.center, sphere.radius)); }