13 #ifndef hifi_SecondaryCamera_h
14 #define hifi_SecondaryCamera_h
16 #include <render/RenderFetchCullSortTask.h>
17 #include <TextureCache.h>
18 #include <ViewFrustum.h>
20 class SecondaryCameraJobConfig :
public render::Task::Config {
22 Q_PROPERTY(QUuid attachedEntityId MEMBER attachedEntityId NOTIFY dirty)
23 Q_PROPERTY(QUuid portalEntranceEntityId MEMBER portalEntranceEntityId NOTIFY dirty)
24 Q_PROPERTY(glm::vec3 position READ getPosition WRITE setPosition)
25 Q_PROPERTY(glm::quat orientation READ getOrientation WRITE setOrientation)
26 Q_PROPERTY(
float vFoV MEMBER vFoV NOTIFY dirty)
27 Q_PROPERTY(
float nearClipPlaneDistance MEMBER nearClipPlaneDistance NOTIFY dirty)
28 Q_PROPERTY(
float farClipPlaneDistance MEMBER farClipPlaneDistance NOTIFY dirty)
29 Q_PROPERTY(
bool mirrorProjection MEMBER mirrorProjection NOTIFY dirty)
30 Q_PROPERTY(
bool portalProjection MEMBER portalProjection NOTIFY dirty)
32 QUuid attachedEntityId;
33 QUuid portalEntranceEntityId;
35 glm::quat orientation;
36 float vFoV { DEFAULT_FIELD_OF_VIEW_DEGREES };
37 float nearClipPlaneDistance { DEFAULT_NEAR_CLIP };
38 float farClipPlaneDistance { DEFAULT_FAR_CLIP };
39 int textureWidth { TextureCache::DEFAULT_SPECTATOR_CAM_WIDTH };
40 int textureHeight { TextureCache::DEFAULT_SPECTATOR_CAM_HEIGHT };
41 bool mirrorProjection {
false };
42 bool portalProjection {
false };
44 SecondaryCameraJobConfig() : render::Task::Config(false) {}
48 glm::vec3 getPosition() {
return position; }
49 void setPosition(glm::vec3 pos);
50 glm::quat getOrientation() {
return orientation; }
51 void setOrientation(glm::quat orient);
52 void enableSecondaryCameraRenderConfigs(
bool enabled);
53 void resetSizeSpectatorCamera(
int width,
int height);
56 class SecondaryCameraRenderTaskConfig :
public render::Task::Config {
59 SecondaryCameraRenderTaskConfig() : render::Task::Config(false) {}
62 class SecondaryCameraRenderTask {
64 using Config = SecondaryCameraRenderTaskConfig;
65 using JobModel = render::Task::Model<SecondaryCameraRenderTask, Config>;
66 SecondaryCameraRenderTask() {}
67 void configure(
const Config& config) {}
68 void build(JobModel& task,
const render::Varying& inputs, render::Varying& outputs, render::CullFunctor cullFunctor);