History

Cleanup

Zach Fox committed 9 years ago

Commit f765b411 parent 57692d21 file · +6 −6Browse files

Showing the changes to interface/src/SecondaryCamera.cpp (1 of 1 file). Show all

Unified · Split

interface/src/SecondaryCamera.cpp+6−6
@@ -47,11 +47,16 @@ class BeginSecondaryCameraFrame { // Changes renderContext for our framebuffer · 46 unmodified lines
4747 float _vFoV{};
4848 float _nearClipPlaneDistance{};
4949 float _farClipPlaneDistance{};
50+ EntityPropertyFlags _attachedEntityPropertyFlags;
51+ QSharedPointer<EntityScriptingInterface> _entityScriptingInterface;
5052 public:
5153 using Config = BeginSecondaryCameraFrameConfig;
5254 using JobModel = render::Job::ModelO<BeginSecondaryCameraFrame, RenderArgsPointer, Config>;
5355 BeginSecondaryCameraFrame() {
5456 _cachedArgsPointer = std::make_shared<RenderArgs>(_cachedArgs);
57+ _entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
58+ _attachedEntityPropertyFlags += PROP_POSITION;
59+ _attachedEntityPropertyFlags += PROP_ROTATION;
5560 }
5661
5762 void configure(const Config& config) {
@@ -87,12 +92,7 @@ public: · 29 unmodified lines
8792
8893 auto srcViewFrustum = args->getViewFrustum();
8994 if (_attachedEntityId != QUuid()) {
90− auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
91− EntityPropertyFlags entityPropertyFlags;
92− entityPropertyFlags += PROP_POSITION;
93− entityPropertyFlags += PROP_ROTATION;
94− EntityItemProperties entityProperties = entityScriptingInterface->getEntityProperties(_attachedEntityId, entityPropertyFlags);
95−
95+ EntityItemProperties entityProperties = _entityScriptingInterface->getEntityProperties(_attachedEntityId, _attachedEntityPropertyFlags);
9696 srcViewFrustum.setPosition(entityProperties.getPosition());
9797 srcViewFrustum.setOrientation(entityProperties.getRotation());
9898 } else {