Lines Matching defs:_vector
56 Point _vector;
59 Ray() : _origin(0,0), _vector(1,0) {}
63 sincos(angle, _vector[Y], _vector[X]);
69 Point vector() const { return _vector; }
70 Point versor() const { return _vector.normalized(); }
72 void setVector(Point const& v) { _vector = v; }
73 Coord angle() const { return std::atan2(_vector[Y], _vector[X]); }
74 void setAngle(Coord a) { sincos(a, _vector[Y], _vector[X]); }
77 _vector = b - a;
78 if (are_near(_vector, Point(0,0)) )
79 _vector = Point(0,0);
81 _vector.normalize();
84 return ( _vector[X] == 0 && _vector[Y] == 0 );
87 return _origin + _vector * t;
90 return _origin[d] + _vector[d] * t;
94 if ( _vector[d] != 0 ) {
95 double t = (v - _origin[d]) / _vector[d];
97 } else if (_vector[(d+1)%2] == v) {
104 double t = dot(point - _origin, _vector);
111 result.setVector(-_vector);
121 return Ray(_origin * m, (_origin + _vector) * m);