summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Render/StudioRendererTranslation.h
diff options
context:
space:
mode:
authorMäättä Antti <antti.maatta@qt.io>2018-04-12 12:27:30 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-04-27 03:22:53 +0000
commitce587826578771e90dc99992c527c228090e8a24 (patch)
tree217f8fc22830530eb2e526ec9dc28c1322fc061d /src/Authoring/Studio/Render/StudioRendererTranslation.h
parent8a99aa395bf95bf7b5215f138400d7469d005da4 (diff)
Implement camera and lights perspective mode
Add visual representation for camera and lights. Add camera and light picking using billboards. Task-number: QT3DS-375 Task-number: QT3DS-376 Task-number: QT3DS-383 Change-Id: I36548a993aeeb44421a71d56248539687f2f3a68 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Render/StudioRendererTranslation.h')
-rw-r--r--src/Authoring/Studio/Render/StudioRendererTranslation.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.h b/src/Authoring/Studio/Render/StudioRendererTranslation.h
index 55ee6af0..b6219a55 100644
--- a/src/Authoring/Studio/Render/StudioRendererTranslation.h
+++ b/src/Authoring/Studio/Render/StudioRendererTranslation.h
@@ -41,6 +41,7 @@
#include "PathWidget.h"
#include "StudioPreferences.h"
#include "StudioGradientWidget.h"
+#include "StudioVisualAidWidget.h"
namespace qt3ds {
namespace studio {
@@ -378,10 +379,13 @@ namespace studio {
NVScopedRefCounted<qt3ds::widgets::IStudioWidget> m_ScaleWidget;
NVScopedRefCounted<qt3ds::widgets::IStudioWidget> m_LastRenderedWidget;
NVScopedRefCounted<qt3ds::widgets::SGradientWidget> m_GradientWidget;
+ NVScopedRefCounted<qt3ds::widgets::SVisualAidWidget> m_VisualAidWidget;
+
NVScopedRefCounted<qt3ds::widgets::IPathWidget> m_PathWidget;
NVScopedRefCounted<qt3ds::render::NVRenderTexture2D> m_PickBuffer;
Option<SPathAnchorDragInitialValue> m_LastPathDragValue;
nvvector<qt3ds::QT3DSU8> m_PixelBuffer;
+ nvvector<SGraphObjectTranslator *> m_editModeCamerasAndLights;
QT3DSF32 m_CumulativeRotation;
eastl::vector<qt3ds::render::SPGGraphObject *> m_GuideContainer;
qt3ds::foundation::SFastAllocator<> m_GuideAllocator;
@@ -426,7 +430,6 @@ namespace studio {
}
void DrawBoundingBox(SNode &inNode, QT3DSVec3 inColor);
- void DrawLightBoundingBox(SNode &inNode, QT3DSVec3 inColor);
void DrawChildBoundingBoxes(SNode &inNode)
{
@@ -458,13 +461,7 @@ namespace studio {
void DrawNonGroupBoundingBoxes(SGraphObjectTranslator &inTranslator)
{
SNode &theNode = static_cast<SNode &>(inTranslator.GetGraphObject());
- if (inTranslator.GetGraphObject().m_Type == GraphObjectTypes::Light) {
- ::CColor color = CStudioPreferences::GetLightBoundingBoxColor();
- QT3DSVec3 colorVec(color.GetRed() / 255.f,
- color.GetGreen() / 255.f,
- color.GetBlue() / 255.f);
- DrawLightBoundingBox(theNode, colorVec);
- } else if (inTranslator.GetGraphObject().m_Type != GraphObjectTypes::Layer) {
+ if (inTranslator.GetGraphObject().m_Type != GraphObjectTypes::Layer) {
::CColor color = CStudioPreferences::GetSingleBoundingBoxColor();
QT3DSVec3 colorVec(color.GetRed() / 255.f,
color.GetGreen() / 255.f,