OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
MTUtils.hpp File Reference
#include <array>
#include <atomic>
#include <cstddef>
#include <mutex>
#include <functional>
#include <utility>
#include <vector>
#include <algorithm>
#include <cmath>
#include "libslic3r.h"
Include dependency graph for MTUtils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Slic3r::SpinMutex
 Handy little spin mutex for the cached meshes. Implements the "Lockable" concept. More...
class  Slic3r::CachedObject< T >
 A wrapper class around arbitrary object that needs thread safe caching. More...

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Functions

template<class C>
bool Slic3r::all_of (const C &container)
template<class T, class I, class = IntegerOnly<I>>
std::vector< T > Slic3r::linspace_vector (const ArithmeticOnly< T > &start, const T &stop, const I &n)
 Exactly like Matlab https://www.mathworks.com/help/matlab/ref/linspace.html.
template<size_t N, class T>
std::array< ArithmeticOnly< T >, N > Slic3r::linspace_array (const T &start, const T &stop)
template<class T>
std::vector< ArithmeticOnly< T > > Slic3r::grid (const T &start, const T &stop, const T &stride)
 A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'stride' less than or equal to 'end' and leaving 'stride' space between each value. Very similar to Matlab [start:stride:end] notation.