...
 
Commits (2)
resources/icons/limb-view/view-fit.png

738 Bytes | W: | H:

resources/icons/limb-view/view-fit.png

376 Bytes | W: | H:

resources/icons/limb-view/view-fit.png
resources/icons/limb-view/view-fit.png
resources/icons/limb-view/view-fit.png
resources/icons/limb-view/view-fit.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -14,9 +14,9 @@
viewBox="0 0 55.35762 55.357621"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="view-fit.svg"
inkscape:export-filename="/mnt/Daten/Projekte/Bow-Simulator/Repositories/bow-simulator/resources/icons/view-fit.png"
inkscape:export-filename="/home/stefan/Desktop/Repositories/bow-simulator/resources/icons/limb-view/view-fit.png"
inkscape:export-xdpi="78.03804"
inkscape:export-ydpi="78.03804">
<defs
......@@ -44,21 +44,25 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9195959"
inkscape:cx="22.172211"
inkscape:cy="19.503179"
inkscape:zoom="11.2"
inkscape:cx="21.628694"
inkscape:cy="29.253121"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1013"
inkscape:window-height="1001"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid3724" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
......@@ -67,7 +71,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
......@@ -76,65 +80,29 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(-64.697271,-815.73534)">
<g
id="g4616"
transform="translate(14.000001,14.000001)">
<path
inkscape:connector-curvature="0"
id="path4136"
d="M 70.048421,821.10885 58.466254,809.52668"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4596"
d="m 57.289024,808.29299 0,11.42632 11.277276,-11.40148 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11282372px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0,1,-1,0,921.71879,765.06247)"
id="g4616-7">
<path
inkscape:connector-curvature="0"
id="path4136-5"
d="M 70.048421,821.10885 58.466254,809.52668"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path4596-3"
d="m 57.289024,808.29299 0,11.42632 11.277276,-11.40148 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11282372px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0,-1,1,0,-737.03808,921.79145)"
id="g4616-5">
<path
style="fill:none;stroke:#000000;stroke-width:4.6875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 75.009771,848.59296 v 10.3125 h 10.312501"
id="path3726"
inkscape:connector-curvature="0"
id="path4136-6"
d="M 70.048421,821.10885 58.466254,809.52668"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
sodipodi:nodetypes="ccc" />
<path
sodipodi:nodetypes="cccc"
style="fill:none;stroke:#000000;stroke-width:4.68749952;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 85.322271,828.90546 h -10.3125 v 10.3125"
id="path3726-3"
inkscape:connector-curvature="0"
id="path4596-2"
d="m 57.289024,808.29299 0,11.42632 11.277276,-11.40148 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11282372px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(-1,0,0,-1,170.73665,1672.8236)"
id="g4616-9">
sodipodi:nodetypes="ccc" />
<path
style="fill:none;stroke:#000000;stroke-width:4.68749952;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 110.63477,839.21796 v -10.3125 h -10.3125"
id="path3726-3-6"
inkscape:connector-curvature="0"
id="path4136-1"
d="M 70.048421,821.10885 58.466254,809.52668"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5.00000048;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
sodipodi:nodetypes="ccc" />
<path
sodipodi:nodetypes="cccc"
style="fill:none;stroke:#000000;stroke-width:4.68749952;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 100.32227,858.90546 h 10.3125 v -10.3125"
id="path3726-3-7"
inkscape:connector-curvature="0"
id="path4596-27"
d="m 57.289024,808.29299 0,11.42632 11.277276,-11.40148 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11282372px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
sodipodi:nodetypes="ccc" />
</g>
</svg>
resources/icons/limb-view/view-symmetric.png

484 Bytes | W: | H:

resources/icons/limb-view/view-symmetric.png

476 Bytes | W: | H:

