My Project
Public Slots | Signals | Public Member Functions | Public Attributes | List of all members
MainWindow Class Reference

#include <mainwindow.h>

Inheritance diagram for MainWindow:
Inheritance graph
[legend]
Collaboration diagram for MainWindow:
Collaboration graph
[legend]

Public Slots

void setXRotation (int angle)
 Slot to set Xrotation angle (either from slider or mouse hold and drag movement). More...
 
void setYRotation (int angle)
 Slot to set Yrotation angle (either from slider or mouse hold and drag movement). More...
 
void setZRotation (int angle)
 Slot to set Zrotation (either from slider or mouse hold and drag movement). More...
 

Signals

void xRotationChanged (int angle)
 Signal to inform slider that x rotation angle has been changed by mouse hold and drag movement. More...
 
void yRotationChanged (int angle)
 Signal to inform slider that y rotation angle has been changed by mouse hold and drag movement. More...
 
void zRotationChanged (int angle)
 Signal to inform slider that z rotation angle has been changed by mouse hold and drag movement. More...
 

Public Member Functions

 MainWindow (QWidget *parent=0)
 Required constructor to setup UI. More...
 
 ~MainWindow ()
 Required Destructor. More...
 
void setVertices (std::vector< Vertice > &out_vertices, std::vector< std::vector< unsigned int > > &faces_vertices)
 Function used to set Vertices of the 3d figure (Used for 3d to 2d views). More...
 
void setWireFrame (WireFrame wf)
 Function used to set the Wireframe object generated from labelled 2d Views. More...
 
void render2DinLabel (Fig3D &fig_to_render, unsigned int plane)
 Function used to render the view in a specific label according to number set by plane. More...
 
void renderAllViews (Fig3D &fig_to_render)
 Function used to render all views of a 3d figure. More...
 
void incX ()
 Function used to increase X offset of displayed figure. More...
 
void incY ()
 Function used to increase Y offset of displayed figure. More...
 
void incZ ()
 Function used to increase Z offset of displayed figure. More...
 
void decX ()
 Function used to decrease X offset of displayed figure. More...
 
void decY ()
 Function used to decrease Y offset of displayed figure. More...
 
void decZ ()
 Function used to decrease Z offset of displayed figure. More...
 
void zoomin ()
 Function used to increase scaling or zooming in of displayed figure. More...
 
void zoomout ()
 Function used to decrease scaling or zooming out of displayed figure. More...
 
void update ()
 Function triggered to reconstruct views whenever offset or rotation of object changed. More...
 
void mousePressEvent (QMouseEvent *event) override
 Function to handle mouse press events. More...
 
void mouseMoveEvent (QMouseEvent *event) override
 Function to handle movement of mouse after clicking. More...
 
void renderFromEdges (vector< Edge > edges, int plane)
 Function used to render views from the given edges. More...
 
void render2Dto3D (WireFrame wf, Fig3D fig)
 Function used to render the views from the provided wireframe (in case of 2d to 3d) More...
 
void connectSliderandButtons ()
 Function to connect all sliders and buttons to appropriate functions on initializing view. More...
 

Public Attributes

int mode
 

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( QWidget *  parent = 0)
explicit

Required constructor to setup UI.

◆ ~MainWindow()

MainWindow::~MainWindow ( )

Required Destructor.

Member Function Documentation

◆ connectSliderandButtons()

void MainWindow::connectSliderandButtons ( )

Function to connect all sliders and buttons to appropriate functions on initializing view.

◆ decX()

void MainWindow::decX ( )

Function used to decrease X offset of displayed figure.

◆ decY()

void MainWindow::decY ( )

Function used to decrease Y offset of displayed figure.

◆ decZ()

void MainWindow::decZ ( )

Function used to decrease Z offset of displayed figure.

◆ incX()

void MainWindow::incX ( )

Function used to increase X offset of displayed figure.

◆ incY()

void MainWindow::incY ( )

Function used to increase Y offset of displayed figure.

◆ incZ()

void MainWindow::incZ ( )

Function used to increase Z offset of displayed figure.

◆ mouseMoveEvent()

void MainWindow::mouseMoveEvent ( QMouseEvent *  event)
override

Function to handle movement of mouse after clicking.

◆ mousePressEvent()

void MainWindow::mousePressEvent ( QMouseEvent *  event)
override

Function to handle mouse press events.

◆ render2DinLabel()

void MainWindow::render2DinLabel ( Fig3D fig_to_render,
unsigned int  plane 
)

Function used to render the view in a specific label according to number set by plane.

Takes input 3D object information (vertices,faces), QPainter object, othographic plane (XY /YZ/ XZ) and draws the corresponding 2D view on the QPainter object

◆ render2Dto3D()

void MainWindow::render2Dto3D ( WireFrame  wf,
Fig3D  fig 
)

Function used to render the views from the provided wireframe (in case of 2d to 3d)

◆ renderAllViews()

void MainWindow::renderAllViews ( Fig3D fig_to_render)

Function used to render all views of a 3d figure.

◆ renderFromEdges()

void MainWindow::renderFromEdges ( vector< Edge edges,
int  plane 
)

Function used to render views from the given edges.

◆ setVertices()

void MainWindow::setVertices ( std::vector< Vertice > &  out_vertices,
std::vector< std::vector< unsigned int > > &  faces_vertices 
)

Function used to set Vertices of the 3d figure (Used for 3d to 2d views).

◆ setWireFrame()

void MainWindow::setWireFrame ( WireFrame  wf)

Function used to set the Wireframe object generated from labelled 2d Views.

◆ setXRotation

void MainWindow::setXRotation ( int  angle)
slot

Slot to set Xrotation angle (either from slider or mouse hold and drag movement).

◆ setYRotation

void MainWindow::setYRotation ( int  angle)
slot

Slot to set Yrotation angle (either from slider or mouse hold and drag movement).

◆ setZRotation

void MainWindow::setZRotation ( int  angle)
slot

Slot to set Zrotation (either from slider or mouse hold and drag movement).

◆ update()

void MainWindow::update ( )

Function triggered to reconstruct views whenever offset or rotation of object changed.

◆ xRotationChanged

void MainWindow::xRotationChanged ( int  angle)
signal

Signal to inform slider that x rotation angle has been changed by mouse hold and drag movement.

◆ yRotationChanged

void MainWindow::yRotationChanged ( int  angle)
signal

Signal to inform slider that y rotation angle has been changed by mouse hold and drag movement.

◆ zoomin()

void MainWindow::zoomin ( )

Function used to increase scaling or zooming in of displayed figure.

◆ zoomout()

void MainWindow::zoomout ( )

Function used to decrease scaling or zooming out of displayed figure.

◆ zRotationChanged

void MainWindow::zRotationChanged ( int  angle)
signal

Signal to inform slider that z rotation angle has been changed by mouse hold and drag movement.

Member Data Documentation

◆ mode

int MainWindow::mode

The documentation for this class was generated from the following files: