19 #ifndef HEADER_CHECK_SPHERE_HPP 20 #define HEADER_CHECK_SPHERE_HPP 22 #include "tracks/check_structure.hpp" 54 bool isInside(
int index)
const {
return m_is_inside[index]; }
bool isInside(int index) const
Returns if kart indx is currently inside of the sphere.
Definition: check_sphere.hpp:54
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
Definition: vec3.hpp:34
This class implements a check sphere that is used to change the ambient light if a kart is inside thi...
Definition: check_sphere.hpp:35
std::vector< bool > m_is_inside
A flag for each kart to indicate if it's inside of the sphere.
Definition: check_sphere.hpp:43
float getDistance2ForKart(int index) const
Returns the squared distance of kart index from the enter of this sphere.
Definition: check_sphere.hpp:58
float getRadius2() const
Returns the square of the radius of this sphere.
Definition: check_sphere.hpp:61
CheckSphere(const XMLNode &node, unsigned int index)
Constructor for a checksphere.
Definition: check_sphere.cpp:33
virtual bool isTriggered(const Vec3 &old_pos, const Vec3 &new_pos, int kart_id)
True if going from old_pos to new_pos enters or leaves this sphere.
Definition: check_sphere.cpp:59
Controls all checks structures of a track.
Definition: check_manager.hpp:39
std::vector< float > m_distance2
Stores the distance of each kart from the center of this sphere.
Definition: check_sphere.hpp:46
Vec3 m_center_point
Center of the sphere.
Definition: check_sphere.hpp:39
utility class used to parse XML files
Definition: xml_node.hpp:47
float m_radius2
Squared radius of the sphere.
Definition: check_sphere.hpp:41
virtual CheckStructure * clone()
Clone to child process for server usage (atm no sound or scripting).
Definition: check_sphere.hpp:63
Virtual base class for a check structure.
Definition: check_structure.hpp:51