Open3D (C++ API)
0.18.0+252c867
|
#include <Scalar.h>
Public Types | |
enum class | ScalarType { Double , Int64 , Bool } |
Public Member Functions | |
Scalar (float v) | |
Scalar (double v) | |
Scalar (int8_t v) | |
Scalar (int16_t v) | |
Scalar (int32_t v) | |
Scalar (int64_t v) | |
template<typename T = int64_t> | |
Scalar (long v, typename std::enable_if<!std::is_same< T, long >::value >::type *=0) | |
Scalar (uint8_t v) | |
Scalar (uint16_t v) | |
Scalar (uint32_t v) | |
Scalar (uint64_t v) | |
Scalar (bool v) | |
bool | IsDouble () const |
bool | IsInt64 () const |
bool | IsBool () const |
double | GetDouble () const |
int64_t | GetInt64 () const |
bool | GetBool () const |
template<typename T > | |
T | To () const |
To<T>() does not check for scalar type and overflows. More... | |
void | AssertSameScalarType (Scalar other, const std::string &error_msg) const |
std::string | ToString () const |
template<typename T > | |
bool | Equal (T value) const |
bool | Equal (bool value) const |
bool | Equal (Scalar other) const |
Scalar is a stores one of {double, int64, bool}. Typically Scalar is used to accept C++ scalar arguments of different types via implicit conversion constructor. Doing so can avoid the need for templates.
|
strong |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns bool value from Scalar. Only works when scalar_type_ is ScalarType::Bool.
|
inline |
Returns double value from Scalar. Only works when scalar_type_ is ScalarType::Double.
|
inline |
Returns int64 value from Scalar. Only works when scalar_type_ is ScalarType::Int64.
|
inline |
|
inline |
|
inline |
|
inline |
To<T>() does not check for scalar type and overflows.
|
inline |