Lines 84-90
Link Here
|
84 |
template<typename Derived> |
84 |
template<typename Derived> |
85 |
inline explicit AlignedBox(const MatrixBase<Derived>& a_p) |
85 |
inline explicit AlignedBox(const MatrixBase<Derived>& a_p) |
86 |
{ |
86 |
{ |
87 |
const typename internal::nested<Derived,2>::type p(a_p.derived()); |
87 |
typename internal::nested<Derived,2>::type p(a_p.derived()); |
88 |
m_min = p; |
88 |
m_min = p; |
89 |
m_max = p; |
89 |
m_max = p; |
90 |
} |
90 |
} |
Lines 190-196
Link Here
|
190 |
template<typename Derived> |
190 |
template<typename Derived> |
191 |
inline bool contains(const MatrixBase<Derived>& a_p) const |
191 |
inline bool contains(const MatrixBase<Derived>& a_p) const |
192 |
{ |
192 |
{ |
193 |
const typename internal::nested<Derived,2>::type p(a_p.derived()); |
193 |
typename internal::nested<Derived,2>::type p(a_p.derived()); |
194 |
return (m_min.array()<=p.array()).all() && (p.array()<=m_max.array()).all(); |
194 |
return (m_min.array()<=p.array()).all() && (p.array()<=m_max.array()).all(); |
195 |
} |
195 |
} |
196 |
|
196 |
|
Lines 202-208
Link Here
|
202 |
template<typename Derived> |
202 |
template<typename Derived> |
203 |
inline AlignedBox& extend(const MatrixBase<Derived>& a_p) |
203 |
inline AlignedBox& extend(const MatrixBase<Derived>& a_p) |
204 |
{ |
204 |
{ |
205 |
const typename internal::nested<Derived,2>::type p(a_p.derived()); |
205 |
typename internal::nested<Derived,2>::type p(a_p.derived()); |
206 |
m_min = m_min.cwiseMin(p); |
206 |
m_min = m_min.cwiseMin(p); |
207 |
m_max = m_max.cwiseMax(p); |
207 |
m_max = m_max.cwiseMax(p); |
208 |
return *this; |
208 |
return *this; |
Lines 236-242
Link Here
|
236 |
template<typename Derived> |
236 |
template<typename Derived> |
237 |
inline AlignedBox& translate(const MatrixBase<Derived>& a_t) |
237 |
inline AlignedBox& translate(const MatrixBase<Derived>& a_t) |
238 |
{ |
238 |
{ |
239 |
const typename internal::nested<Derived,2>::type t(a_t.derived()); |
239 |
typename internal::nested<Derived,2>::type t(a_t.derived()); |
240 |
m_min += t; |
240 |
m_min += t; |
241 |
m_max += t; |
241 |
m_max += t; |
242 |
return *this; |
242 |
return *this; |
Lines 309-315
Link Here
|
309 |
template<typename Derived> |
309 |
template<typename Derived> |
310 |
inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const MatrixBase<Derived>& a_p) const |
310 |
inline Scalar AlignedBox<Scalar,AmbientDim>::squaredExteriorDistance(const MatrixBase<Derived>& a_p) const |
311 |
{ |
311 |
{ |
312 |
const typename internal::nested<Derived,2*AmbientDim>::type p(a_p.derived()); |
312 |
typename internal::nested<Derived,2*AmbientDim>::type p(a_p.derived()); |
313 |
Scalar dist2 = 0.; |
313 |
Scalar dist2 = 0.; |
314 |
Scalar aux; |
314 |
Scalar aux; |
315 |
for (Index k=0; k<dim(); ++k) |
315 |
for (Index k=0; k<dim(); ++k) |