本文整理汇总了C++中TypedEntityPointer::getPulseProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ TypedEntityPointer::getPulseProperties方法的具体用法?C++ TypedEntityPointer::getPulseProperties怎么用?C++ TypedEntityPointer::getPulseProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypedEntityPointer
的用法示例。
在下文中一共展示了TypedEntityPointer::getPulseProperties方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doRenderUpdateSynchronousTyped
void ShapeEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
withWriteLock([&] {
auto userData = entity->getUserData();
if (_lastUserData != userData) {
_lastUserData = userData;
_procedural.setProceduralData(ProceduralData::parse(_lastUserData));
}
_shape = entity->getShape();
_pulseProperties = entity->getPulseProperties();
});
void* key = (void*)this;
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [this] () {
withWriteLock([&] {
auto entity = getEntity();
_position = entity->getWorldPosition();
_dimensions = entity->getUnscaledDimensions(); // get unscaled to avoid scaling twice
_orientation = entity->getWorldOrientation();
updateModelTransformAndBound();
_renderTransform = getModelTransform(); // contains parent scale, if this entity scales with its parent
if (_shape == entity::Sphere) {
_renderTransform.postScale(SPHERE_ENTITY_SCALE);
}
_renderTransform.postScale(_dimensions);
});;
});
}
示例2: needsRenderUpdateFromTypedEntity
bool ShapeEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const {
if (_lastUserData != entity->getUserData()) {
return true;
}
if (_color != entity->getColor()) {
return true;
}
if (_alpha != entity->getAlpha()) {
return true;
}
if (_shape != entity->getShape()) {
return true;
}
if (_dimensions != entity->getScaledDimensions()) {
return true;
}
if (_pulseProperties != entity->getPulseProperties()) {
return true;
}
return false;
}
示例3: needsRenderUpdateFromTypedEntity
bool GridEntityRenderer::needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const {
bool needsUpdate = resultWithReadLock<bool>([&] {
if (_color != entity->getColor()) {
return true;
}
if (_alpha != entity->getAlpha()) {
return true;
}
if (_followCamera != entity->getFollowCamera()) {
return true;
}
if (_majorGridEvery != entity->getMajorGridEvery()) {
return true;
}
if (_minorGridEvery != entity->getMinorGridEvery()) {
return true;
}
if (_pulseProperties != entity->getPulseProperties()) {
return true;
}
return false;
});
return needsUpdate;
}
示例4: doRenderUpdateSynchronousTyped
void GridEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) {
withWriteLock([&] {
_color = entity->getColor();
_alpha = entity->getAlpha();
_pulseProperties = entity->getPulseProperties();
_followCamera = entity->getFollowCamera();
_majorGridEvery = entity->getMajorGridEvery();
_minorGridEvery = entity->getMinorGridEvery();
});
void* key = (void*)this;
AbstractViewStateInterface::instance()->pushPostUpdateLambda(key, [this, entity]() {
withWriteLock([&] {
_dimensions = entity->getScaledDimensions();
updateModelTransformAndBound();
_renderTransform = getModelTransform();
});
});
}