Fix INCA, closes issue #9

Camera stubs
This commit is contained in:
Phillip Stephens 2016-01-17 14:41:49 -08:00
parent 2b01035064
commit adf31e36d1
7 changed files with 47 additions and 4 deletions

View File

@ -673,6 +673,7 @@ def make_pass_inca():
new_grp.links.new(grp_in.outputs[0], add1.inputs[1])
new_grp.links.new(grp_in.outputs[2], add1.inputs[2])
new_grp.links.new(add1.outputs[0], grp_out.inputs[0])
new_grp.links.new(grp_in.outputs[1], grp_out.inputs[1])
grp_out.inputs[1].default_value = 1.0
# Reflection Map

View File

@ -63,6 +63,9 @@ void MaterialSet::ConstructMaterial(Stream& out,
material.header.flags.shadowOccluderMesh() ? "True" : "False");
/* TODO: Some models enable both of these flags at once, why?
* And how do we handle this properly?
*/
/* Blend factors */
if (material.header.flags.additiveBlending())
out << "new_material.game_settings.alpha_blend = 'ADD'\n"

View File

@ -26,7 +26,8 @@ add_executable(urde WIN32
ResourceBrowser.hpp ResourceBrowser.cpp atdna_ResourceBrowser.cpp
ModelViewer.hpp ModelViewer.cpp atdna_ModelViewer.cpp
ProjectManager.hpp ProjectManager.cpp
ViewManager.hpp ViewManager.cpp)
ViewManager.hpp ViewManager.cpp
Camera.hpp Camera.cpp)
target_link_libraries(urde
UrdeLocales

0
Editor/Camera.cpp Normal file
View File

36
Editor/Camera.hpp Normal file
View File

@ -0,0 +1,36 @@
#ifndef URDE_CAMERA_HPP
#define URDE_CAMERA_HPP
#include <CProjection.hpp>
#include <CFrustum.hpp>
#include <CQuaternion.hpp>
#include <CVector3f.hpp>
#include <Math.hpp>
namespace URDE
{
class Camera
{
Zeus::CFrustum m_frustum;
Zeus::CProjection m_projection;
Zeus::CVector3f m_position;
Zeus::CQuaternion m_orientation;
public:
Camera(const Zeus::CVector3f& position, Zeus::EProjType projType=Zeus::EProjType::Perspective,
const Zeus::CVector3f& up=Zeus::Math::kUpVec)
: m_position(position)
{
}
const Zeus::CMatrix4f& projectionMatrix() const { return m_projection.getCachedMatrix(); }
const Zeus::CProjection& projection() const { return m_projection; }
virtual void think()
{
}
};
}
#endif // URDE_CAMERA_HPP

View File

@ -22,14 +22,16 @@ class ModelViewer : public Space
Value<Mode> renderMode = Mode::Material;
Value<Zeus::CVector3f> cameraPosition;
Value<Zeus::CQuaternion> cameraOrientation;
} m_state;
const Space::State& spaceState() const { return m_state; }
struct View : Specter::View
{
Zeus::CProjection m_cameraProjection;
};
virtual Specter::View* buildContentView(Specter::ViewResources& res)
{
return nullptr;

@ -1 +1 @@
Subproject commit c5dd30dd7d072666956050b5d5bfa4c325d18f56
Subproject commit 5e2800b1bd316b6859c5b913b8e228f2c135424a