mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-30 05:14:30 +03:00
Removed Point::scale(),translate(),coincides_with(),distance_to(),
distance_to_squared(),perp_distance_to(),negative(),vector_to(), translate(), distance_to() etc, replaced with the Eigen equivalents.
This commit is contained in:
@@ -130,6 +130,17 @@ inline void append(std::vector<T>& dest, std::vector<T>&& src)
|
||||
src.shrink_to_fit();
|
||||
}
|
||||
|
||||
// Casting an std::vector<> from one type to another type without warnings about a loss of accuracy.
|
||||
template<typename T_TO, typename T_FROM>
|
||||
std::vector<T_TO> cast(const std::vector<T_FROM> &src)
|
||||
{
|
||||
std::vector<T_TO> dst;
|
||||
dst.reserve(src.size());
|
||||
for (const T_FROM &a : src)
|
||||
dst.emplace_back((T_TO)a);
|
||||
return dst;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void remove_nulls(std::vector<T*> &vec)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user