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 TypeMethodDescriptiondouble
calculateBoundingBox
(GaiaBoundingBox resultBBox) void
void
void
boolean
void
boolean
void
classifyFacesIdByPlane
(PlaneType planeType, org.joml.Vector3d planePosition) clone()
cloneByClassifyId
(int classifyId) boolean
collapseFace
(HalfEdgeFace face) 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) 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) void
cutByPlane
(PlaneType planeType, org.joml.Vector3d planePosition, double error) boolean
decideIfCollapseCheckingFaces
(HalfEdge halfEdge, Map<HalfEdgeVertex, List<HalfEdge>> vertexAllOutingEdgesMap, Map<HalfEdgeVertex, List<HalfEdgeVertex>> mapVertexToSamePosVertices, double maxDiffAngDeg, double maxAspectRatio, double smallHedgeSize) void
decimate
(DecimateParameters decimateParameters) int
void
deleteFacesWithClassifyId
(int classifyId) void
deleteFacesWithClassifyId_old
(int classifyId) void
deleteFacesWithNoClassifyId
(int classifyId) void
boolean
existNoUsedVertices
(List<HalfEdgeVertex> noUsedVertices) boolean
getDirty()
int
getHalfEdgesSortedByLength
(List<HalfEdge> resultHalfEdgesSortedByLength) int[]
void
getIntersectedFacesByPlane
(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) int
getWeldedFacesGroups
(List<List<HalfEdgeFace>> resultWeldedFacesGroups) getWeldedFacesGroupsRecursive
(List<List<HalfEdgeFace>> resultWeldedFacesGroups) boolean
getWeldedFacesWithFace
(HalfEdgeFace face, List<HalfEdgeFace> resultWeldedFaces, Map<HalfEdgeFace, HalfEdgeFace> mapVisitedFaces) void
getWestEastSouthNorthVertices
(GaiaBoundingBox bbox, List<HalfEdgeVertex> westVertices, List<HalfEdgeVertex> eastVertices, List<HalfEdgeVertex> southVertices, List<HalfEdgeVertex> northVertices, double error) void
joinSurface
(HalfEdgeSurface newSurface) void
readFile
(ObjectInputStream inputStream) void
void
scissorTextures
(GaiaMaterial material) void
scissorTexturesByMotherScene
(GaiaMaterial material, GaiaMaterial motherMaterial) void
void
void
void
setTwins()
void
void
setTwinsBetweenHalfEdges
(List<HalfEdge> halfEdges) void
void
transformPoints
(org.joml.Matrix4d finalMatrix) void
translate
(org.joml.Vector3d translation) void
void
void
weldVertices
(double error, boolean checkTexCoord, boolean checkNormal, boolean checkColor, boolean checkBatchId) void
writeFile
(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) -
getHalfEdgesSortedByLength
-
decimate
-
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)
-