git-svn-id: svn://db.shs.com.ru/libs@694 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -215,33 +215,6 @@ void QGLViewWindow::view_keyEvent(Qt::Key k, Qt::KeyboardModifiers m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void QGLViewWindow::on_actionAdd_plane_triggered() {
|
|
||||||
ObjectBase * o = new ObjectBase(Primitive::plane());
|
|
||||||
o->setName("plane");
|
|
||||||
view->addObject(o->clone());
|
|
||||||
delete o;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QGLViewWindow::on_actionAdd_cube_triggered() {
|
|
||||||
ObjectBase * o = new ObjectBase(Primitive::cube());
|
|
||||||
o->setName("cube");
|
|
||||||
view->addObject(o->clone());
|
|
||||||
delete o;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QGLViewWindow::on_actionAdd_sphere_triggered() {
|
|
||||||
int seg_xy = 16, seg_z = 16;
|
|
||||||
seg_xy = QInputDialog::getInt(this, "New sphere", "XY segments:", seg_xy, 1, 200);
|
|
||||||
seg_z = QInputDialog::getInt(this, "New sphere", "Z segments:", seg_z , 1, 200);
|
|
||||||
ObjectBase * o = new ObjectBase(Primitive::ellipsoid(seg_xy, seg_z));
|
|
||||||
o->setName("sphere");
|
|
||||||
view->addObject(o->clone());
|
|
||||||
delete o;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void QGLViewWindow::on_actionArrow_triggered(bool on) {
|
void QGLViewWindow::on_actionArrow_triggered(bool on) {
|
||||||
actionArrow ->setChecked(true);
|
actionArrow ->setChecked(true);
|
||||||
actionMove ->setChecked(false);
|
actionMove ->setChecked(false);
|
||||||
|
|||||||
@@ -95,10 +95,6 @@ private slots:
|
|||||||
|
|
||||||
void on_pushButton_2_clicked() {view->view()->reloadShaders();}
|
void on_pushButton_2_clicked() {view->view()->reloadShaders();}
|
||||||
|
|
||||||
void on_actionAdd_plane_triggered();
|
|
||||||
void on_actionAdd_cube_triggered();
|
|
||||||
void on_actionAdd_sphere_triggered();
|
|
||||||
|
|
||||||
void on_actionArrow_triggered(bool on);
|
void on_actionArrow_triggered(bool on);
|
||||||
void on_actionMove_triggered(bool on);
|
void on_actionMove_triggered(bool on);
|
||||||
void on_actionRotate_triggered(bool on);
|
void on_actionRotate_triggered(bool on);
|
||||||
|
|||||||
@@ -80,8 +80,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>934</width>
|
<width>945</width>
|
||||||
<height>737</height>
|
<height>636</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||||
@@ -741,7 +741,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1107</width>
|
<width>1107</width>
|
||||||
<height>24</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
@@ -761,9 +761,6 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Scene</string>
|
<string>Scene</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionAdd_plane"/>
|
|
||||||
<addaction name="actionAdd_cube"/>
|
|
||||||
<addaction name="actionAdd_sphere"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuMode">
|
<widget class="QMenu" name="menuMode">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -789,9 +786,6 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="actionAdd_plane"/>
|
|
||||||
<addaction name="actionAdd_cube"/>
|
|
||||||
<addaction name="actionAdd_sphere"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionExit">
|
<action name="actionExit">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@@ -865,21 +859,6 @@
|
|||||||
<string>Ctrl+Shift+S</string>
|
<string>Ctrl+Shift+S</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAdd_cube">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add cube</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionAdd_sphere">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add sphere</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionAdd_plane">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add plane</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionArrow">
|
<action name="actionArrow">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ RendererMaterial::RendererMaterial(Renderer * r_): r(r_),
|
|||||||
fbo_mat_thumb(r->view, 6, true , GL_RGBA16F) {
|
fbo_mat_thumb(r->view, 6, true , GL_RGBA16F) {
|
||||||
mat_sphere = Primitive::ellipsoid(16, 16);
|
mat_sphere = Primitive::ellipsoid(16, 16);
|
||||||
mat_camera = new Camera();
|
mat_camera = new Camera();
|
||||||
mat_camera->setPos(QVector3D(1, 1, 1));
|
mat_camera->setPos(QVector3D(2, 2, 2));
|
||||||
mat_camera->setAim(QVector3D());
|
mat_camera->setAim(QVector3D());
|
||||||
mat_camera->setFOV(45.);
|
mat_camera->setFOV(45.);
|
||||||
mat_light = new Light();
|
mat_light = new Light();
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ RendererService::RendererService(Renderer * r_): r(r_) {
|
|||||||
delete m;
|
delete m;
|
||||||
|
|
||||||
handle_scale_mesh = Primitive::cylinder(12, 0.06, 0.85);
|
handle_scale_mesh = Primitive::cylinder(12, 0.06, 0.85);
|
||||||
m = Primitive::ellipsoid(12, 12, 0.3);
|
m = Primitive::ellipsoid(12, 12, 0.15);
|
||||||
m->translatePoints(QVector3D(0., 0., 0.85));
|
m->translatePoints(QVector3D(0., 0., 0.85));
|
||||||
handle_scale_mesh->append(m);
|
handle_scale_mesh->append(m);
|
||||||
delete m;
|
delete m;
|
||||||
handle_scale_3_mesh = Primitive::ellipsoid(12, 12, 0.4);
|
handle_scale_3_mesh = Primitive::ellipsoid(12, 12, 0.2);
|
||||||
|
|
||||||
handle_move_mesh ->scalePoints(7.5);
|
handle_move_mesh ->scalePoints(7.5);
|
||||||
handle_ms_2_mesh ->scalePoints(7.5);
|
handle_ms_2_mesh ->scalePoints(7.5);
|
||||||
|
|||||||
Reference in New Issue
Block a user