15 #include <argos3/core/utility/math/vector3.h>
28 m_cStart(c_start), m_cEnd(c_end) {
34 Set(c_start, c_direction, f_length);
64 Set(m_cStart, c_direction, f_length);
77 m_cEnd += f_length * c_direction;
97 return (m_cEnd - m_cStart).Length();
104 c_buffer -= m_cStart;
139 const CRay3& c_ray) {
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
T Square(const T &t_v)
Returns the square of the value of the passed argument.
void SetEnd(const CVector3 &c_end)
void Set(const CVector3 &c_start, const CVector3 &c_direction, Real f_length)
CRay3(const CVector3 &c_start, const CVector3 &c_end)
Real GetDistance(Real f_t) const
void GetDirection(CVector3 &c_buffer) const
void Set(const CVector3 &c_start, const CVector3 &c_end)
const CVector3 & GetEnd() const
bool Intersects(const CPlane &c_plane, CVector3 &c_point) const
void GetPoint(CVector3 &c_point, Real f_t) const
void GetInverseDirection(CVector3 &c_buffer) const
CRay3(const CVector3 &c_start, const CVector3 &c_direction, Real f_length)
friend std::ostream & operator<<(std::ostream &c_os, const CRay3 &c_ray)
Serializes the contents of the passed ray onto a stream.
void SetLength(Real f_length)
const CVector3 & GetStart() const
void SetStart(const CVector3 &c_start)
CVector3 & ToVector(CVector3 &c_buffer) const
void SetY(const Real f_y)
Sets the y coordinate of this vector.
Real GetX() const
Returns the x coordinate of this vector.
void SetX(const Real f_x)
Sets the x coordinate of this vector.
CVector3 & Normalize()
Normalizes this vector.
void SetZ(const Real f_z)
Sets the z coordinate of this vector.
Real GetY() const
Returns the y coordinate of this vector.
Real GetZ() const
Returns the z coordinate of this vector.