git-svn-id: svn://db.shs.com.ru/libs@694 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-12 18:09:12 +00:00
parent c4effa14a5
commit bee5885342
5 changed files with 6 additions and 58 deletions

View File

@@ -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) {
actionArrow ->setChecked(true);
actionMove ->setChecked(false);

View File

@@ -95,10 +95,6 @@ private slots:
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_actionMove_triggered(bool on);
void on_actionRotate_triggered(bool on);

View File

@@ -80,8 +80,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>934</width>
<height>737</height>
<width>945</width>
<height>636</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
@@ -741,7 +741,7 @@
<x>0</x>
<y>0</y>
<width>1107</width>
<height>24</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -761,9 +761,6 @@
<property name="title">
<string>Scene</string>
</property>
<addaction name="actionAdd_plane"/>
<addaction name="actionAdd_cube"/>
<addaction name="actionAdd_sphere"/>
</widget>
<widget class="QMenu" name="menuMode">
<property name="title">
@@ -789,9 +786,6 @@
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionAdd_plane"/>
<addaction name="actionAdd_cube"/>
<addaction name="actionAdd_sphere"/>
</widget>
<action name="actionExit">
<property name="icon">
@@ -865,21 +859,6 @@
<string>Ctrl+Shift+S</string>
</property>
</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">
<property name="checkable">
<bool>true</bool>

View File

@@ -32,7 +32,7 @@ RendererMaterial::RendererMaterial(Renderer * r_): r(r_),
fbo_mat_thumb(r->view, 6, true , GL_RGBA16F) {
mat_sphere = Primitive::ellipsoid(16, 16);
mat_camera = new Camera();
mat_camera->setPos(QVector3D(1, 1, 1));
mat_camera->setPos(QVector3D(2, 2, 2));
mat_camera->setAim(QVector3D());
mat_camera->setFOV(45.);
mat_light = new Light();

View File

@@ -92,11 +92,11 @@ RendererService::RendererService(Renderer * r_): r(r_) {
delete m;
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));
handle_scale_mesh->append(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_ms_2_mesh ->scalePoints(7.5);