Loading Comparison/src/main/java/cz/fidentis/analyst/face/HumanFaceFactory.java +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import cz.fidentis.analyst.mesh.core.CornerTableRow; import cz.fidentis.analyst.mesh.core.MeshFacetImpl; import cz.fidentis.analyst.mesh.core.MeshModel; import cz.fidentis.analyst.mesh.core.MeshPointImpl; import cz.fidentis.analyst.mesh.material.Material; import cz.fidentis.analyst.symmetry.Plane; import cz.fidentis.analyst.visitors.mesh.BoundingBox.BBox; import java.io.File; Loading Loading @@ -118,11 +119,13 @@ public class HumanFaceFactory { HumanFaceFactory.kryo.register(CornerTable.class); HumanFaceFactory.kryo.register(CornerTableRow.class); HumanFaceFactory.kryo.register(BBox.class); HumanFaceFactory.kryo.register(Material.class); HumanFaceFactory.kryo.register(Plane.class); HumanFaceFactory.kryo.register(Point3d.class); HumanFaceFactory.kryo.register(Vector3d.class); HumanFaceFactory.kryo.register(ArrayList.class); HumanFaceFactory.kryo.register(HashMap.class); HumanFaceFactory.kryo.register(String.class); } } } Loading Comparison/src/main/java/cz/fidentis/analyst/face/HumanFaceUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public class HumanFaceUtils { boolean recomputeKdTree) { // transform mesh: System.out.println("_AAA " + staticFace.getShortName() + ":" + transformedFace.getShortName()); IcpTransformer icp = new IcpTransformer( staticFace.getMeshModel(), maxIterations, Loading GUI/src/main/java/cz/fidentis/analyst/scene/DrawableMesh.java +11 −14 Original line number Diff line number Diff line Loading @@ -9,8 +9,6 @@ import cz.fidentis.analyst.mesh.core.MeshPoint; import java.awt.Color; import java.io.File; import java.util.List; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; /** * A drawable triangular mesh, i.e., a mesh model with drawing information like Loading @@ -25,7 +23,6 @@ public class DrawableMesh extends Drawable { private final MeshModel model; private Texture texture = null; private int textureHandle; /** * Copy constructor. Loading Loading @@ -84,15 +81,17 @@ public class DrawableMesh extends Drawable { gl.glMaterialf(GL2.GL_FRONT_AND_BACK, GL2.GL_SHININESS, 50); gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_SPECULAR, highlights, 0); if (getRenderMode() == RenderingMode.TEXTURE && model.hasMaterial() && model.getMaterial().hasTexture() && (texture == null)) { gl.glTexParameterf(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); gl.glTexParameterf(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE); if (model.hasMaterial() && model.getMaterial().hasTexture() && (texture == null)) { try{ texture = TextureIO.newTexture(new File(model.getMaterial().getTexturePath()), true); texture.bind(gl); textureHandle = texture.getTextureObject(); } catch (Exception ex){ ex.printStackTrace(); } Loading @@ -104,8 +103,6 @@ public class DrawableMesh extends Drawable { protected void renderObject(GL2 gl) { if (getRenderMode() == RenderingMode.TEXTURE){ gl.glEnable(GL2.GL_TEXTURE_2D); // Select the texture object gl.glBindTexture(GL2.GL_TEXTURE_2D, textureHandle); } else { gl.glDisable(GL2.GL_TEXTURE_2D); } Loading @@ -123,7 +120,7 @@ public class DrawableMesh extends Drawable { } // render the vertices if (mPoint.getTexCoord() != null) { if (getRenderMode() == RenderingMode.TEXTURE && mPoint.getTexCoord() != null) { gl.glTexCoord2d(mPoint.getTexCoord().x, mPoint.getTexCoord().y); } gl.glVertex3d(mPoint.getPosition().x, mPoint.getPosition().y, mPoint.getPosition().z); Loading MeshModel/src/main/java/cz/fidentis/analyst/mesh/material/Material.java +2 −1 Original line number Diff line number Diff line package cz.fidentis.analyst.mesh.material; import java.io.Serializable; import javax.vecmath.Vector3d; /** Loading @@ -7,7 +8,7 @@ import javax.vecmath.Vector3d; * @author Matej Lukes * @author Katerina Zarska */ public class Material { public class Material implements Serializable { private final String name; // colour info Loading Loading
Comparison/src/main/java/cz/fidentis/analyst/face/HumanFaceFactory.java +3 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ import cz.fidentis.analyst.mesh.core.CornerTableRow; import cz.fidentis.analyst.mesh.core.MeshFacetImpl; import cz.fidentis.analyst.mesh.core.MeshModel; import cz.fidentis.analyst.mesh.core.MeshPointImpl; import cz.fidentis.analyst.mesh.material.Material; import cz.fidentis.analyst.symmetry.Plane; import cz.fidentis.analyst.visitors.mesh.BoundingBox.BBox; import java.io.File; Loading Loading @@ -118,11 +119,13 @@ public class HumanFaceFactory { HumanFaceFactory.kryo.register(CornerTable.class); HumanFaceFactory.kryo.register(CornerTableRow.class); HumanFaceFactory.kryo.register(BBox.class); HumanFaceFactory.kryo.register(Material.class); HumanFaceFactory.kryo.register(Plane.class); HumanFaceFactory.kryo.register(Point3d.class); HumanFaceFactory.kryo.register(Vector3d.class); HumanFaceFactory.kryo.register(ArrayList.class); HumanFaceFactory.kryo.register(HashMap.class); HumanFaceFactory.kryo.register(String.class); } } } Loading
Comparison/src/main/java/cz/fidentis/analyst/face/HumanFaceUtils.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ public class HumanFaceUtils { boolean recomputeKdTree) { // transform mesh: System.out.println("_AAA " + staticFace.getShortName() + ":" + transformedFace.getShortName()); IcpTransformer icp = new IcpTransformer( staticFace.getMeshModel(), maxIterations, Loading
GUI/src/main/java/cz/fidentis/analyst/scene/DrawableMesh.java +11 −14 Original line number Diff line number Diff line Loading @@ -9,8 +9,6 @@ import cz.fidentis.analyst.mesh.core.MeshPoint; import java.awt.Color; import java.io.File; import java.util.List; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; /** * A drawable triangular mesh, i.e., a mesh model with drawing information like Loading @@ -25,7 +23,6 @@ public class DrawableMesh extends Drawable { private final MeshModel model; private Texture texture = null; private int textureHandle; /** * Copy constructor. Loading Loading @@ -84,15 +81,17 @@ public class DrawableMesh extends Drawable { gl.glMaterialf(GL2.GL_FRONT_AND_BACK, GL2.GL_SHININESS, 50); gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_SPECULAR, highlights, 0); if (getRenderMode() == RenderingMode.TEXTURE && model.hasMaterial() && model.getMaterial().hasTexture() && (texture == null)) { gl.glTexParameterf(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST); gl.glTexParameterf(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST); gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_REPLACE); if (model.hasMaterial() && model.getMaterial().hasTexture() && (texture == null)) { try{ texture = TextureIO.newTexture(new File(model.getMaterial().getTexturePath()), true); texture.bind(gl); textureHandle = texture.getTextureObject(); } catch (Exception ex){ ex.printStackTrace(); } Loading @@ -104,8 +103,6 @@ public class DrawableMesh extends Drawable { protected void renderObject(GL2 gl) { if (getRenderMode() == RenderingMode.TEXTURE){ gl.glEnable(GL2.GL_TEXTURE_2D); // Select the texture object gl.glBindTexture(GL2.GL_TEXTURE_2D, textureHandle); } else { gl.glDisable(GL2.GL_TEXTURE_2D); } Loading @@ -123,7 +120,7 @@ public class DrawableMesh extends Drawable { } // render the vertices if (mPoint.getTexCoord() != null) { if (getRenderMode() == RenderingMode.TEXTURE && mPoint.getTexCoord() != null) { gl.glTexCoord2d(mPoint.getTexCoord().x, mPoint.getTexCoord().y); } gl.glVertex3d(mPoint.getPosition().x, mPoint.getPosition().y, mPoint.getPosition().z); Loading
MeshModel/src/main/java/cz/fidentis/analyst/mesh/material/Material.java +2 −1 Original line number Diff line number Diff line package cz.fidentis.analyst.mesh.material; import java.io.Serializable; import javax.vecmath.Vector3d; /** Loading @@ -7,7 +8,7 @@ import javax.vecmath.Vector3d; * @author Matej Lukes * @author Katerina Zarska */ public class Material { public class Material implements Serializable { private final String name; // colour info Loading