Physics::CRay* CPhysicsServer::CreateRay(const vector3& Origin, const vector3& Dir) const { CRay* R = CRay::Create(); R->SetOrigin(Origin); R->SetDirection(Dir); return R; }
// Do a ray check starting from position `pos' along direction `dir'. // Make resulting intersection points available in `GetIntersectionPoints()'. bool CPhysicsServer::RayCheck(const vector3& Pos, const vector3& Dir, const CFilterSet* ExcludeSet) { Contacts.Clear(); CRay R; R.SetOrigin(Pos); R.SetDirection(Dir); if (ExcludeSet) R.SetExcludeFilterSet(*ExcludeSet); R.DoRayCheckAllContacts(matrix44::identity, Contacts); return Contacts.Size() > 0; }