mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-10 05:32:18 -06:00
Add ModelMatrix retrieval to WindowWrapper
This commit is contained in:
@@ -51,6 +51,7 @@ public:
|
||||
bool isRegularRendering() const override;
|
||||
|
||||
glm::mat4 viewProjectionMatrix() const override;
|
||||
glm::mat4 modelMatrix() const override;
|
||||
void setNearFarClippingPlane(float near, float far) override;
|
||||
|
||||
glm::ivec4 viewportPixelCoordinates() const override;
|
||||
|
||||
@@ -131,6 +131,13 @@ public:
|
||||
* \return The currently employed view-projection matrix
|
||||
*/
|
||||
virtual glm::mat4 viewProjectionMatrix() const;
|
||||
|
||||
/**
|
||||
* Returns the currently employed model matrix. On default, this method will return
|
||||
* the identity matrix.
|
||||
* \return The currently employed model matrix
|
||||
*/
|
||||
virtual glm::mat4 modelMatrix() const;
|
||||
|
||||
/**
|
||||
* Sets the near and far clipping planes of the rendering window. This method defaults
|
||||
|
||||
@@ -115,6 +115,10 @@ bool SGCTWindowWrapper::isRegularRendering() const {
|
||||
glm::mat4 SGCTWindowWrapper::viewProjectionMatrix() const {
|
||||
return sgct::Engine::instance()->getCurrentModelViewProjectionMatrix();
|
||||
}
|
||||
|
||||
glm::mat4 SGCTWindowWrapper::modelMatrix() const {
|
||||
return sgct::Engine::instance()->getModelMatrix();
|
||||
}
|
||||
|
||||
void SGCTWindowWrapper::setNearFarClippingPlane(float nearPlane, float farPlane) {
|
||||
sgct::Engine::instance()->setNearAndFarClippingPlanes(nearPlane, farPlane);
|
||||
|
||||
@@ -75,6 +75,10 @@ bool WindowWrapper::isRegularRendering() const {
|
||||
glm::mat4 WindowWrapper::viewProjectionMatrix() const {
|
||||
return glm::mat4(1.f);
|
||||
}
|
||||
|
||||
glm::mat4 WindowWrapper::modelMatrix() const {
|
||||
return glm::mat4(1.f);
|
||||
}
|
||||
|
||||
void WindowWrapper::setNearFarClippingPlane(float near, float far) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user