Package org.mt4j.util.math

Examples of org.mt4j.util.math.Vector3D.equalsVectorWithTolerance()


          if (currentFacesCurrentVDNormal == null){
            currentVertexDataP0OrP1OrP2.setUniqueVertexNormal(vertexNormalsCurrentFace[i]);
            logger.debug("Face " + j + ", vdP" + i + " (Vertex: " + vertexDatas.get(currentVertexPointer).getVertex() + ")" + " normal not yet set -> set it: " + vertexNormalsCurrentFace[i]);
          }else{//Vertexdata at index already contains a vertexnormal -> check if its the equal to this faces currentVD's
           
            if (currentFacesCurrentVDNormal.equalsVectorWithTolerance(vertexNormalsCurrentFace[i], ToolsMath.ZERO_TOLERANCE)){
              logger.debug("Face " + j + ", vdP" + i +  " (Vertex: " + vertexDatas.get(currentVertexPointer).getVertex() + ")" + " already CONTAINS a normal with the same values as the normal of this faces point ->  we can leave the index and normal at the same place: N:" + vertexNormalsCurrentFace[i]);
            }else{
              int duplicateIndexOfSameVertDiffNormal = currentVertexDataP0OrP1OrP2.getVertDuplicateSameVertDiffNormalListIndex(vertexNormalsCurrentFace[i]);
             
              if (duplicateIndexOfSameVertDiffNormal != -1){ //Es gibt schon ein duplicate mit gleichen tex coords wie dieses hier, adde bei duplicateIndex
View Full Code Here


            nextSmoothNeighborNormalNormalized.normalizeLocal();//neighborFaceP0.normalNormalized;
            boolean alreadyAddedSameNormalIn = false;
           
           
            //Dont add faces normals that are equal to this faces normals
            if (!useNormalsEqualToFace && nextSmoothNeighborNormalNormalized.equalsVectorWithTolerance(normalizedFaceNormal, ToolsMath.ZERO_TOLERANCE)){
              alreadyAddedSameNormalIn = true;
              logger.debug("Not using normal: " + nextSmoothNeighborNormalNormalized + " of face " + neighborFaceP0.index + " in vertex norm calc because its equal to this faces normal.");
            }
//            else //Dont add face normals that are equal to one already added
//            {
View Full Code Here

            //TODO doch nochmal probieren mit vorher ausgerechneter normal? sonst performance loss!
            nextSmoothNeighborNormalNormalized.normalizeLocal();//neighborFaceP1.normalNormalized;
            boolean alreadyAddedSameNormalIn = false;
           
            //Dont add faces normals that are equal to this faces normals
            if (!useNormalsEqualToFace && nextSmoothNeighborNormalNormalized.equalsVectorWithTolerance(normalizedFaceNormal, ToolsMath.ZERO_TOLERANCE)){
              alreadyAddedSameNormalIn = true;
              logger.debug("Not using normal: " + nextSmoothNeighborNormalNormalized + " of face " + neighborFaceP1.index + " in vertex norm calc because its equal to this faces normal.");
            }
//            else //Dont add face normals that are equal to one already added
//            {
View Full Code Here

            nextSmoothNeighborNormalNormalized.normalizeLocal();//neighborFaceP2.normalNormalized;
            boolean alreadyAddedSameNormalIn = false;
           
           
            //Dont add faces normals that are equal to this faces normals
            if (!useNormalsEqualToFace && nextSmoothNeighborNormalNormalized.equalsVectorWithTolerance(normalizedFaceNormal, ToolsMath.ZERO_TOLERANCE)){
              alreadyAddedSameNormalIn = true;
              logger.debug("Not using normal: " + nextSmoothNeighborNormalNormalized + " of face " + neighborFaceP2.index + " in vertex norm calc because its equal to this faces normal.");
            }
//            else //Dont add face normals that are equal to one already added
//            {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.