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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added new call files
Karsten Schatz committed Aug 13, 2018
commit 943d66426d666ef76f6d9f665b5d372e6e445586
206 changes: 206 additions & 0 deletions core/include/mmcore/view/AbstractCallRender3D2000GT.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
/*
* AbstractCallRender3D2000GT.h
*
* Copyright (C) 2018 by Universitaet Stuttgart (VIS).
* Alle Rechte vorbehalten.
*/

#ifndef MEGAMOLCORE_ABSTRACTCALLRENDER3D2000GT_H_INCLUDED
#define MEGAMOLCORE_ABSTRACTCALLRENDER3D2000GT_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 "mmcore/BoundingBoxes.h"
#include "mmcore/factories/CallAutoDescription.h"
#include "mmcore/view/AbstractCallRender.h"
#include "mmcore/thecam/camera_snapshot.h"
#include "vislib/assert.h"
#include "vislib/SmartPtr.h"
#include "vislib/types.h"

namespace megamol {
namespace core {
namespace view {

/**
* New and improved base class of rendering graph calls
*
* Function "Render" tells the callee to render itself into the currently
* active opengl context (TODO: Later on it could also be a FBO).
*
* Function "GetExtents" asks the callee to fill the extents member of the
* call (bounding boxes, temporal extents).
*
* Function "GetCapabilities" asks the callee to set the capabilities
* flags of the call.
*/
class MEGAMOLCORE_API AbstractCallRender3D2000GT : public AbstractCallRender {
public:

/** Capability of rendering (must be present) */
static const UINT64 CAP_RENDER;

/** Capability to light the scene using the view-light */
static const UINT64 CAP_LIGHTING;

/** Capability to represent dynamic (time-varying) data */
static const UINT64 CAP_ANIMATION;

virtual ~AbstractCallRender3D2000GT(void);

/**
* Accesses the bounding boxes of the output of the callee. This can
* be called by the callee as answer to 'GetExtents'.
*
* @return The bounding boxes of the output of the callee.
*/
inline BoundingBoxes& AccessBoundingBoxes(void) {
return this->bboxs;
}

/**
* Sets the capability flags specified. This is to be set by the callee
* as answer to 'GetCapabilities'.
*
* @param cap The capability flags to be set. Can by any '|' (or)
* combination of the 'CAP_*' members.
*/
inline void AddCapability(UINT64 cap) {
this->capabilities |= cap;
}

/**
* Gets the bounding boxes of the output of the callee. This can
* be called by the callee as answer to 'GetExtents'.
*
* @return The bounding boxes of the output of the callee.
*/
inline const BoundingBoxes& GetBoundingBoxes(void) const {
return this->bboxs;
}

/**
* Gets the camera parameters pointer.
*
* @return The camera parameters pointer.
*/
//inline const vislib::SmartPtr<TODO>&
//GetCameraParameters(void) const {
// return this->camParams;
//}

/**
* Gets the capabilitie flags.
*
* @return The capabilitie flags.
*/
inline UINT64 GetCapabilities(void) const {
return this->capabilities;
}

/**
* Answers whether the specified capability flags are set.
*
* @param cap The requested capability flags. Can by any '|' (or)
* combination of the 'CAP_*' members.
*
* @return 'true' if all requested flags are set, 'false' otherwise.
*/
inline bool IsCapable(UINT64 cap) const {
return (this->capabilities & cap) == cap;
}

/**
* Unsets the capability flags specified. This is to be set by the
* callee as answer to 'GetCapabilities'.
*
* @param cap The capability flags to be set. Can by any '|' (or)
* combination of the 'CAP_*' members.
*/
inline void RemoveCapabilities(UINT64 cap) {
this->capabilities &= ~cap;
}

/**
* Sets the camera parameters pointer. These are to be set by the
* caller before calling 'Render'.
*
* @param camParams The new value for the camera parameters pointer.
*/
//inline void SetCameraParameters(const vislib::SmartPtr<
// vislib::graphics::CameraParameters>& camParams) {
// this->camParams = camParams;
//}

/**
* Sets the capabilities of the callee. This is to be set by the callee
* as answer to 'GetCapabilities'.
*
* @param cap The new capabilities value. Can by any '|' (or)
* combination of the 'CAP_*' members.
*/
inline void SetCapabilities(UINT64 cap) {
this->capabilities = cap;
}

/**
* Gets the number of milliseconds required to render the last frame.
*
* @return The time required to render the last frame
*/
inline double LastFrameTime(void) const {
return this->lastFrameTime;
}

/**
* Sets the number of milliseconds required to render the last frame.
*
* @param time The time required to render the last frame
*/
inline void SetLastFrameTime(double time) {
this->lastFrameTime = time;
}

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

protected:

/** Ctor. */
AbstractCallRender3D2000GT(void);

private:

#ifdef _WIN32
#pragma warning (disable: 4251)
#endif /* _WIN32 */
/** The camera parameters */
//vislib::SmartPtr<vislib::graphics::CameraParameters> camParams;
#ifdef _WIN32
#pragma warning (default: 4251)
#endif /* _WIN32 */

/** The bounding boxes */
BoundingBoxes bboxs;

/** The capabilities flags */
UINT64 capabilities;

/** The number of milliseconds required to render the last frame */
double lastFrameTime;
};

} /* end namespace view */
} /* end namespace core */
} /* end namespace megamol */


#endif /* MEGAMOLCORE_ABSTRACTCALLRENDER3D2000GT_H_INCLUDED */
Empty file.
Empty file.
Empty file.
4 changes: 3 additions & 1 deletion core/src/view/View3D2000GT.cpp
Original file line number Diff line number Diff line change
@@ -167,7 +167,9 @@ void view::View3D2000GT::DeserialiseCamera(vislib::Serialiser& serialiser) {
* View3D2000GT::Render
*/
void View3D2000GT::Render(const mmcRenderViewContext& context) {
// TODO implement
const float* bkgndCol = (this->overrideBkgndCol != nullptr) ? this->overrideBkgndCol : this->bkgndColour();
glClearColor(bkgndCol[0], bkgndCol[1], bkgndCol[2], 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}

/*