mirror of
https://github.com/rrika/cdcEngineDXHR.git
synced 2024-11-23 05:29:57 +00:00
named UpdateState flags
This commit is contained in:
parent
5af34c4a5a
commit
c7157077cc
@ -10,6 +10,15 @@ class ISceneCellGroup;
|
||||
class ISceneEntity {
|
||||
public:
|
||||
struct UpdateState {
|
||||
static const uint32_t kEnabled = 1;
|
||||
static const uint32_t kDrawable = 2;
|
||||
static const uint32_t kCellGroup = 4;
|
||||
static const uint32_t kMatrix = 8;
|
||||
static const uint32_t kMoveState = 16;
|
||||
static const uint32_t kUpdateVolume = 32;
|
||||
static const uint32_t kUpdateFlags = 64;
|
||||
static const uint32_t kUpdateAll = 127;
|
||||
|
||||
uint32_t updateFlags;
|
||||
bool enabled;
|
||||
IDrawable *drawable;
|
||||
|
@ -13,11 +13,36 @@ SceneEntity::SceneEntity(Scene *scene) : scene(scene) {
|
||||
void SceneEntity::ApplyUpdateState(UpdateState *updateState) {
|
||||
// called from UpdateInstances
|
||||
// without this, the object might still render in the correct position
|
||||
// but QueryVolumeFromDrawable can't move the culling volume away from origin
|
||||
|
||||
// HACK
|
||||
if (updateState && (updateState->updateFlags & 8))
|
||||
// but TransformVolumeAndPivot can't move the culling volume away from origin
|
||||
|
||||
if (updateState->updateFlags & UpdateState::kEnabled) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & UpdateState::kDrawable) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & UpdateState::kCellGroup) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & UpdateState::kMatrix) {
|
||||
// TODO
|
||||
setMatrix(updateState->matrix);
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & UpdateState::kMoveState) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & (UpdateState::kUpdateVolume | UpdateState::kDrawable)) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
if (updateState->updateFlags & (UpdateState::kUpdateFlags | UpdateState::kDrawable)) {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
void SceneEntity::setMatrix(Matrix& newMatrix) {
|
||||
|
Loading…
Reference in New Issue
Block a user