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 )
80 _direction = base - arrow;
81 _direction /= _direction.
norm();
82 _proj0 = _direction.
dot( arrow );
83 _proj1 = _direction.
dot( base );
84 _cax0 = _arrow - _direction * _proj0;
ConeSamplable(const Point3df &arrow, const Point3df &base, float radius)
virtual bool contains(AimsVector< float, 3 > &vector)
T dot(const AimsVector< T, D > &other) const
The virtual template class fo which samplable classes must inherit from.
Samplable()
The programmer should not call the constructor of an abstract base class.
AIMSDATA_API float norm(const Tensor &thing)