Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New MegaMol Camera #213

Merged
merged 148 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
eb1df96
added new dummy View3D module
Aug 8, 2018
2b72203
implemented some additonal methods
Aug 8, 2018
16686f4
made the new view visible to the configurator
Aug 8, 2018
046e926
incorporated all necessary files of christophs camera and all necessa…
Aug 10, 2018
ab32a5f
namespace galore
Aug 10, 2018
ab9489a
remove unnecessary includes
Aug 10, 2018
70982ff
Merge remote-tracking branch 'upstream/master-dev' into newcam
Aug 10, 2018
d5a243a
added .inl files to the VS solution
Aug 10, 2018
943d664
Added new call files
Aug 13, 2018
4062cb4
fixed several template-related compile errors
Aug 15, 2018
e897219
propagated changes for a working arcball
Aug 20, 2018
8a0e3f1
added renderer dummy for a new CartoonTesssellationRenderer#
Aug 20, 2018
6ba33bf
Merge remote-tracking branch 'upstream/master-dev' into newcam
Aug 20, 2018
5c8f126
added shader program for the bounding box
Aug 20, 2018
1ff36e0
Connection of new rendering modules now possible, but not functional
Aug 21, 2018
533d3a5
Merge remote-tracking branch 'upstream/master-dev' into newcam
Aug 24, 2018
3ed8e1b
removed Watermark functionality from new View3D
Aug 25, 2018
d3124c7
Removed frozen values from new View3D
Aug 25, 2018
f172c8f
removed remainders of the old camera from the new view
Aug 25, 2018
5403e44
Merge remote-tracking branch 'upstream/master-dev' into newcam
Aug 28, 2018
0da6bee
Added OpenGL helper classes from invor/glowl. Currently not fitting t…
Aug 29, 2018
839564e
clang formatting of the new classes
Aug 29, 2018
033868d
namespace galore
Aug 30, 2018
13ff455
Merge remote-tracking branch 'upstream/master-dev' into newcam
Aug 31, 2018
6c88912
fixed missing <memory> include. Better include name tags
Aug 31, 2018
39adb18
comment galore part I
Aug 31, 2018
d6f3bb4
Added all the comments
Sep 1, 2018
d34e721
Renamed all relevant modules
Sep 2, 2018
10d9b42
Merge remote-tracking branch 'upstream/master-dev' into newcam
Sep 4, 2018
08b7578
Added missing file from last commit
Sep 4, 2018
66056f6
fixed renaming bug
Sep 4, 2018
2112e98
renderer progress
Sep 5, 2018
0d54c7e
Merge remote-tracking branch 'upstream/master-dev' into newcam
Sep 7, 2018
f6efa5c
Fixed function count issue
Sep 10, 2018
f566c20
Merge remote-tracking branch 'upstream/master-dev' into newcam
Sep 14, 2018
d6bff22
lazy init for Michaels FBO
Sep 17, 2018
fef6300
added missing include
Sep 18, 2018
81f31b4
Merge remote-tracking branch 'upstream/master-dev' into newcam
Sep 23, 2018
76142af
Merge remote-tracking branch 'upstream/master-dev' into newcam
Sep 24, 2018
68f99ba
Merge remote-tracking branch 'upstream/master-dev' into newcam
Oct 4, 2018
0d0feef
Merge remote-tracking branch 'upstream/master-dev' into newcam
Oct 6, 2018
af115b8
fixed destruction issue in CinematicView
Oct 7, 2018
d36439d
made the new view compile again
Oct 7, 2018
f3c666d
added a second version of the SimplestSphereRenderer to test the new …
Oct 7, 2018
8796fb1
newcam progress
Oct 8, 2018
e71a7e3
Merge remote-tracking branch 'upstream/master-dev' into newcam
Oct 9, 2018
8596b56
added new abstractView class
Oct 15, 2018
3a77523
Merge remote-tracking branch 'upstream/master-dev' into newcam
Oct 30, 2018
bd18d36
incorporated christophs new interaction
Nov 1, 2018
162c9b0
Merge remote-tracking branch 'upstream/master-dev' into newcam
Nov 24, 2018
51c5ee6
Fixed compilation errors using the new camera
Nov 24, 2018
a4d9d71
Merge remote-tracking branch 'upstream/master-dev' into newcam
Nov 29, 2018
c3cf587
fixed glm include issues with new core CMakeLists.txt
Nov 29, 2018
1b4b3de
introduced new namespace for the new stuff
Nov 29, 2018
c5ced74
Merge remote-tracking branch 'upstream/master-dev' into newcam
Dec 8, 2018
b765a81
Added camera class stub.
Dec 9, 2018
941dd80
Merge remote-tracking branch 'upstream/master-dev' into newcam
Dec 9, 2018
622c3b8
camera stuff
Dec 18, 2018
b38076e
Merge remote-tracking branch 'upstream/master-dev' into newcam
Dec 22, 2018
5dba192
Added missing camera functions
Dec 27, 2018
48cad65
added new class for bounding boxes
Dec 31, 2018
dc5af49
clipping plane computation
Jan 3, 2019
7d474d3
Merge remote-tracking branch 'upstream/master-dev' into newcam
Jan 8, 2019
9ba8ab2
Renaming of RenderOutput
Jan 28, 2019
cf3406c
Merge remote-tracking branch 'upstream/master-dev' into newcam
Jan 28, 2019
802236a
Integrated camera state into rendering call. DOES NOT COMPILE because…
Jan 29, 2019
b532145
Fixed dll export error for static class members
Jan 30, 2019
f605a85
Camera parameters are now propagated to the renderers
Jan 31, 2019
6d4245a
Call propagation progress
Feb 1, 2019
c66be7c
Merge remote-tracking branch 'upstream/master-dev' into newcam
Feb 1, 2019
b6d4f93
Revamped callback structure of the RendererModule to allow chained re…
Feb 5, 2019
8d92b35
Passthrough of camera values to the renderer works
Feb 6, 2019
246a597
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Feb 8, 2019
05cc79e
fixed camera state transfer
Feb 17, 2019
21125b6
view frustum top is now above its bottom
Feb 19, 2019
390ecbf
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Feb 24, 2019
0d7963a
MegaMol does not close anymore when pressing 'q'
Feb 25, 2019
c517fd0
Keyboard camera interaction revamped
Feb 25, 2019
2bf2f09
First images work
Feb 25, 2019
608a188
Merge remote-tracking branch 'origin/newcam_progress' into newcam_pro…
Feb 25, 2019
a9fabe2
Added dummy BoundingBoxRenderer
Feb 25, 2019
1a73e2f
Removed unnecessary Cursor2D
Feb 26, 2019
cf48cc6
Revert "Removed unnecessary Cursor2D"
Feb 26, 2019
2e10a6f
Auto stash before revert of "Removed unnecessary Cursor2D"
Feb 26, 2019
728fe87
First prototype of arcball manipulation (horrible)
Feb 26, 2019
5832aa4
Added dummy files for the rotate manipulator
Feb 26, 2019
1839553
Prototype of rotate manipulator
Feb 26, 2019
63e5146
Fixed camera rotation
Feb 27, 2019
c09fe43
Added config value for arcball
Feb 27, 2019
ec1b8be
Smoother camera movement
Feb 27, 2019
5acdacb
Chained calls work now somewhat
Feb 27, 2019
a165266
Included .inl files of the camera in the solution
Feb 27, 2019
14a4168
Revamped structure of the BoundingBoxRenderer
Feb 27, 2019
d225448
Bounding box rendering works
Feb 28, 2019
9e0314f
Mouse-steered camera rotation
Feb 28, 2019
6654c51
Nested bounding boxes
Feb 28, 2019
8488746
Removed bounding box rendering remainders from View3D_2
Feb 28, 2019
1f3c0cd
Camera save feature
Mar 1, 2019
d1803fc
Made the bounding box line smoothing optional
Mar 1, 2019
30896d3
Replaced c-style arrays with std::arrays to make serialization easier
Mar 2, 2019
867d912
Added nlohmann/json as dependency for json generation and parsing
Mar 3, 2019
c631261
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Mar 4, 2019
fe97806
Fixes for the new key input paradigm
Mar 4, 2019
10a37e4
Fixed key input paradigm for new camera related files
Mar 4, 2019
e512486
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Mar 4, 2019
a641484
Smoother modkey pressing mechanism for View3D_2
Mar 4, 2019
322ef75
Merge remote-tracking branch 'origin/newcam_progress' into newcam_pro…
Mar 4, 2019
dc26cba
Method defintions for the CameraSerializer
Mar 5, 2019
2439a22
Method defintions for the CameraSerializer
Mar 5, 2019
4eecfc7
Merge remote-tracking branch 'origin/newcam_progress' into newcam_pro…
Mar 5, 2019
cacd0e9
Camera serialization
Mar 5, 2019
9fade97
Camera deserialization
Mar 5, 2019
2bff88c
First non-trivial renderer compatible with new camera (lights missing)
Mar 5, 2019
d7ff045
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Mar 6, 2019
3a07e21
Removed unnecessary stuff from View3D_2
Mar 12, 2019
6799080
Moved OSPRay light sources to the core.
Mar 12, 2019
85eb234
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Mar 15, 2019
0dbf965
Usage of light sources in new renderers now possible
Mar 16, 2019
9fad1ca
some arcball fixes
Mar 23, 2019
51f21f1
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Apr 1, 2019
e6a1c64
GUIRenderer now capable of handling new render calls
Apr 2, 2019
8bfac8c
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Apr 2, 2019
9db6ea4
Fixed merge error
Apr 2, 2019
333475f
GUI renderer format
Apr 3, 2019
66b711f
Fixed key handling with active GUI
Apr 3, 2019
1c1e539
Fixed error handling in the CameraSerializer
Apr 3, 2019
5519dab
Load & Store of camera into param string
Apr 3, 2019
784d2e5
SphereColoringModule now using ColorParams instead of Vec4f
Apr 4, 2019
da1b690
Correct movement of the arcball rotation center
Apr 5, 2019
e578ca8
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Apr 7, 2019
e9f3c37
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Apr 17, 2019
a5ddb93
Fixed error from last merge
Apr 17, 2019
c53819b
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
May 2, 2019
99d7181
Esc and Home button fix with no GUIRenderer attached
May 3, 2019
74d03a9
CallLight is now correctly exposed again
May 3, 2019
55a5456
New arcball structure
May 3, 2019
0c81a10
Merge remote-tracking branch 'upstream/master-dev' into newcam_progress
Jun 3, 2019
1d4b36f
OnRenderView no propagates the rendering call
Jun 3, 2019
f0e0850
Merge remote-tracking branch 'upstream/master-dev' into newcam
Jun 25, 2019
f1d1df6
Fixed permissive- compile errors
Jun 26, 2019
d1e69cb
Deactivated console FPS message
Jun 28, 2019
33e4329
Fixed steering after camera loading
Jun 28, 2019
5deeb04
Indentation
Jul 10, 2019
6a49040
Merge remote-tracking branch 'upstream/master-dev' into newcam
Jul 10, 2019
50607b6
Merge remote-tracking branch 'upstream/master-dev' into newcam
Jul 10, 2019
9d0ffe6
Better arcball than before, fix later
Jul 10, 2019
7300130
Merge branch 'master-dev' into newcam
tobiasrau Jul 12, 2019
453f4a8
now compiles with gcc
tobiasrau Jul 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion configurator/MegaMolConf/Data/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public bool IsViewModule {
|| Name.Equals("AnaglyphStereoView")
|| Name.Equals("TileView3D")
|| Name.Equals("RemoteTileView")
|| Name.Equals("HeadView");
|| Name.Equals("HeadView")
|| Name.Equals("View3D_2");
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion console/extra/megamolconfig.lua.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ mmSetConfigValue("*-window", "x5y35w1280h720")
mmSetConfigValue("consolegui", "on")
mmSetConfigValue("topmost", "off")
mmSetConfigValue("fullscreen", "off")
mmSetConfigValue("vsync", "off")
mmSetConfigValue("vsync", "off")
mmSetConfigValue("arcball", "off")
2 changes: 1 addition & 1 deletion console/src/gl/WindowEscapeHotKeysUILayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace megamol {
namespace console {
namespace gl {

/** Utility class closing a window when ESC (or 'q') is pressed */
/** Utility class closing a window when ESC is pressed */
class WindowEscapeHotKeysUILayer : public AbstractUILayer {
public:
WindowEscapeHotKeysUILayer(Window& wnd);
Expand Down
3 changes: 2 additions & 1 deletion console/src/utility/HotFixFileName.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace megamol {
namespace console {
namespace utility {

/** Utility class closing a window when ESC (or 'q') is pressed */
/** Utility class closing a window when ESC is pressed */
class HotFixFileName : public AbstractUILayer {
public:
HotFixFileName(void* hCore);
Expand All @@ -25,3 +25,4 @@ namespace utility {
}
}
}

4 changes: 3 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ if(BUILD_CORE)
include(GNUInstallDirs)
set(ZFP_LIB "${CMAKE_INSTALL_LIBDIR}/libzfp.a")
endif()

add_external_project(zfp_ext
GIT_REPOSITORY https://github.com/LLNL/zfp.git
GIT_TAG "0.5.2"
Expand All @@ -155,7 +156,8 @@ if(BUILD_CORE)
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND "")
TEST_COMMAND ""
CMAKE_ARGS -DGLM_TEST_ENABLE=OFF)
add_external_library(glm INTERFACE
DEPENDS glm_ext
INCLUDE_DIR "src/glm_ext/")
Expand Down
37 changes: 37 additions & 0 deletions core/Shaders/boundingbox.btf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<btf type="MegaMolGLSLShader" version="1.0" namespace="boundingbox">
<include file="common"/>
<shader name="vertex">
<snippet type="version">330</snippet>
<snippet type="string">
<!--
layout(location = 0) in vec3 in_position;

uniform vec3 bbMin;
uniform vec3 bbMax;
uniform mat4 mvp;

void main(void) {
float x = (in_position.x < 0.0) ? bbMin.x : bbMax.x;
float y = (in_position.y < 0.0) ? bbMin.y : bbMax.y;
float z = (in_position.z < 0.0) ? bbMin.z : bbMax.z;
gl_Position = mvp * vec4(x, y, z, 1.0);
}
-->
</snippet>
</shader>
<shader name="fragment">
<snippet type="version">330</snippet>
<snippet type="string">
<!--
layout(location = 0) out vec4 frag_color;

uniform vec3 color = vec3(1.0);

void main(void) {
frag_color = vec4(color, 1.0);
}
-->
</snippet>
</shader>
</btf>
37 changes: 37 additions & 0 deletions core/Shaders/lines.btf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<btf type="MegaMolGLSLShader" version="1.0" namespace="lines">
<include file="common"/>
<shader name="vertex">
<snippet type="version">330</snippet>
<snippet type="string">
<!--
layout(location = 0) in vec3 in_position;
layout(location = 1) in vec3 in_color;

uniform mat4 view = mat4(1.0);
uniform mat4 proj = mat4(1.0);

out vec3 color;

void main(void) {
color = in_color;
gl_Position = proj * view * vec4(in_position, 1.0);
}
-->
</snippet>
</shader>
<shader name="fragment">
<snippet type="version">330</snippet>
<snippet type="string">
<!--
layout(location = 0) out vec4 frag_color;

in vec3 color;

void main(void) {
frag_color = vec4(color, 1.0);
}
-->
</snippet>
</shader>
</btf>
217 changes: 217 additions & 0 deletions core/include/mmcore/BoundingBoxes_2.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
/*
* BoundingBoxes_2.h
*
* Copyright (C) 2018-2019 by VISUS (Universitaet Stuttgart)
* Alle Rechte vorbehalten.
*/

#ifndef MEGAMOLCORE_BOUNDINGBOXES_2_H_INCLUDED
#define MEGAMOLCORE_BOUNDINGBOXES_2_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */

#include "mmcore/api/MegaMolCore.std.h"
#include "vislib/math/Cuboid.h"
#include "mmcore/BoundingBoxes.h"

namespace megamol {
namespace core {

/**
* New variant of the Bounding Box class. The determination between object space and world space
* has been removed. Therefore, the scale value is now neither necessary nor wanted.
*
*/
class MEGAMOLCORE_API BoundingBoxes_2 {
public:

/**
* Constructor
*/
BoundingBoxes_2(void);

/**
* Copy Constructor
*
* @param src The object to clone from
*/
BoundingBoxes_2(const BoundingBoxes_2& src);

/**
* Destructor
*/
virtual ~BoundingBoxes_2(void);

/**
* Clears all members to invalid bounding boxes and a scale of zero.
*/
inline void Clear(void) {
this->clipBoxValid = false;
this->boundingBoxValid = false;
}

/**
* Safely answers the best match for a clipping box. It will use the
* first valid box from this sequence: world space clipping box,
* world space bounding box, object space clipping box, object space
* bounding box. If all four boxes are invalid it will return a dummy
* box (-1, -1, -1) ... (1, 1, 1).
*
* @return The best match for a clipping bounding box.
*/
inline const vislib::math::Cuboid<float>& ClipBox(void) const {
if (!this->clipBoxValid) {
this->calcClipBox();
}
return this->clipBox;
}

/**
* Answer whether any of the boxes is valid
*
* @return True if any of the boxes is valid
*/
inline bool IsAnyValid(void) const {
return this->clipBoxValid || this->boundingBoxValid;
}

/**
* Answer whether or not the bounding box is valid.
*
* @return True if the bounding box is valid
*/
inline bool IsBoundingBoxValid(void) const {
return this->boundingBoxValid;
}

/**
* Answer whether or not the clipping box is valid.
*
* @return True if the clipping box is valid
*/
inline bool IsClipBoxValid(void) const {
return this->clipBoxValid;
}

/**
* Answer the bounding box
*
* @return The bounding box
*/
inline const vislib::math::Cuboid<float>& BoundingBox(void) const {
return this->boundingBox;
}

/**
* Sets the bounding box.
*
* @param box The new bounding box
*/
inline void SetBoundingBox(const vislib::math::Cuboid<float>& box) {
this->boundingBox = box;
this->boundingBoxValid = true;
this->clipBoxValid = false;
}

/**
* Sets the bounding box.
*
* @param left The x-coordinate of the left/bottom/back point.
* @param bottom The y-coordinate of the left/bottom/back point.
* @param back The z-coordinate of the left/bottom/back point.
* @param right The x-coordinate of the right/top/front point.
* @param top The y-coordinate of the right/top/front point.
* @param front The z-coordinate of the right/top/front point.
*/
inline void SetBoundingBox(const float& left, const float& bottom,
const float& back, const float& right, const float& top,
const float& front) {
this->boundingBox.Set(left, bottom, back, right, top, front);
this->boundingBoxValid = true;
this->clipBoxValid = false;
}

/**
* Sets the object space clipping box.
*
* @param box The new object space clipping box
*/
inline void SetClipBox(const vislib::math::Cuboid<float>& box) {
this->clipBox = box;
this->clipBoxValid = true;
}

/**
* Sets the clipping box.
*
* @param left The x-coordinate of the left/bottom/back point.
* @param bottom The y-coordinate of the left/bottom/back point.
* @param back The z-coordinate of the left/bottom/back point.
* @param right The x-coordinate of the right/top/front point.
* @param top The y-coordinate of the right/top/front point.
* @param front The z-coordinate of the right/top/front point.
*/
inline void SetClipBox(const float& left, const float& bottom,
const float& back, const float& right, const float& top,
const float& front) {
this->clipBox.Set(left, bottom, back, right, top, front);
this->clipBoxValid = true;
}

/**
* Test for equality
*
* @param rhs The right hand side operand
*
* @return True if 'this' and 'rhs' are equal
*/
bool operator==(const BoundingBoxes_2& rhs) const;

/**
* Assignment operator
*
* @param rhs The right hand side operand
*
* @return A reference to this.
*/
BoundingBoxes_2& operator=(const BoundingBoxes_2& rhs);

/**
* Assignment operator for the old bounding box object to achieve backwards compatibility.
*
* @param rhs The right hand side operand
*
* @return A reference to this.
*/
BoundingBoxes_2& operator=(const BoundingBoxes& rhs);
private:

/**
* Calculate the composed clipping box.
*/
void calcClipBox(void) const;

#ifdef _WIN32
#pragma warning (disable: 4251)
#endif
/** The composed clipping box */
mutable vislib::math::Cuboid<float> clipBox;

/** The valid flag for the composed clipping box */
mutable bool clipBoxValid;

/** The bounding box */
vislib::math::Cuboid<float> boundingBox;

/** The valid flag for the bounding box */
bool boundingBoxValid;
#ifdef _WIN32
#pragma warning (default: 4251)
#endif
};
}
}


#endif /* MEGAMOLCORE_BOUNDINGBOXES_2_H_INCLUDED */
5 changes: 5 additions & 0 deletions core/include/mmcore/LuaState.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ namespace utility {
*/
bool StateOk();

/**
* Answers the current project file path
*/
std::string GetScriptPath(void);

// ************************************************************
// Lua interface routines, published to Lua as mm<name>
// ************************************************************
Expand Down
Loading