-
首页
-
C4D R23.110 C++ SDK
详细描述
函数
|
Float32
|
Clamp01
(
Float32
a)
|
Float64
|
Clamp01
(
Float64
a)
|
Float32
|
Sin
(
Float32
val)
|
Float64
|
Sin
(
Float64
val)
|
Float32
|
Cos
(
Float32
val)
|
Float64
|
Cos
(
Float64
val)
|
Float32
|
Tan
(
Float32
val)
|
Float64
|
Tan
(
Float64
val)
|
Float32
|
ATan
(
Float32
val)
|
Float64
|
ATan
(
Float64
val)
|
Float32
|
ATan2
(
Float32
valY,
Float32
valX)
|
Float64
|
ATan2
(
Float64
valY,
Float64
valX)
|
Float32
|
Exp
(
Float32
val)
|
Float64
|
Exp
(
Float64
val)
|
Float32
|
Ln
(
Float32
val)
|
Float64
|
Ln
(
Float64
val)
|
Float32
|
Log10
(
Float32
val)
|
Float64
|
Log10
(
Float64
val)
|
Float32
|
Log2
(
Float32
val)
|
Float64
|
Log2
(
Float64
val)
|
Float32
|
Sqrt
(
Float32
val)
|
Float64
|
Sqrt
(
Float64
val)
|
Float32
|
Floor
(
Float32
val)
|
Float64
|
Floor
(
Float64
val)
|
Float32
|
Ceil
(
Float32
val)
|
Float64
|
Ceil
(
Float64
val)
|
Float32
|
Modf
(
Float32
val,
Float32
*intpart)
|
Float64
|
Modf
(
Float64
val,
Float64
*intpart)
|
Float32
|
Pow
(
Float32
v1,
Float32
v2)
|
Float64
|
Pow
(
Float64
v1,
Float64
v2)
|
Float32
|
Sinh
(
Float32
val)
|
Float64
|
Sinh
(
Float64
val)
|
Float32
|
Cosh
(
Float32
val)
|
Float64
|
Cosh
(
Float64
val)
|
Float32
|
Tanh
(
Float32
val)
|
Float64
|
Tanh
(
Float64
val)
|
Float32
|
FMod
(
Float32
v1,
Float32
v2)
|
Float64
|
FMod
(
Float64
v1,
Float64
v2)
|
Float32
|
Abs
(
Float32
val)
|
Float64
|
Abs
(
Float64
val)
|
Float32
|
Inverse
(
Float32
f)
|
Float64
|
Inverse
(
Float64
f)
|
Float32
|
Round
(
Float32
f)
|
Float64
|
Round
(
Float64
f)
|
template<typename X >
|
X
|
Abs
(X f)
|
template<typename X >
|
X
|
最小
(X a, X b)
|
template<typename X >
|
X
|
最大
(X a, X b)
|
template<typename X >
|
void
|
Swap
(X &a, X &b)
|
template<typename X >
|
X
|
ClampValue
(X value, X lowerLimit, X upperLimit)
|
Float32
|
Blend
(
Float32
value1,
Float32
value2,
Float32
blendValue)
|
Float64
|
Blend
(
Float64
value1,
Float64
value2,
Float64
blendValue)
|
template<typename X >
|
X
|
Sqr
(X a, X b)
|
template<typename X >
|
X
|
Sqr
(X a)
|
Float32
|
ASin
(
Float32
val)
|
Float64
|
ASin
(
Float64
val)
|
Float32
|
ACos
(
Float32
val)
|
Float64
|
ACos
(
Float64
val)
|
Float32
|
DegToRad
(
Float32
r)
|
Float64
|
DegToRad
(
Float64
r)
|
Float32
|
RadToDeg
(
Float32
r)
|
Float64
|
RadToDeg
(
Float64
r)
|
void
|
SinCos
(
Float32
r,
Float32
&sn,
Float32
&cs)
|
void
|
SinCos
(
Float64
r,
Float64
&sn,
Float64
&cs)
|
Int32
|
SAFEINT32
(
Float32
x)
|
Int32
|
SAFEINT32
(
Float64
x)
|
Int64
|
SAFEINT64
(
Float32
x)
|
Int64
|
SAFEINT64
(
Float64
x)
|
Int
|
SAFEINT
(
Float64
x)
|
Int
|
SAFEINT
(
Float32
x)
|
template<typename T >
|
void
|
SetMax
(T &a, const T &b)
|
template<typename T >
|
void
|
SetMin
(T &a, const T &b)
|
Macro Definition Documentation
◆
SIZEOF
Calculates the size of a datatype or element.
Function Documentation
◆
Clamp01()
[1/2]
Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.
◆
Clamp01()
[2/2]
Clip a floating point number against the lower limit 0 and the upper limit 1. The result will be returned.
◆
Sin()
[1/2]
◆
Sin()
[2/2]
◆
Cos()
[1/2]
◆
Cos()
[2/2]
◆
Tan()
[1/2]
◆
Tan()
[2/2]
◆
ATan()
[1/2]
◆
ATan()
[2/2]
◆
ATan2()
[1/2]
◆
ATan2()
[2/2]
◆
Exp()
[1/2]
◆
Exp()
[2/2]
◆
Ln()
[1/2]
◆
Ln()
[2/2]
◆
Log10()
[1/2]
◆
Log10()
[2/2]
◆
Log2()
[1/2]
◆
Log2()
[2/2]
◆
Sqrt()
[1/2]
◆
Sqrt()
[2/2]
◆
Floor()
[1/2]
◆
Floor()
[2/2]
◆
Ceil()
[1/2]
◆
Ceil()
[2/2]
◆
Modf()
[1/2]
◆
Modf()
[2/2]
◆
Pow()
[1/2]
◆
Pow()
[2/2]
◆
Sinh()
[1/2]
◆
Sinh()
[2/2]
◆
Cosh()
[1/2]
◆
Cosh()
[2/2]
◆
Tanh()
[1/2]
◆
Tanh()
[2/2]
◆
FMod()
[1/2]
◆
FMod()
[2/2]
◆
Abs()
[1/3]
◆
Abs()
[2/3]
◆
Inverse()
[1/2]
Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.
◆
Inverse()
[2/2]
Calculates the reciprocal value (multiplicative inverse). If the input value is zero, zero will be returned for safety to avoid exceptions.
◆
Round()
[1/2]
Rounds a floating point value
-
由于
-
R18
◆
Round()
[2/2]
Rounds a floating point value
-
由于
-
R18
◆
Abs()
[3/3]
Calculates the absolute value of any data type.
◆
Min()
Calculates the minimum of two values and return it.
◆
Max()
Calculates the maximum of two values and return it.
◆
Swap()
void Swap
|
(
|
X &
|
a
,
|
|
|
X &
|
b
|
|
)
|
|
|
Swaps two values. If available, move semantics will be used.
◆
ClampValue()
X ClampValue
|
(
|
X
|
value
,
|
|
|
X
|
lowerLimit
,
|
|
|
X
|
upperLimit
|
|
)
|
|
|
Clips a value against a lower and upper limit. The new value is returned.
◆
Blend()
[1/2]
Clips a value against a lower and upper limit. The new value is returned.
◆
Blend()
[2/2]
◆
Sqr()
[1/2]
Calculates square difference of two values.
◆
Sqr()
[2/2]
Calculates square of a value.
◆
ASin()
[1/2]
Calculates arcsine. The input value is clipped for safety to avoid exceptions.
◆
ASin()
[2/2]
Calculates arcsine. The input value is clipped for safety to avoid exceptions.
◆
ACos()
[1/2]
Calculates arccosine. The input value is clipped for safety to avoid exceptions.
◆
ACos()
[2/2]
Calculates arccosine. The input value is clipped for safety to avoid exceptions.
◆
DegToRad()
[1/2]
Converts float value from degrees to radians.
-
由于
-
R18
◆
DegToRad()
[2/2]
Converts float value from degrees to radians.
-
由于
-
R18
◆
RadToDeg()
[1/2]
Converts float value from radians to degrees.
-
由于
-
R18
◆
RadToDeg()
[2/2]
Converts float value from radians to degrees.
-
由于
-
R18
◆
SinCos()
[1/2]
◆
SinCos()
[2/2]
◆
SAFEINT32()
[1/2]
Safely converts a 32 bit float value into Int32. The resulting value will be clipped against the Int32 boundaries, without raising an exception.
◆
SAFEINT32()
[2/2]
Safely converts a 64 bit float value into Int32. The resulting value will be clipped against the Int32 boundaries, without raising an exception.
◆
SAFEINT64()
[1/2]
Safely converts a 32 bit float value into Int64. The resulting value will be clipped against the Int64 boundaries, without raising an exception.
◆
SAFEINT64()
[2/2]
Safely converts a 64 bit float value into Int64. The resulting value will be clipped against the Int64 boundaries, without raising an exception
◆
SAFEINT()
[1/2]
Safely converts a 64 bit float value into Int. The resulting value will be clipped against the Int boundaries, without raising an exception
◆
SAFEINT()
[2/2]
Safely converts a 32 bit float value into Int. The resulting value will be clipped against the Int boundaries, without raising an exception
◆
SetMax()
void SetMax
|
(
|
T &
|
a
,
|
|
|
const T &
|
b
|
|
)
|
|
|
Assigns the maximum of two values to the first value.
-
参数
-
[in,out]
|
a
|
First value.
|
[in]
|
b
|
Second value.
|
◆
SetMin()
void SetMin
|
(
|
T &
|
a
,
|
|
|
const T &
|
b
|
|
)
|
|
|
Assigns the minimum of two values to the first value.
-
参数
-
[in,out]
|
a
|
First value.
|
[in]
|
b
|
Second value.
|
Variable Documentation
◆
MINVALUE_FLOAT32
the minimum value a Float32 can represent
◆
MAXVALUE_FLOAT32
the maximum value a Float32 can represent
◆
MINVALUE_FLOAT64
the minimum value a Float64 can represent
◆
MAXVALUE_FLOAT64
the maximum value a Float64 can represent
◆
MINVALUE_INT32_FLOAT32
constexpr
Float32
MINVALUE_INT32_FLOAT32
|
|
static
constexpr
|
minimum Float32 value that can be represented by Int32 (-0x7FFFFF80). Lower values will results in an overflow
◆
MAXVALUE_INT32_FLOAT32
constexpr
Float32
MAXVALUE_INT32_FLOAT32
|
|
static
constexpr
|
maximum Float32 value that can be represented by Int32 ( 0x7FFFFF80). Higher values will results in an overflow
◆
MINVALUE_INT64_FLOAT64
constexpr
Float64
MINVALUE_INT64_FLOAT64
|
|
static
constexpr
|
minimum Float64 value that can be represented by Int64 (-0x7ffffffffffffdff). Lower values will results in an overflow
◆
MAXVALUE_INT64_FLOAT64
constexpr
Float64
MAXVALUE_INT64_FLOAT64
|
|
static
constexpr
|
maximum Float64 value that can be represented by Int64 ( 0x7ffffffffffffdff). Higher values will results in an overflow
◆
MINRANGE_FLOAT32
'safe' minimum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
MAXRANGE_FLOAT32
'safe' maximum range for Float32. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
MINRANGE_FLOAT64
'safe' minimum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
MAXRANGE_FLOAT64
'safe' maximum range for Float. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
MINVALUE_FLOAT
constexpr
Float
MINVALUE_FLOAT
|
|
static
constexpr
|
the minimum value a Float can represent
◆
MAXVALUE_FLOAT
constexpr
Float
MAXVALUE_FLOAT
|
|
static
constexpr
|
the maximum value a Float can represent
◆
MINRANGE_FLOAT
constexpr
Float
MINRANGE_FLOAT
|
|
static
constexpr
|
'safe' minimum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
MAXRANGE_FLOAT
constexpr
Float
MAXRANGE_FLOAT
|
|
static
constexpr
|
'safe' maximum range for Float64. Guarantees that multiplication of two numbers doesn't produce an overflow
◆
NOTOK
constant used for special cases
◆
PI
floating point constant: PI
◆
PI_INV
floating point constant: 1.0 / PI
◆
PI2
floating point constant: 2.0 * PI
◆
PI2_INV
floating point constant: 1.0 / (2.0 * PI)
◆
PI05
floating point constant: 0.5 * PI