resources/icons/limb-view/view-symmetric.png
resources/icons/limb-view/view-symmetric.png
resources/icons/limb-view/view-symmetric.png
resources/icons/limb-view/view-symmetric.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -14,9 +14,9 @@
viewBox="0 0 71.773902 71.7739"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="view-symmetric.svg"
inkscape:export-filename="/mnt/Daten/Projekte/Bow-Simulator/Repositories/bow-simulator/resources/icons/view-symmetric.png"
inkscape:export-filename="/home/stefan/Desktop/Repositories/bow-simulator/resources/icons/limb-view/view-symmetric.png"
inkscape:export-xdpi="60.189007"
inkscape:export-ydpi="60.189007">
<defs
......@@ -28,21 +28,25 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="33.635362"
inkscape:cy="33.403729"
inkscape:zoom="11.2"
inkscape:cx="39.541315"
inkscape:cy="39.629024"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showgrid="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1013"
inkscape:window-height="1001"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid843" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
......@@ -62,13 +66,7 @@
transform="translate(-56.604637,-807.62746)">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.465052,808.96353 0,12.78474"
id="path4151"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.489835,826.83716 0,5.30577"
d="m 92.229639,828.77636 v 5.30577"
id="path4153"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
......@@ -86,20 +84,26 @@
sodipodi:nodetypes="cccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.414309,854.65466 0,5.30577"
d="m 92.229639,853.15136 v 5.30577"
id="path4153-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.465051,836.76977 0,12.78474"
d="m 92.229639,837.71679 v 11.48259"
id="path4151-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.338783,865.30658 0,12.78474"
id="path4151-6-1"
d="m 92.229639,814.71386 0,10.3125"
id="path4151-6-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 92.229639,861.58886 0,10.3125"
id="path4151-6-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
......
......@@ -93,36 +93,27 @@ void LimbMesh::setData(const InputData& data)
{
QColor color = getLayerColor(data.layers[layer_indices[j]]);
// Top side (back)
if(j == 0)
addQuad(points_l_prev[j], points_r_prev[j], points_r_next[j], points_l_next[j], color);
// Bottom side (belly)
if(j == layer_indices.size() - 1)
addQuad(points_l_prev[j+1], points_l_next[j+1], points_r_next[j+1], points_r_prev[j+1], color);
// Limb start
if(i == 0)
{
addQuad(points_r_next[j], points_l_next[j], points_l_next[j+1], points_r_next[j+1], color);
}
addQuad(points_r_prev[j], points_l_prev[j], points_l_prev[j+1], points_r_prev[j+1], color);
// Limb end
if(i == n_sections - 1)
{
addQuad(points_r_next[j], points_r_next[j+1], points_l_next[j+1], points_l_next[j], color);
}
if(i > 0)
{
// Left
// Left side
addQuad(points_l_prev[j], points_l_next[j], points_l_next[j+1], points_l_prev[j+1], color);
// Right
// Right side
addQuad(points_r_prev[j], points_r_prev[j+1], points_r_next[j+1], points_r_next[j], color);
// Top
if(j == 0)
{
addQuad(points_l_prev[j], points_r_prev[j], points_r_next[j], points_l_next[j], color);
}
// Bottom
if(j == layer_indices.size() - 1)
{
addQuad(points_l_prev[j+1], points_l_next[j+1], points_r_next[j+1], points_r_prev[j+1], color);
}
}
}
}
}
......
......@@ -2,7 +2,6 @@
#include "LayerColors.hpp"
#include <QMouseEvent>
#include <QOpenGLShaderProgram>
#include <QCoreApplication>
LimbView::LimbView()
......@@ -30,19 +29,19 @@ LimbView::LimbView()
auto button2 = new QToolButton();
QObject::connect(button2, &QPushButton::clicked, this, &LimbView::view3D);
button2->setIcon(QIcon(":/icons/limb-view/view-3d"));
button2->setToolTip("3D view");
button2->setToolTip("Default view");
button2->setIconSize({32, 32});
auto button3 = new QToolButton();
QObject::connect(button3, &QPushButton::clicked, this, &LimbView::viewFit);
button3->setIcon(QIcon(":/icons/limb-view/view-fit"));
button3->setToolTip("Fit view");
button3->setToolTip("Reset zoom");
button3->setIconSize({32, 32});
auto button4 = new QToolButton();
QObject::connect(button4, &QToolButton::toggled, this, &LimbView::viewSymmetric);
button4->setIcon(QIcon(":/icons/limb-view/view-symmetric"));
button4->setToolTip("Show complete bow");
button4->setToolTip("Show second limb");
button4->setIconSize({32, 32});
button4->setCheckable(true);
......@@ -63,6 +62,7 @@ LimbView::LimbView()
vbox->addStretch();
vbox->addLayout(hbox);
// Initialize view parameters
viewSymmetric(false);
view3D();
}
......@@ -96,7 +96,7 @@ void LimbView::viewProfile()
void LimbView::viewTop()
{
rot_x = -90.0f;
rot_x = 90.0f;
rot_y = 0.0f;
viewFit();
}
......@@ -160,26 +160,34 @@ static const char *fragmentShaderSource =
"varying highp vec3 vertexNormal;\n"
"varying highp vec3 vertexColor;\n"
"uniform highp vec3 lightPosition;\n"
"uniform highp vec3 cameraPosition;\n"
"uniform highp float ambientStrength;\n"
"uniform highp float diffuseStrength;\n"
"uniform highp float specularStrength;\n"
"uniform highp float materialShininess;\n"
"void main() {\n"
" highp vec3 L = normalize(lightPosition - vertexPosition);\n"
" highp float NL = max(dot(normalize(vertexNormal), L), 0.0);\n"
" highp vec3 color = clamp(vertexColor*0.2 + vertexColor*0.8*NL, 0.0, 1.0);\n"
" gl_FragColor = vec4(color, 1.0);\n"
" highp vec3 normalDirection = normalize(vertexNormal);\n"
" highp vec3 lightDirection = normalize(lightPosition - vertexPosition);\n"
" highp vec3 viewDirection = normalize(cameraPosition - vertexPosition);\n"
" highp vec3 reflectDirection = reflect(-lightDirection, normalDirection);\n"
" highp float diffuse = max(dot(lightDirection, normalDirection), 0.0);\n"
" highp float specular = pow(max(dot(viewDirection, reflectDirection), 0.0), materialShininess);\n"
" highp vec3 result = (ambientStrength + diffuseStrength*diffuse + specularStrength*specular)*vertexColor;\n"
" gl_FragColor = vec4(result, 1.0);\n"
"}\n";
void LimbView::initializeGL()
{
// In this example the widget's corresponding top-level window can change
// several times during the widget's lifetime. Whenever this happens, the
// QOpenGLWidget's associated context is destroyed and a new one is created.
// Therefore we have to be prepared to clean up the resources on the
// aboutToBeDestroyed() signal, instead of the destructor. The emission of
// the signal will be followed by an invocation of initializeGL() where we
// can recreate all resources.
// Comment from the Qt "Hello GL2" example:
// In this example the widget's corresponding top-level window can change several times during the widget's lifetime.
// Whenever this happens, the QOpenGLWidget's associated context is destroyed and a new one is created.
// Therefore we have to be prepared to clean up the resources on the aboutToBeDestroyed() signal, instead of the destructor.
// The emission of the signal will be followed by an invocation of initializeGL() where we can recreate all resources.
connect(context(), &QOpenGLContext::aboutToBeDestroyed, this, &LimbView::cleanup);
initializeOpenGLFunctions();
glClearColor(0.2f, 0.3f, 0.4f, 1.0f);
glLineWidth(2.0f);
shader_program = new QOpenGLShaderProgram;
shader_program->addShaderFromSourceCode(QOpenGLShader::Vertex, vertexShaderSource);
......@@ -194,46 +202,31 @@ void LimbView::initializeGL()
loc_modelViewMatrix = shader_program->uniformLocation("modelViewMatrix");
loc_normalMatrix = shader_program->uniformLocation("normalMatrix");
loc_lightPosition = shader_program->uniformLocation("lightPosition");
loc_cameraPosition = shader_program->uniformLocation("cameraPosition");
loc_materialAmbient = shader_program->uniformLocation("ambientStrength");
loc_materialDiffuse = shader_program->uniformLocation("diffuseStrength");
loc_materialSpecular = shader_program->uniformLocation("specularStrength");
loc_materialShininess = shader_program->uniformLocation("materialShininess");
shader_program->setUniformValue(loc_lightPosition, LIGHT_POSITION);
shader_program->setUniformValue(loc_cameraPosition, CAMERA_POSITION);
shader_program->setUniformValue(loc_materialAmbient, MATERIAL_AMBIENT);
shader_program->setUniformValue(loc_materialDiffuse, MATERIAL_DIFFUSE);
shader_program->setUniformValue(loc_materialSpecular, MATERIAL_SPECULAR);
shader_program->setUniformValue(loc_materialShininess, MATERIAL_SHININESS);
shader_program->release();
// Create a vertex array object. In OpenGL ES 2.0 and OpenGL 2.x
// implementations this is optional and support may not be present
// at all. Nonetheless the below code works in all cases and makes
// sure there is a VAO when one is needed.
m_vao.create();
QOpenGLVertexArrayObject::Binder vaoBinder(&m_vao);
// Setup vertex buffer object and vertex attributes for right limb
// Setup vertex buffer object for left limb
limb_mesh_left_vbo.create();
limb_mesh_left_vbo.bind();
limb_mesh_left_vbo.allocate(limb_mesh_left.vertexData().data(), limb_mesh_left.vertexData().size()*sizeof(GLfloat));
/*
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(0*sizeof(GLfloat)));
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(3*sizeof(GLfloat)));
glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(6*sizeof(GLfloat)));
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glEnableVertexAttribArray(2);
*/
limb_mesh_left_vbo.release();
// Setup vertex buffer object and vertex attributes for right limb
// Setup vertex buffer object for right limb
limb_mesh_right_vbo.create();
limb_mesh_right_vbo.bind();
limb_mesh_right_vbo.allocate(limb_mesh_right.vertexData().data(), limb_mesh_right.vertexData().size()*sizeof(GLfloat));
/*
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(0*sizeof(GLfloat)));
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(3*sizeof(GLfloat)));
glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 9*sizeof(GLfloat), (void*)(6*sizeof(GLfloat)));
glEnableVertexAttribArray(0);
glEnableVertexAttribArray(1);
glEnableVertexAttribArray(2);
*/
limb_mesh_right_vbo.release();
// Set fixed light position
shader_program->setUniformValue(loc_lightPosition, QVector3D(0.0f, 0.0f, 50.0f));
shader_program->release();
}
void LimbView::paintGL()
......@@ -255,7 +248,7 @@ void LimbView::paintGL()
m_world.scale(1.0f/content_bounds.diagonal());
m_world.translate(-content_bounds.center());
m_camera.setToIdentity();
m_camera.translate(0.0f, 0.0f, -1.0f);
m_camera.translate(CAMERA_POSITION);
float aspect_ratio = float(this->height())/this->width();
m_projection.setToIdentity();
......@@ -265,8 +258,6 @@ void LimbView::paintGL()
( 0.5f*zoom + shift_y)*aspect_ratio,
0.001f, 100.0f);
QOpenGLVertexArrayObject::Binder vaoBinder(&m_vao);
shader_program->bind();
shader_program->setUniformValue(loc_projectionMatrix, m_projection);
shader_program->setUniformValue(loc_modelViewMatrix, m_camera*m_world);
......
......@@ -2,25 +2,33 @@
#include "bow/input/InputData.hpp"
#include "LimbMesh.hpp"
#include "LayerLegend.hpp"
#include <QtWidgets>
#include <QOpenGLWidget>
#include <QOpenGLFunctions>
#include <QOpenGLShaderProgram>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
#include <QMatrix4x4>
QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram)
// This widget was based on Qt's "Hello GL2" example: http://doc.qt.io/qt-5/qtopengl-hellogl2-example.html
// Uses the Phong lighting model as described here: https://learnopengl.com/Lighting/Basic-Lighting
// Based on Qt's "Hello GL2" example, http://doc.qt.io/qt-5/qtopengl-hellogl2-example.html
class LimbView: public QOpenGLWidget, protected QOpenGLFunctions
{
private:
const float DEFAULT_ROT_X = 20.0f; // Magic number
const float DEFAULT_ROT_Y = -30.0f; // Magic number
const float DEFAULT_ZOOM = 1.1f; // Magic number
const float ZOOM_SPEED = 0.2f; // Magic number
const float ROT_SPEED = 0.15f; // Magic number
const QVector3D LIGHT_POSITION = {0.0f, 1.0f, 10.0f};
const QVector3D CAMERA_POSITION = {0.0f, 0.0f, -1.5f};
const float MATERIAL_AMBIENT = 0.2f;
const float MATERIAL_DIFFUSE = 0.8f;
const float MATERIAL_SPECULAR = 0.1f;
const float MATERIAL_SHININESS = 8.0f;
const float DEFAULT_ROT_X = 31.0f; // Trimetric view
const float DEFAULT_ROT_Y = -28.0f; // Trimetric view
const float DEFAULT_ZOOM = 1.05f;
const float ZOOM_SPEED = 0.2f;
const float ROT_SPEED = 0.15f;
public:
LimbView();
......@@ -46,7 +54,6 @@ private:
LayerLegend* legend;
LimbMesh limb_mesh_left;
LimbMesh limb_mesh_right;
QOpenGLVertexArrayObject m_vao;
QOpenGLBuffer limb_mesh_left_vbo;
QOpenGLBuffer limb_mesh_right_vbo;
......@@ -55,6 +62,11 @@ private:
int loc_modelViewMatrix;
int loc_normalMatrix;
int loc_lightPosition;
int loc_cameraPosition;
int loc_materialAmbient;
int loc_materialDiffuse;
int loc_materialSpecular;
int loc_materialShininess;
QMatrix4x4 m_projection;
QMatrix4x4 m_camera;
......