Open Search
    scalar_extension.h File Reference

    Classes

    struct  MathFuncHelper< Vec2< T >, FUNC >
     
    struct  MathFuncHelper< Vec3< T >, FUNC >
     
    struct  MathFuncHelper< Vec4< T >, FUNC >
     
    struct  MathFuncHelper< Col3< T >, FUNC >
     
    struct  MathFuncHelper< Col4< T >, FUNC >
     

    Namespaces

     maxon
     

    Macros

    #define MATH_HELPER_INSTANTIATE(Func)
     

    Typedefs

    template<typename T >
    using enable_if_scalar = typename std::enable_if< STD_IS_REPLACEMENT(scalar, T), T >::type
     
    template<typename T >
    using enable_if_not_scalar = typename std::enable_if<!STD_IS_REPLACEMENT(scalar, T), T >::type
     
    template<typename T >
    using enable_if_float = typename std::enable_if< STD_IS_REPLACEMENT(floating_point, T), T >::type
     
    template<typename T >
    using enable_if_not_float = typename std::enable_if<!STD_IS_REPLACEMENT(floating_point, T), T >::type
     
    template<typename T >
    using enable_if_integral = typename std::enable_if< STD_IS_REPLACEMENT(integral, T), T >::type
     
    template<typename T >
    using enable_if_not_integral = typename std::enable_if<!STD_IS_REPLACEMENT(integral, T), T >::type
     

    Macro Definition Documentation

    ◆ MATH_HELPER_INSTANTIATE

    #define MATH_HELPER_INSTANTIATE (   Func)

    If you want to use your scalar function with any of the MathFuncHelper specializations: MATH_HELPER_INSTANTIATE(YourFunc); This will create a Function of the same name as the provided function "YourFunc" and can be used like e.g.

    template <typename T> class MyClass
    {
    Result<T> SomeFunc(const T& value, const T& lowerLimit, const T& upperLimit)
    {
    return SmoothStep(lowerLimit, upperLimit, value); // Note that T can be of any type we specialized for.
    }
    };
    PyObject * value
    Definition: abstract.h:715
    Float32 SmoothStep(Float32 lowerLimit, Float32 upperLimit, Float32 x)
    identical to Boxstep, but with a soft curve instead of linear behaviour in the range of [lowerLimit....
    Definition: general_math.h:124
    #define MATH_HELPER_INSTANTIATE(Func)
    Definition: scalar_extension.h:79