◆
~RangeData()
成员函数文档编制
◆
Alloc()
Allocates a
RangeData
. Destroy the allocated
RangeData
with
Free()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
返回
-
The allocated range data, or
nullptr
if the allocation failed.
◆
Free()
Destructs RangeDatas allocated with
Alloc()
。使用
AutoAlloc
to automate the allocation and destruction based on scope.
-
参数
-
[in,out]
|
data
|
The
RangeData
to destruct. If the pointer is
nullptr
nothing happens. The pointer is assigned
nullptr
afterwards.
|
◆
Init()
Initializes the range data with the passed range number. The interval in between ranges will be the same.
-
参数
-
[in]
|
rangeNumber
|
The number of ranges.
|
-
返回
-
true
if successful, otherwise
false
.
◆
Reset()
void Reset
|
(
|
Bool
|
invalidateObject
=
false
|
)
|
|
Resets the range data to the initial state.
-
参数
-
[in]
|
invalidateObject
|
true
to initialize the ranges after reset operation, otherwise the object will be initialized but functions with one single range.
|
◆
CopyTo()
Copy the range data over to
dst
.
-
参数
-
[in,out]
|
dst
|
The destination range data. The caller owns the pointed range data..
|
◆
AddValue()
Adds a value and split existing range.
-
参数
-
[in]
|
value
|
The value to add.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetCurrentValue()
Float
GetCurrentValue
|
(
|
|
)
|
const
|
Retrieves The current value.
-
返回
-
The current value.
◆
SetCurrentValue()
void SetCurrentValue
|
(
|
Float
|
value
|
)
|
|
Sets the current value.
-
参数
-
[in]
|
value
|
The value, must be in the range
[0.0, 1.0].
|
◆
GetKnotsCount()
Int
GetKnotsCount
|
(
|
|
)
|
const
|
Retrieves the numbers of knots.
-
返回
-
The numbers of knots.
◆
SetKnotValue()
Sets the value at the specified knot index.
-
参数
-
[in]
|
knotIndex
|
The knot index to set the value.
|
[in]
|
value
|
The value to set.
|
-
返回
-
true
if successful, otherwise
false
.
◆
GetKnotValue()
Float
GetKnotValue
|
(
|
Int
|
knotIndex
|
)
|
const
|
Retrieves the value at the specified knot index.
-
参数
-
[in]
|
knotIndex
|
The knot index.
|
-
返回
-
The value.
◆
GetKnotIndexByValue()
Int
GetKnotIndexByValue
|
(
|
Float
|
value
|
)
|
const
|
Searches for a knot with the passed value.
-
参数
-
[in]
|
value
|
The value used to search the knot.
|
-
返回
-
The knot index, or
NOTOK
if not found.
◆
DeleteKnot()
void DeleteKnot
|
(
|
Int
|
knotIndex
|
)
|
|
Deletes a knot at the specified knot index.
-
参数
-
[in]
|
knotIndex
|
The knot index to delete.
|
◆
GetSelectedKnot()
Int
GetSelectedKnot
|
(
|
|
)
|
const
|
Retrieves the selected knot.
-
返回
-
The selected knot index, or
NOTOK
if not found.
◆
SetSelectedKnot()
void SetSelectedKnot
|
(
|
Int
|
knotIndex
|
)
|
|
Sets the selected knot.
-
参数
-
[in]
|
knotIndex
|
The index to select, or
NOTOK
to deselect all.
|
◆
GetRangesCount()
Int
GetRangesCount
|
(
|
|
)
|
const
|
The number of ranges, must be >=
1
.
-
返回
-
The number of ranges.
◆
GetRange()
Retrieves the range at the specified
index
.
-
参数
-
[in]
|
index
|
The range index.
|
-
返回
-
The range.
◆
GetRangeIndex()
Returns a range index a value for the specified
value
.
-
参数
-
[in]
|
value
|
The value, must be in range
[0.0, 1.0].
|
-
返回
-
The range index.
◆
GetRangeColor()
向量
GetRangeColor
|
(
|
Int
|
index
|
)
|
const
|
Retrieves the range color for the specified range
index
.
-
参数
-
[in]
|
index
|
The range index to get the color.
|
-
返回
-
The range Color.
◆
SetRangeColor()
void SetRangeColor
|
(
|
Int
|
index
,
|
|
|
const
向量
&
|
color
|
|
)
|
|
|
Sets the range color at the specified range
index
.
-
注意
-
若
IsPerRangeColorMode()
returns
false
the range
index
is not evaluated and the color is stored always at the first index.
-
参数
-
[in]
|
index
|
The index of the range to set the color.
|
[in]
|
color
|
The color to be assigned to the range.
|
◆
GetSelectedRange()
Int
GetSelectedRange
|
(
|
|
)
|
const
|
Retrieves the selected range.
-
返回
-
The selected range index, or
NOTOK
if not found.
◆
SetSelectedRange()
void SetSelectedRange
|
(
|
Int
|
rangeIndex
|
)
|
|
Sets the selected range.
-
参数
-
[in]
|
rangeIndex
|
The index to select, or
NOTOK
to deselect all.
|
◆
IsPerRangeColorMode()
Bool
IsPerRangeColorMode
|
(
|
|
)
|
const
|
Checks if the color mode is stored per range, or just as single color.
-
返回
-
true
if the color is stored is stored per range, otherwise
false
.
◆
SetColorMode()
void SetColorMode
|
(
|
Bool
|
perRange
|
)
|
|
Sets the mode indicating if the color need to be stored per range, or just as single color.
-
参数
-
[in]
|
perRange
|
true
to store the color per range,
false
to store it just as single color.
|
◆
IsRandomColorMode()
Bool
IsRandomColorMode
|
(
|
|
)
|
const
|
Checks if the colors are randomized or user defined.
-
返回
-
true
if the colors are randomized, otherwise
false
.
◆
SetRandomColorMode()
void SetRandomColorMode
|
(
|
Bool
|
random
|
)
|
|
Sets the random color mode.
-
参数
-
[in]
|
random
|
true
to randomize colors, otherwise
false
.
|