Package com.gaia3d.basic.halfedge
Class HalfEdgeSurface
java.lang.Object
com.gaia3d.basic.halfedge.HalfEdgeSurface
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateBoundingBox(GaiaBoundingBox resultBBox) voidvoidvoidbooleanvoidbooleanvoidclassifyFacesIdByPlane(PlaneType planeType, org.joml.Vector3d planePosition) clone()cloneByClassifyId(int classifyId) booleancollapseFace(HalfEdgeFace face) booleancollapseFrontierHalfEdge(HalfEdge halfEdge, int iteration, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdge, org.joml.Vector3d> mapHalfEdgeToInitialDirection, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double frontierMaxDiffAngDeg, double hedgeMinLength, double maxAspectRatio, double smallHedgeSize, boolean testDebug) booleancollapseHalfEdge(HalfEdge halfEdge, int iteration, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double frontierMaxDiffAngDeg, double hedgeMinLength, double maxAspectRatio, double smallHedgeSize, boolean testDebug) voidcutByPlane(PlaneType planeType, org.joml.Vector3d planePosition, double error) booleandecideIfCollapseCheckingFaces(HalfEdge halfEdge, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double maxAspectRatio, double smallHedgeSize) intvoiddeleteFacesWithClassifyId(int classifyId) voiddeleteFacesWithClassifyId_old(int classifyId) voiddeleteFacesWithNoClassifyId(int classifyId) voidvoiddoTrianglesReduction(DecimateParameters decimateParameters) voiddoTrianglesReductionOneIteration(DecimateParameters decimateParameters) booleanexistNoUsedVertices(List<HalfEdgeVertex> noUsedVertices) booleangetDirty()intgetHalfEdgesSortedByLength(List<HalfEdge> resultHalfEdgesSortedByLength) int[]voidgetIntersectedFacesByPlane(PlaneType planeType, org.joml.Vector3d planePosition, List<HalfEdgeFace> resultFaces, double error) getMapClassifyIdToCameraDirectionTypeToFaces(Map<Integer, Map<CameraDirectionType, List<HalfEdgeFace>>> mapFaceGroupByClassifyIdAndObliqueCamDirType) getMapFaceToHalfEdges(Map<HalfEdgeFace, List<HalfEdge>> resultMapFaceToHalfEdges) getMapHalfEdgeToDirection(Map<HalfEdge, org.joml.Vector3d> resultMapHalfEdgeToDirection) Map<org.joml.Vector3d,List<HalfEdgeVertex>> getMapPositionToVertices(Map<org.joml.Vector3d, List<HalfEdgeVertex>> resultMapPositionToVertices) getMapVertexAllFaces(Map<HalfEdgeVertex, List<HalfEdgeFace>> resultVertexAllFacesMap) getMapVertexAllOutingEdges(Map<HalfEdgeVertex, List<HalfEdge>> resultVertexAllOutingEdgesMap) getMapVertexToSamePosVertices(Map<HalfEdgeVertex, List<HalfEdgeVertex>> resultMapVertexToSamePosVertices) getTexCoordinateBoundingRectangle(GaiaRectangle resultRectangle) intgetWeldedFacesGroups(List<List<HalfEdgeFace>> resultWeldedFacesGroups) getWeldedFacesGroupsRecursive(List<List<HalfEdgeFace>> resultWeldedFacesGroups) booleangetWeldedFacesWithFace(HalfEdgeFace face, List<HalfEdgeFace> resultWeldedFaces, Map<HalfEdgeFace, HalfEdgeFace> mapVisitedFaces) voidgetWestEastSouthNorthVertices(GaiaBoundingBox bbox, List<HalfEdgeVertex> westVertices, List<HalfEdgeVertex> eastVertices, List<HalfEdgeVertex> southVertices, List<HalfEdgeVertex> northVertices, double error) voidjoinSurface(HalfEdgeSurface newSurface) voidreadFile(ObjectInputStream inputStream) voidvoidscissorTextures(GaiaMaterial material) voidscissorTexturesByMotherScene(GaiaMaterial material, GaiaMaterial motherMaterial) voidvoidvoidvoidsetTwins()voidvoidsetTwinsBetweenHalfEdges(List<HalfEdge> halfEdges) voidvoidtransformPoints(org.joml.Matrix4d finalMatrix) voidtranslate(org.joml.Vector3d translation) voidvoidvoidweldVertices(double error, boolean checkTexCoord, boolean checkNormal, boolean checkColor, boolean checkBatchId) voidwriteFile(ObjectOutputStream outputStream)
-
Constructor Details
-
HalfEdgeSurface
public HalfEdgeSurface()
-
-
Method Details
-
setTwins
public void setTwins() -
setTwins_original
public void setTwins_original() -
calculatePlaneNormals
public void calculatePlaneNormals() -
calculateNormals
public void calculateNormals() -
deleteObjects
public void deleteObjects() -
getMapHalfEdgeToDirection
-
getMapPositionToVertices
public Map<org.joml.Vector3d,List<HalfEdgeVertex>> getMapPositionToVertices(Map<org.joml.Vector3d, List<HalfEdgeVertex>> resultMapPositionToVertices) -
getMapVertexToSamePosVertices
public Map<HalfEdgeVertex,List<HalfEdgeVertex>> getMapVertexToSamePosVertices(Map<HalfEdgeVertex, List<HalfEdgeVertex>> resultMapVertexToSamePosVertices) -
getMapFaceToHalfEdges
public Map<HalfEdgeFace,List<HalfEdge>> getMapFaceToHalfEdges(Map<HalfEdgeFace, List<HalfEdge>> resultMapFaceToHalfEdges) -
doTrianglesReduction
-
getHalfEdgesSortedByLength
-
doTrianglesReductionOneIteration
-
deleteDegeneratedFaces
public int deleteDegeneratedFaces() -
removeDeletedObjects
public void removeDeletedObjects() -
setObjectIdsInList
public void setObjectIdsInList() -
setItselfAsOutingHalfEdgeToTheStartVertex
public void setItselfAsOutingHalfEdgeToTheStartVertex() -
getMapVertexAllFaces
public Map<HalfEdgeVertex,List<HalfEdgeFace>> getMapVertexAllFaces(Map<HalfEdgeVertex, List<HalfEdgeFace>> resultVertexAllFacesMap) -
getMapVertexAllOutingEdges
public Map<HalfEdgeVertex,List<HalfEdge>> getMapVertexAllOutingEdges(Map<HalfEdgeVertex, List<HalfEdge>> resultVertexAllOutingEdgesMap) -
checkSandClockFaces
public void checkSandClockFaces() -
collapseFrontierHalfEdge
public boolean collapseFrontierHalfEdge(HalfEdge halfEdge, int iteration, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdge, org.joml.Vector3d> mapHalfEdgeToInitialDirection, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double frontierMaxDiffAngDeg, double hedgeMinLength, double maxAspectRatio, double smallHedgeSize, boolean testDebug) -
collapseHalfEdge
public boolean collapseHalfEdge(HalfEdge halfEdge, int iteration, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double frontierMaxDiffAngDeg, double hedgeMinLength, double maxAspectRatio, double smallHedgeSize, boolean testDebug) -
collapseFace
-
decideIfCollapseCheckingFaces
public boolean decideIfCollapseCheckingFaces(HalfEdge halfEdge, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double maxAspectRatio, double smallHedgeSize) -
setTwinsBetweenHalfEdges
-
transformPoints
public void transformPoints(org.joml.Matrix4d finalMatrix) -
calculateBoundingBox
-
getBoundingBox
-
cutByPlane
-
checkHalfEdgesFaces
public boolean checkHalfEdgesFaces() -
checkTwins
public boolean checkTwins() -
classifyFacesIdByPlane
-
deleteFacesWithClassifyId
public void deleteFacesWithClassifyId(int classifyId) -
deleteFacesWithNoClassifyId
public void deleteFacesWithNoClassifyId(int classifyId) -
deleteFacesWithClassifyId_old
public void deleteFacesWithClassifyId_old(int classifyId) -
writeFile
-
readFile
-
existNoUsedVertices
-
cloneByClassifyId
-
clone
-
scissorTextures
-
scissorTexturesByMotherScene
-
getWeldedFacesWithFace
public boolean getWeldedFacesWithFace(HalfEdgeFace face, List<HalfEdgeFace> resultWeldedFaces, Map<HalfEdgeFace, HalfEdgeFace> mapVisitedFaces) -
getWeldedFacesGroups
public List<List<HalfEdgeFace>> getWeldedFacesGroups(List<List<HalfEdgeFace>> resultWeldedFacesGroups) -
getWeldedFacesGroupsRecursive
public List<List<HalfEdgeFace>> getWeldedFacesGroupsRecursive(List<List<HalfEdgeFace>> resultWeldedFacesGroups) -
getTrianglesCount
public int getTrianglesCount() -
setBoxTexCoordsXY
-
changeOutingHEdgesOfVertexIfHEdgeIsDeleted
public void changeOutingHEdgesOfVertexIfHEdgeIsDeleted() -
weldVertices
public void weldVertices(double error, boolean checkTexCoord, boolean checkNormal, boolean checkColor, boolean checkBatchId) -
translate
public void translate(org.joml.Vector3d translation) -
getIndices
public int[] getIndices() -
getDirty
public boolean getDirty() -
joinSurface
-
getMapClassifyIdToCameraDirectionTypeToFaces
public Map<Integer,Map<CameraDirectionType, getMapClassifyIdToCameraDirectionTypeToFacesList<HalfEdgeFace>>> (Map<Integer, Map<CameraDirectionType, List<HalfEdgeFace>>> mapFaceGroupByClassifyIdAndObliqueCamDirType) -
splitFacesByBestObliqueCameraDirectionToProject
public void splitFacesByBestObliqueCameraDirectionToProject() -
updateFacesList
public void updateFacesList() -
updateVerticesList
public void updateVerticesList() -
getWestEastSouthNorthVertices
public void getWestEastSouthNorthVertices(GaiaBoundingBox bbox, List<HalfEdgeVertex> westVertices, List<HalfEdgeVertex> eastVertices, List<HalfEdgeVertex> southVertices, List<HalfEdgeVertex> northVertices, double error) -
calculateArea
public double calculateArea() -
getTexCoordinateBoundingRectangle
-
getFacesCount
public int getFacesCount() -
getIntersectedFacesByPlane
public void getIntersectedFacesByPlane(PlaneType planeType, org.joml.Vector3d planePosition, List<HalfEdgeFace> resultFaces, double error)
-