#include <lib_sculptbrush.h>
A specialized class for sculpting that is optimized to store Boolean states.
Each Boolean state is represented by a single bit which reduces the memory requirements.
公共成员函数 |
|
| Bool | Init ( UInt32 count) |
| void | 清零 () |
| UInt32 | GetCount () |
| void | Set ( UInt32 index) |
| Bool | CheckSet ( UInt32 index) |
| Bool | Check ( UInt32 index) |
| void | UnSet ( UInt32 index) |
静态公共成员函数 |
|
| static SculptFlagChecker * | Alloc () |
| static void | Free ( SculptFlagChecker *&fc) |
私有成员函数 |
|
| SculptFlagChecker () | |
| ~SculptFlagChecker () | |
|
|
|
static |
Allocates a SculptFlagChecker object. Destroy the allocated SculptFlagChecker object with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs SculptFlagChecker objects allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
| [in,out] | fc | The SculptFlagChecker object to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
| Bool Init | ( | UInt32 | count | ) |
Initializes with the number of states to check. Data will be allocated so that each boolean state will only use a single bit for each state.
| [in] | count | The number of states that need to be set. |
| void Clear | ( | ) |
Clears the currently set states. This method is optimized for speed to only clear the memory for the bits that were actually set.
| UInt32 GetCount | ( | ) |
Gets the number of states set in the Init() 方法。
| void Set | ( | UInt32 | index | ) |
Sets the state of the bit to true at the given index .
| [in] | index | The index of the bit to set: <= index < GetCount() |
| Bool CheckSet | ( | UInt32 | index | ) |
Checks the state of the bit at the given index and also sets it to true if it was not previously set.
| [in] | index | The index of the bit to check: <= index < GetCount() |
| Bool Check | ( | UInt32 | index | ) |
Checks the state of the bit at the given index .
| [in] | index | The index of the bit to check: <= index < GetCount() |
| void UnSet | ( | UInt32 | index | ) |
Clears the state of the bit at the given index .
| [in] | index | The index of the bit to unset: <= index < GetCount() |