4 #ifndef DP3_BASE_PATCH_H_
5 #define DP3_BASE_PATCH_H_
26 Patch(
const std::string &name, T first, T last)
27 : name_(name), components_(first, last) {
31 const std::string &
Name()
const {
return name_; }
39 size_t Index()
const {
return index_; }
43 void SetIndex(
size_t index) { index_ = index; }
46 std::shared_ptr<base::ModelComponent>
component(
size_t i) {
47 return components_[i];
49 std::shared_ptr<const base::ModelComponent>
component(
size_t i)
const {
50 return components_[i];
63 double brightness_ = 0.0;
64 std::vector<std::shared_ptr<base::ModelComponent>> components_;
A set of sources for which direction dependent effects are assumed to be equal.
Definition: Patch.h:19
std::shared_ptr< base::ModelComponent > component(size_t i)
Definition: Patch.h:46
void SetDirection(const base::Direction &pos)
Definition: Patch.h:41
std::vector< std::shared_ptr< const base::ModelComponent > >::const_iterator const_iterator
Definition: Patch.h:23
const std::string & Name() const
Definition: Patch.h:31
Patch(const std::string &name, T first, T last)
Definition: Patch.h:26
size_t Index() const
Definition: Patch.h:39
void ComputeDirection()
Compute the direction as the average of the positions of the components.
std::shared_ptr< const base::ModelComponent > component(size_t i) const
Definition: Patch.h:49
std::vector< std::shared_ptr< base::ModelComponent > >::iterator iterator
Definition: Patch.h:21
iterator end()
Definition: Patch.h:54
iterator begin()
Definition: Patch.h:53
void SetBrightness(double brightness)
Definition: Patch.h:42
const base::Direction & Direction() const
Definition: Patch.h:32
void SetIndex(size_t index)
Definition: Patch.h:43
double Brightness() const
Definition: Patch.h:33
size_t NComponents() const
Definition: Patch.h:45
A direction on the celestial sphere.
Definition: Direction.h:15