|
enum | TrimOptions : uint8_t { None = 0,
Start = 1 << 0,
End = 1 << 1,
Both = Start | End
} |
|
enum | Type : uint8_t {
Linear,
SineIn,
SineOut,
SineInOut,
QuadIn,
QuadOut,
QuadInOut,
CubicIn,
CubicOut,
CubicInOut,
QuartIn,
QuartOut,
QuartInOut,
QuintIn,
QuintOut,
QuintInOut,
ExpoIn,
ExpoOut,
ExpoInOut,
CircIn,
CircOut,
CircInOut,
BackIn,
BackOut,
BackInOut,
ElasticIn,
ElasticOut,
ElasticInOut,
BounceIn,
BounceOut,
BounceInOut
} |
|
|
template<typename PtrT , Concepts::IntegralT IntT> |
constexpr PtrT * | Mountain::Utils::IntToPointer (IntT number) |
| Converts a integral number to a valid pointer without illegal size operations. More...
|
|
template<typename T > |
size_t | Mountain::Utils::GetTypeHash () |
| Gets the hash code of a specified type. More...
|
|
template<typename T > |
size_t | Mountain::Utils::GetTypeHash (const T *ptr) |
| Gets the hash code of a specified polymorphic pointer type. More...
|
|
MOUNTAIN_API void | Mountain::Utils::AlignImGuiCursor (float_t objectWidth, float_t alignment=0.5f) |
| Horizontally aligns the cursor of ImGui to be centered around a specific portion of the available space. More...
|
|
MOUNTAIN_API std::string | Mountain::Utils::HumanizeString (const std::string &str) |
| Humanizes the provided string. More...
|
|
MOUNTAIN_API std::string | Mountain::Utils::HumanizeVariableName (const std::string &str) |
| Humanizes the provided variable name. More...
|
|
MOUNTAIN_API constexpr std::string | Mountain::Utils::RemoveNamespaces (const std::string &str) |
| Removes the namespaces indicators from the provided string. More...
|
|
MOUNTAIN_API constexpr const char_t * | Mountain::Utils::RemoveNamespaces (const char_t *str) |
| Removes the namespaces indicators from the provided string. More...
|
|
MOUNTAIN_API constexpr float_t | Mountain::Utils::RemapValue (float_t oldValue, Vector2 oldRange, Vector2 newRange) |
| Remaps a value from one range to another. More...
|
|
MOUNTAIN_API constexpr size_t | Mountain::Utils::RemapValue (size_t oldValue, Vector2i oldRange, Vector2i newRange) |
| Remaps a value from one range to another. More...
|
|
MOUNTAIN_API float_t | Mountain::Utils::NormalizeAngle (float_t angle) |
| Normalizes an angle (clamps its value between 0 and 2 * PI) More...
|
|
MOUNTAIN_API Vector3 | Mountain::Utils::NormalizeAngles (Vector3 angles) |
| Normalizes a set of 3 angles in a Vector3 (clamps their value between 0 and 2 * PI) More...
|
|
MOUNTAIN_API Vector3 | Mountain::Utils::GetQuaternionEulerAngles (const Quaternion &rot) |
| Converts a quaternion to its euler angle representation. More...
|
|
template<typename T , typename U > |
Pointer< T > | Mountain::Utils::DynamicPointerCast (const Pointer< U > &value) |
| Equivalent of a dynamic_cast for Pointer "Pointers". More...
|
|
MOUNTAIN_API void | Mountain::Utils::OpenInExplorer (const std::filesystem::path &path) |
| Opens the specified path in the file explorer. More...
|
|
MOUNTAIN_API void | Mountain::Utils::OpenInExplorer (const std::filesystem::path &path, bool_t isFile) |
| Opens the specified path in the file explorer. More...
|
|
MOUNTAIN_API void | Mountain::Utils::OpenFile (const std::filesystem::path &filepath) |
| Opens the specified file on the user's computer. More...
|
|
template<std::ranges::input_range Container, typename T > |
bool_t | Mountain::Utils::ArrayContains (const Container &container, T element) |
| Returns whether an array contains an element.
|
|
template<std::ranges::input_range Container> |
bool_t | Mountain::Utils::StringArrayContains (const Container &container, const std::string &element) |
| Returns whether a string array contains an element using Utils::StringEqualsIgnoreCase.
|
|
MOUNTAIN_API bool_t | Mountain::Utils::StringEqualsIgnoreCase (std::string_view a, std::string_view b) |
| Checks if two strings are equal, case-insensitive.
|
|
MOUNTAIN_API bool_t | Mountain::Utils::StringContainsIgnoreCase (std::string_view a, std::string_view b) |
| Checks if a string contains another one, case-insensitive.
|
|
template<typename Ret , typename... Args> |
constexpr size_t | Mountain::Utils::FunctionAddress (std::function< Ret(Args...)> f) |
| Gets the address of a function. More...
|
|
MOUNTAIN_API int32_t | Mountain::Utils::TerminalCommand (const std::string &command, bool_t asynchronous=true) |
|
MOUNTAIN_API void | Mountain::Utils::CreateEmptyFile (const std::filesystem::path &path) |
|
MOUNTAIN_API void | Mountain::Utils::SetThreadName (std::thread &thread, const std::wstring &name) |
|
template<typename R , typename... Args> |
R | Mountain::Utils::CallSafe (const std::function< R(Args...)> &function, Args &&... args) |
|
MOUNTAIN_API std::wstring | Mountain::Utils::NarrowToWide (std::string_view str) |
|
MOUNTAIN_API std::string | Mountain::Utils::WideToNarrow (std::wstring_view str) |
|
MOUNTAIN_API std::string | Mountain::Utils::ToLower (std::string_view str) |
|
MOUNTAIN_API std::string | Mountain::Utils::ToUpper (std::string_view str) |
|
MOUNTAIN_API std::pair< float_t, std::string_view > | Mountain::Utils::ByteSizeUnit (int64_t size) |
|
MOUNTAIN_API std::string | Mountain::Utils::GetBuiltinShadersPath () |
|
MOUNTAIN_API std::string | Mountain::Utils::GetBuiltinAssetsPath () |
|
MOUNTAIN_API std::string | Mountain::Utils::Trim (std::string_view str, TrimOptions options=TrimOptions::Both) |
|
MOUNTAIN_API std::string | Mountain::Utils::GetLine (const std::string &str, size_t lineIndex) |
|
MOUNTAIN_API uint16_t | Mountain::Utils::Concat16 (uint8_t right, uint8_t left) |
|
MOUNTAIN_API uint32_t | Mountain::Utils::Concat32 (uint8_t right0, uint8_t right1, uint8_t left0, uint8_t left1) |
|
template<uint64_t Offset, uint64_t Count> |
constexpr uint64_t | Mountain::Utils::GetBits (const uint64_t value) |
|
template<Concepts::EnumT T> |
constexpr Meta::Flags< T > | Mountain::Utils::ToFlags (T enumValue) |
|
Defines general utility functions.
Definition in file utils.hpp.