Fixing names

This commit is contained in:
samcake 2018-02-14 10:39:14 -08:00
parent 1d3ae1b187
commit 6357f36a97
5 changed files with 26 additions and 26 deletions

View file

@ -50,7 +50,7 @@ const glm::vec3 HAND_TO_PALM_OFFSET(0.0f, 0.12f, 0.08f);
namespace render {
template <> const ItemKey payloadGetKey(const AvatarSharedPointer& avatar) {
return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(ItemKey::TAG_BITS_0 | ItemKey::TAG_BITS_1).withCullGroup();
return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(ItemKey::TAG_BITS_0 | ItemKey::TAG_BITS_1).withMetaCullGroup();
}
template <> const Item::Bound payloadGetBound(const AvatarSharedPointer& avatar) {
return static_pointer_cast<Avatar>(avatar)->getBounds();

View file

@ -86,7 +86,7 @@ void MeshPartPayload::updateKey(bool isVisible, bool isLayered, uint8_t tagBits,
}
if (isGroupCulled) {
builder.withMetaCulled();
builder.withSubMetaCulled();
}
if (_drawMaterial) {
@ -422,7 +422,7 @@ void ModelMeshPartPayload::updateKey(bool isVisible, bool isLayered, uint8_t tag
}
if (isGroupCulled) {
builder.withMetaCulled();
builder.withSubMetaCulled();
}
if (_isBlendShaped || _isSkinned) {

View file

@ -213,7 +213,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
const auto srcFilter = inputs.get1();
if (!srcFilter.selectsNothing()) {
auto filter = render::ItemFilter::Builder(srcFilter).withoutMetaCulled().build();
auto filter = render::ItemFilter::Builder(srcFilter).withoutSubMetaCulled().build();
// Now get the bound, and
// filter individually against the _filter
@ -228,7 +228,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (filter.test(item.getKey())) {
ItemBound itemBound(id, item.getBound());
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -243,7 +243,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (filter.test(item.getKey())) {
ItemBound itemBound(id, item.getBound());
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -258,7 +258,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (filter.test(item.getKey())) {
ItemBound itemBound(id, item.getBound());
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -273,7 +273,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (filter.test(item.getKey())) {
ItemBound itemBound(id, item.getBound());
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -290,7 +290,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (filter.test(item.getKey())) {
ItemBound itemBound(id, item.getBound());
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -306,7 +306,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
ItemBound itemBound(id, item.getBound());
if (test.solidAngleTest(itemBound.bound)) {
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -323,7 +323,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
ItemBound itemBound(id, item.getBound());
if (test.frustumTest(itemBound.bound)) {
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}
@ -341,7 +341,7 @@ void CullSpatialSelection::run(const RenderContextPointer& renderContext,
if (test.frustumTest(itemBound.bound)) {
if (test.solidAngleTest(itemBound.bound)) {
outItems.emplace_back(itemBound);
if (item.getKey().isCullGroup()) {
if (item.getKey().isMetaCullGroup()) {
item.fetchMetaSubItemBounds(outItems, (*scene));
}
}

View file

@ -78,13 +78,13 @@ public:
INVISIBLE, // Visible or not in the scene?
SHADOW_CASTER, // Item cast shadows
LAYERED, // Item belongs to one of the layers different from the default layer
CULL_GROUP, // As a meta item, the culling of my sub items is based solely on my bounding box and my visibility in the
META_CULL_GROUP, // As a meta item, the culling of my sub items is based solely on my bounding box and my visibility in the view
SUB_META_CULLED, // As a sub item of a meta render item set as cull group, need to be set to my culling to the meta render it
FIRST_TAG_BIT, // 8 Tags available to organize the items and filter them against
LAST_TAG_BIT = FIRST_TAG_BIT + NUM_TAGS,
__SMALLER, // Reserved bit for spatialized item to indicate that it is smaller than expected in the cell in which it belongs (probably because it overlaps over several smaller cells)
__META_CULLED, // Reserved bit for sub item of a meta render item to indicate that the culling is tied to the culling of the meta render item, not this one
NUM_FLAGS, // Not a valid flag
};
@ -124,8 +124,8 @@ public:
Builder& withInvisible() { _flags.set(INVISIBLE); return (*this); }
Builder& withShadowCaster() { _flags.set(SHADOW_CASTER); return (*this); }
Builder& withLayered() { _flags.set(LAYERED); return (*this); }
Builder& withCullGroup() { _flags.set(CULL_GROUP); return (*this); }
Builder& withMetaCulled() { _flags.set(__META_CULLED); return (*this); }
Builder& withMetaCullGroup() { _flags.set(META_CULL_GROUP); return (*this); }
Builder& withSubMetaCulled() { _flags.set(SUB_META_CULLED); return (*this); }
Builder& withTag(Tag tag) { _flags.set(FIRST_TAG_BIT + tag); return (*this); }
// Set ALL the tags in one call using the Tag bits
@ -163,8 +163,11 @@ public:
bool isLayered() const { return _flags[LAYERED]; }
bool isSpatial() const { return !isLayered(); }
bool isCullGroup() const { return _flags[CULL_GROUP]; }
void setCullGroup(bool cullGroup) { (cullGroup ? _flags.set(CULL_GROUP) : _flags.reset(CULL_GROUP)); }
bool isMetaCullGroup() const { return _flags[META_CULL_GROUP]; }
void setMetaCullGroup(bool cullGroup) { (cullGroup ? _flags.set(META_CULL_GROUP) : _flags.reset(META_CULL_GROUP)); }
bool isSubMetaCulled() const { return _flags[SUB_META_CULLED]; }
void setSubMetaCulled(bool metaCulled) { (metaCulled ? _flags.set(SUB_META_CULLED) : _flags.reset(SUB_META_CULLED)); }
bool isTag(Tag tag) const { return _flags[FIRST_TAG_BIT + tag]; }
uint8_t getTagBits() const { return ((_flags.to_ulong() & KEY_TAG_BITS_MASK) >> FIRST_TAG_BIT); }
@ -173,9 +176,6 @@ public:
bool isSmall() const { return _flags[__SMALLER]; }
void setSmaller(bool smaller) { (smaller ? _flags.set(__SMALLER) : _flags.reset(__SMALLER)); }
bool isMetaCulled() const { return _flags[__META_CULLED]; }
void setMetaCulled(bool metaCulled) { (metaCulled ? _flags.set(__META_CULLED) : _flags.reset(__META_CULLED)); }
bool operator==(const ItemKey& key) { return (_flags == key._flags); }
bool operator!=(const ItemKey& key) { return (_flags != key._flags); }
};
@ -232,11 +232,11 @@ public:
Builder& withoutLayered() { _value.reset(ItemKey::LAYERED); _mask.set(ItemKey::LAYERED); return (*this); }
Builder& withLayered() { _value.set(ItemKey::LAYERED); _mask.set(ItemKey::LAYERED); return (*this); }
Builder& withoutCullGroup() { _value.reset(ItemKey::CULL_GROUP); _mask.set(ItemKey::CULL_GROUP); return (*this); }
Builder& withCullGroup() { _value.set(ItemKey::CULL_GROUP); _mask.set(ItemKey::CULL_GROUP); return (*this); }
Builder& withoutMetaCullGroup() { _value.reset(ItemKey::META_CULL_GROUP); _mask.set(ItemKey::META_CULL_GROUP); return (*this); }
Builder& withMetaCullGroup() { _value.set(ItemKey::META_CULL_GROUP); _mask.set(ItemKey::META_CULL_GROUP); return (*this); }
Builder& withoutMetaCulled() { _value.reset(ItemKey::__META_CULLED); _mask.set(ItemKey::__META_CULLED); return (*this); }
Builder& withMetaCulled() { _value.set(ItemKey::__META_CULLED); _mask.set(ItemKey::__META_CULLED); return (*this); }
Builder& withoutSubMetaCulled() { _value.reset(ItemKey::SUB_META_CULLED); _mask.set(ItemKey::SUB_META_CULLED); return (*this); }
Builder& withSubMetaCulled() { _value.set(ItemKey::SUB_META_CULLED); _mask.set(ItemKey::SUB_META_CULLED); return (*this); }
Builder& withoutTag(ItemKey::Tag tagIndex) { _value.reset(ItemKey::FIRST_TAG_BIT + tagIndex); _mask.set(ItemKey::FIRST_TAG_BIT + tagIndex); return (*this); }
Builder& withTag(ItemKey::Tag tagIndex) { _value.set(ItemKey::FIRST_TAG_BIT + tagIndex); _mask.set(ItemKey::FIRST_TAG_BIT + tagIndex); return (*this); }

View file

@ -30,7 +30,7 @@ void RenderFetchCullSortTask::build(JobModel& task, const Varying& input, Varyin
const auto culledSpatialSelection = task.addJob<CullSpatialSelection>("CullSceneSelection", cullInputs, cullFunctor, RenderDetails::ITEM);
// Overlays are not culled
const ItemFilter overlayfilter = ItemFilter::Builder().withVisible().withoutMetaCulled().withTagBits(tagBits, tagMask);
const ItemFilter overlayfilter = ItemFilter::Builder().withVisible().withoutSubMetaCulled().withTagBits(tagBits, tagMask);
const auto nonspatialFilter = render::Varying(overlayfilter);
const auto nonspatialSelection = task.addJob<FetchNonspatialItems>("FetchOverlaySelection", nonspatialFilter);