35 #ifndef AIMS_RESAMPLING_SAMPLABLE_CONE_H
36 #define AIMS_RESAMPLING_SAMPLABLE_CONE_H
52 float pos = vector.
dot( _direction );
53 if( pos >= _proj0 and pos <= _proj1 )
55 float rmax = (pos - _proj0) / (_proj1 - _proj0) * _radius;
56 float r = ( vector - _cax0 - _direction * pos ).
norm();
76 const Point3df & base,
float radius )
77 :
aimsalgo::Samplable<float, 3>(), _arrow( arrow ), _base( base ),
80 _direction = base - arrow;
81 _direction /= _direction.
norm();
82 _proj0 = _direction.
dot( arrow );
83 _proj1 = _direction.
dot( base );
84 _cax0 = _arrow - _direction * _proj0;
T dot(const AimsVector< T, D > &other) const
ConeSamplable(const Point3df &arrow, const Point3df &base, float radius)
virtual bool contains(AimsVector< float, 3 > &vector)
The virtual template class fo which samplable classes must inherit from.
AIMSDATA_API float norm(const Tensor &thing)