Skip to content
Snippets Groups Projects
Commit fc881972 authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Final styling before merge

parent 7550d1e1
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@ package cz.fidentis.analyst.face;
import com.google.common.eventbus.EventBus;
import cz.fidentis.analyst.mesh.core.MeshFacet;
import cz.fidentis.analyst.mesh.core.MeshFacetImpl;
import cz.fidentis.analyst.mesh.core.MeshModel;
import cz.fidentis.analyst.mesh.events.MeshEvent;
import cz.fidentis.analyst.mesh.events.MeshListener;
......@@ -18,7 +17,7 @@ import java.io.InputStream;
* <p>
* Changes in the human face and its data structures (e.g., mesh model, etc.)
* can be monitored by listeners. Listeners have to implement the
* {@link cz.fidentis.analyst.face.HumanFaceListener} iterface and they have to be
* {@link cz.fidentis.analyst.face.HumanFaceListener} interface and they have to be
* registered using the {@link cz.fidentis.analyst.face.HumanFace#registerListener} method.
* Then they are informed about changes in the human automatically via methods
* prescribed by the interface.
......
......@@ -5,13 +5,9 @@ import com.jogamp.opengl.GLEventListener;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.awt.GLCanvas;
import cz.fidentis.analyst.face.HumanFace;
import cz.fidentis.analyst.mesh.core.MeshFacetImpl;
import cz.fidentis.analyst.mesh.io.ModelFileFilter;
import cz.fidentis.analyst.mesh.core.MeshModel;
import cz.fidentis.analyst.mesh.io.MeshObjLoader;
import com.jogamp.opengl.util.FPSAnimator;
import cz.fidentis.analyst.symmetry.Config;
import cz.fidentis.analyst.symmetry.SymmetryEstimator;
import java.awt.Color;
import java.awt.Cursor;
......@@ -28,12 +24,12 @@ import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
/**
*
* @author Natália Bebjaková
*
* Canvas for displaying models containing GLCanvas and navigation.
*
* @author Natalia Bebjakova
*/
public class Canvas extends javax.swing.JPanel {
protected GLCanvas glCanvas;
protected long startClickTime = 0;
......@@ -41,8 +37,9 @@ public class Canvas extends javax.swing.JPanel {
protected Timer timer;
protected GeneralGLEventListener listener;
/**
* Mouse adapter for 3D manipualtion
/**
* Mouse adapter for 3D manipulation
*/
protected Manipulator3D manipulator;
......@@ -141,7 +138,6 @@ public class Canvas extends javax.swing.JPanel {
this.listener = listener;
}
/**
*
* @param drawWire Decides if model is displayed as wife-frame
......@@ -149,6 +145,7 @@ public class Canvas extends javax.swing.JPanel {
public static void setDrawWired(boolean drawWire) {
drawWireModel = drawWire;
}
/**
*
* @return Returns if model is displayed as wife-frame
......@@ -164,6 +161,7 @@ public class Canvas extends javax.swing.JPanel {
public static void setDrawSymmetryPlane(boolean drawSymmetry) {
drawSymmetryPlane = drawSymmetry;
}
/**
*
* @return Returns if the symmetry plane is displayed
......
package cz.fidentis.analyst.gui;
import cz.fidentis.analyst.mesh.core.MeshFacetImpl;
import cz.fidentis.analyst.mesh.core.MeshModel;
import cz.fidentis.analyst.mesh.core.MeshFacet;
import com.jogamp.opengl.GL;
......@@ -15,57 +14,63 @@ import com.jogamp.opengl.GLEventListener;
import static com.jogamp.opengl.fixedfunc.GLMatrixFunc.GL_MODELVIEW_MATRIX;
import static com.jogamp.opengl.fixedfunc.GLMatrixFunc.GL_PROJECTION_MATRIX;
import com.jogamp.opengl.glu.GLU;
import cz.fidentis.analyst.mesh.core.MeshPoint;
import cz.fidentis.analyst.symmetry.Config;
import cz.fidentis.analyst.symmetry.Plane;
import cz.fidentis.analyst.symmetry.SymmetryEstimator;
import javax.vecmath.Vector3d;
import javax.vecmath.Vector3f;
import java.util.List;
import java.util.Vector;
/**
*
* @author Natália Bebjaková
*/
public class GeneralGLEventListener implements GLEventListener {
/**
* MeshModel that is displayed
*/
private MeshModel model = new MeshModel();
/**
* MeshModel of the symmetry plane
*/
private MeshFacet symmetryPlaneFacet = null;
/**
* GLCanvas which listener belongs to
*/
protected Canvas glCanvas;
/**
* GLU object.
*/
protected GLU glu;
/**
* Usage of openGL version 2
*/
protected GL2 gl;
/**
* The last viewport.
*/
protected int[] viewport = new int[4];
/**
/**
* The last model matrix.
*/
protected float[] modelViewMatrix = new float[16];
/**
* The last projection matrix.
*/
protected float[] projectionMatrix = new float[16];
/**
* The X coordinate of the last known mouse position during the scene rotation.
*/
int mouseX = 0;
/**
* The Y coordinate of the last know mouse position during the scene rotation.
*/
......@@ -87,7 +92,7 @@ public class GeneralGLEventListener implements GLEventListener {
protected double yUpPosition = 1;
/**
* Decides if model is diplayed as wire-frame
* Decides if model is displayed as wire-frame
*/
protected boolean wireModel = false;
......@@ -97,13 +102,13 @@ public class GeneralGLEventListener implements GLEventListener {
protected static boolean symmetryPlane;
/**
* Decides if the backround will be white
* Decides if the background will be white
*/
protected boolean whiteBackround = false;
/**
*
* @return is backround white or not
* @return is background white or not
*/
public boolean isWhiteBackround() {
return whiteBackround;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment