BowlerKernel
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
eu.mihosoft.vrl.v3d.Edge Class Reference
Collaboration diagram for eu.mihosoft.vrl.v3d.Edge:
Collaboration graph
[legend]

Classes

class  Node
 

Public Member Functions

 Edge (Vertex p1, Vertex p2)
 
Vertex getP1 ()
 
Vertex getP2 ()
 
boolean colinear (Vector3d p)
 
boolean colinear (Vector3d p, double TOL)
 
boolean contains (Vector3d p, double TOL)
 
boolean contains (Vector3d p)
 
int hashCode ()
 
boolean equals (Object obj)
 
boolean isThisPointOneOfMine (Vertex test)
 
String toString ()
 
Vector3d getDirection ()
 
Optional< Vector3dgetClosestPoint (Edge e)
 
Optional< Vector3dgetIntersection (Edge e)
 
double length ()
 

Static Public Member Functions

static List< EdgefromPolygon (Polygon poly)
 
static List< VertextoVertices (List< Edge > edges)
 
static List< Vector3dtoPoints (List< Edge > edges)
 
static Polygon toPolygon (List< Vector3d > points, Plane plane)
 
static List< PolygontoPolygons (List< Edge > boundaryEdges, Plane plane)
 
static List< PolygonboundaryPathsWithHoles (List< Polygon > boundaryPaths)
 
static List< PolygonboundaryPaths (List< Edge > boundaryEdges)
 
static List< Polygon_toPolygons (List< Edge > boundaryEdges, Plane plane)
 
static List< PolygonboundaryPolygons (CSG csg)
 
static List< EdgeboundaryEdgesOfPlaneGroup (List< Polygon > planeGroup)
 
static boolean falseBoundaryEdgeSharedWithOtherEdge (Edge fbe, Edge e)
 

Static Public Attributes

static final String KEY_POLYGON_HOLES = "jcsg:edge:polygon-holes"
 

Static Private Member Functions

static int nextUnused (boolean[] usage)
 
static List< PolygonboundaryPolygonsOfPlaneGroup (List< Polygon > planeGroup)
 
static List< List< Polygon > > searchPlaneGroups (List< Polygon > polygons)
 

Private Attributes

final Vertex p1
 
final Vertex p2
 
final Vector3d direction
 

Detailed Description

The Class Edge.

Author
miho

Definition at line 22 of file Edge.java.

Constructor & Destructor Documentation

◆ Edge()

eu.mihosoft.vrl.v3d.Edge.Edge ( Vertex  p1,
Vertex  p2 
)

Member Function Documentation

◆ _toPolygons()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge._toPolygons ( List< Edge boundaryEdges,
Plane  plane 
)
static

_to polygons.

Parameters
boundaryEdgesthe boundary edges
planethe plane
Returns
the list

Definition at line 491 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.equals(), eu.mihosoft.vrl.v3d.Edge.p1, eu.mihosoft.vrl.v3d.Edge.p2, eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Edge.toPolygon().

Here is the call graph for this function:

◆ boundaryEdgesOfPlaneGroup()

static List<Edge> eu.mihosoft.vrl.v3d.Edge.boundaryEdgesOfPlaneGroup ( List< Polygon planeGroup)
static

Boundary edges of plane group.

Parameters
planeGroupthe plane group
Returns
the list

Definition at line 759 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.falseBoundaryEdgeSharedWithOtherEdge(), and eu.mihosoft.vrl.v3d.Edge.fromPolygon().

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup().

Here is the call graph for this function:

◆ boundaryPaths()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge.boundaryPaths ( List< Edge boundaryEdges)
static

Returns a list of all boundary paths.

Parameters
boundaryEdgesboundary edges (all paths must be closed)
Returns
the list

Definition at line 407 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.equals(), eu.mihosoft.vrl.v3d.Polygon.fromPoints(), eu.mihosoft.vrl.v3d.Edge.nextUnused(), eu.mihosoft.vrl.v3d.Edge.p1, eu.mihosoft.vrl.v3d.Edge.p2, and eu.mihosoft.vrl.v3d.Vertex.pos.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPathsWithHoles(), and eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup().

Here is the call graph for this function:

◆ boundaryPathsWithHoles()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge.boundaryPathsWithHoles ( List< Polygon boundaryPaths)
static

Boundary paths with holes.

Parameters
boundaryPathsthe boundary paths
Returns
the list

Definition at line 333 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.boundaryPaths(), eu.mihosoft.vrl.v3d.Edge.KEY_POLYGON_HOLES, eu.mihosoft.vrl.v3d.Edge.p1, and eu.mihosoft.vrl.v3d.Edge.p2.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup().

Here is the call graph for this function:

◆ boundaryPolygons()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge.boundaryPolygons ( CSG  csg)
static

Boundary polygons.

Parameters
csgthe csg
Returns
the list

Definition at line 743 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup(), eu.mihosoft.vrl.v3d.CSG.getPolygons(), and eu.mihosoft.vrl.v3d.Edge.searchPlaneGroups().

Here is the call graph for this function:

◆ boundaryPolygonsOfPlaneGroup()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup ( List< Polygon planeGroup)
staticprivate

◆ colinear() [1/2]

boolean eu.mihosoft.vrl.v3d.Edge.colinear ( Vector3d  p)

Determines whether the specified point is colinear

Parameters
ppoint to check
Returns
true if the specified point lies on this line segment; false otherwise

Definition at line 531 of file Edge.java.

References eu.mihosoft.vrl.v3d.Plane.EPSILON_Point.

Referenced by eu.mihosoft.vrl.v3d.Polygon.validateAndInit().

◆ colinear() [2/2]

boolean eu.mihosoft.vrl.v3d.Edge.colinear ( Vector3d  p,
double  TOL 
)

Definition at line 534 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.pos, eu.mihosoft.vrl.v3d.Vector3d.x(), eu.mihosoft.vrl.v3d.Vector3d.y(), and eu.mihosoft.vrl.v3d.Vector3d.z().

Here is the call graph for this function:

◆ contains() [1/2]

boolean eu.mihosoft.vrl.v3d.Edge.contains ( Vector3d  p)

Determines whether the specified point lies on tthis edge.

Parameters
ppoint to check
Returns
true if the specified point lies on this line segment; false otherwise

Definition at line 598 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.contains(), and eu.mihosoft.vrl.v3d.Plane.EPSILON.

Here is the call graph for this function:

◆ contains() [2/2]

boolean eu.mihosoft.vrl.v3d.Edge.contains ( Vector3d  p,
double  TOL 
)

Determines whether the specified point lies on tthis edge.

Parameters
ppoint to check
TOLtolerance
Returns
true if the specified point lies on this line segment; false otherwise

Definition at line 570 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.pos, eu.mihosoft.vrl.v3d.Vector3d.x(), eu.mihosoft.vrl.v3d.Vector3d.y(), and eu.mihosoft.vrl.v3d.Vector3d.z().

Referenced by eu.mihosoft.vrl.v3d.Edge.contains(), eu.mihosoft.vrl.v3d.Edge.falseBoundaryEdgeSharedWithOtherEdge(), eu.mihosoft.vrl.v3d.Edge.getClosestPoint(), and eu.mihosoft.vrl.v3d.Edge.getIntersection().

Here is the call graph for this function:

◆ equals()

boolean eu.mihosoft.vrl.v3d.Edge.equals ( Object  obj)

◆ falseBoundaryEdgeSharedWithOtherEdge()

static boolean eu.mihosoft.vrl.v3d.Edge.falseBoundaryEdgeSharedWithOtherEdge ( Edge  fbe,
Edge  e 
)
static

False boundary edge shared with other edge.

Parameters
fbethe fbe
ethe e
Returns
true, if successful

Definition at line 854 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.contains(), eu.mihosoft.vrl.v3d.Vector3d.equals(), eu.mihosoft.vrl.v3d.Edge.getP1(), eu.mihosoft.vrl.v3d.Edge.getP2(), and eu.mihosoft.vrl.v3d.Vertex.pos.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryEdgesOfPlaneGroup().

Here is the call graph for this function:

◆ fromPolygon()

static List<Edge> eu.mihosoft.vrl.v3d.Edge.fromPolygon ( Polygon  poly)
static

From polygon.

Parameters
polythe poly
Returns
the list

Definition at line 82 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.Edge(), and eu.mihosoft.vrl.v3d.Polygon.vertices.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryEdgesOfPlaneGroup(), and eu.mihosoft.vrl.v3d.svg.SVGLoad.isCCW().

Here is the call graph for this function:

◆ getClosestPoint()

Optional<Vector3d> eu.mihosoft.vrl.v3d.Edge.getClosestPoint ( Edge  e)

Returns the the point of this edge that is closest to the specified edge.

NOTE: returns an empty optional if the edges are parallel

Parameters
ethe edge to check
Returns
the the point of this edge that is closest to the specified edge

Definition at line 668 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.contains(), eu.mihosoft.vrl.v3d.Edge.direction, eu.mihosoft.vrl.v3d.Vector3d.dot(), eu.mihosoft.vrl.v3d.Plane.EPSILON, eu.mihosoft.vrl.v3d.Edge.getDirection(), eu.mihosoft.vrl.v3d.Vector3d.minus(), eu.mihosoft.vrl.v3d.Edge.p1, eu.mihosoft.vrl.v3d.Edge.p2, eu.mihosoft.vrl.v3d.Vector3d.plus(), eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Vector3d.times().

Referenced by eu.mihosoft.vrl.v3d.Edge.getIntersection().

Here is the call graph for this function:

◆ getDirection()

Vector3d eu.mihosoft.vrl.v3d.Edge.getDirection ( )

Gets the direction.

Returns
the direction

Definition at line 656 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.direction.

Referenced by eu.mihosoft.vrl.v3d.Edge.getClosestPoint().

◆ getIntersection()

Optional<Vector3d> eu.mihosoft.vrl.v3d.Edge.getIntersection ( Edge  e)

Returns the intersection point between this edge and the specified edge.

NOTE: returns an empty optional if the edges are parallel or if the intersection point is not inside the specified edge segment

Parameters
eedge to intersect
Returns
the intersection point between this edge and the specified edge

Definition at line 719 of file Edge.java.

References eu.mihosoft.vrl.v3d.Edge.contains(), and eu.mihosoft.vrl.v3d.Edge.getClosestPoint().

Here is the call graph for this function:

◆ getP1()

Vertex eu.mihosoft.vrl.v3d.Edge.getP1 ( )

◆ getP2()

Vertex eu.mihosoft.vrl.v3d.Edge.getP2 ( )

◆ hashCode()

int eu.mihosoft.vrl.v3d.Edge.hashCode ( )

Definition at line 606 of file Edge.java.

◆ isThisPointOneOfMine()

boolean eu.mihosoft.vrl.v3d.Edge.isThisPointOneOfMine ( Vertex  test)

◆ length()

double eu.mihosoft.vrl.v3d.Edge.length ( )

◆ nextUnused()

static int eu.mihosoft.vrl.v3d.Edge.nextUnused ( boolean[]  usage)
staticprivate

Returns the next unused index as specified in the given boolean array.

Parameters
usagethe usage array
Returns
the next unused index or a value < 0 if all indices are used

Definition at line 474 of file Edge.java.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPaths().

◆ searchPlaneGroups()

static List<List<Polygon> > eu.mihosoft.vrl.v3d.Edge.searchPlaneGroups ( List< Polygon polygons)
staticprivate

Search plane groups.

Parameters
polygonsthe polygons
Returns
the list

Definition at line 876 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vector3d.angle(), eu.mihosoft.vrl.v3d.Plane.normal, and eu.mihosoft.vrl.v3d.Polygon.plane.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPolygons().

Here is the call graph for this function:

◆ toPoints()

static List<Vector3d> eu.mihosoft.vrl.v3d.Edge.toPoints ( List< Edge edges)
static

To points.

Parameters
edgesthe edges
Returns
the list

Definition at line 110 of file Edge.java.

◆ toPolygon()

static Polygon eu.mihosoft.vrl.v3d.Edge.toPolygon ( List< Vector3d points,
Plane  plane 
)
static

To polygon.

Parameters
pointsthe points
planethe plane
Returns
the polygon

Definition at line 121 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vector3d.clone(), eu.mihosoft.vrl.v3d.Polygon.fromPoints(), eu.mihosoft.vrl.v3d.Plane.normal, and eu.mihosoft.vrl.v3d.Polygon.vertices.

Referenced by eu.mihosoft.vrl.v3d.Edge._toPolygons(), and eu.mihosoft.vrl.v3d.Edge.toPolygons().

Here is the call graph for this function:

◆ toPolygons()

static List<Polygon> eu.mihosoft.vrl.v3d.Edge.toPolygons ( List< Edge boundaryEdges,
Plane  plane 
)
static

To polygons.

Parameters
boundaryEdgesthe boundary edges
planethe plane
Returns
the list

Definition at line 145 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.equals(), eu.mihosoft.vrl.v3d.Edge.p1, eu.mihosoft.vrl.v3d.Edge.p2, eu.mihosoft.vrl.v3d.Vertex.pos, and eu.mihosoft.vrl.v3d.Edge.toPolygon().

Here is the call graph for this function:

◆ toString()

String eu.mihosoft.vrl.v3d.Edge.toString ( )

Definition at line 645 of file Edge.java.

References eu.mihosoft.vrl.v3d.Vertex.getX(), eu.mihosoft.vrl.v3d.Vertex.getY(), and eu.mihosoft.vrl.v3d.Vertex.getZ().

Here is the call graph for this function:

◆ toVertices()

static List<Vertex> eu.mihosoft.vrl.v3d.Edge.toVertices ( List< Edge edges)
static

To vertices.

Parameters
edgesthe edges
Returns
the list

Definition at line 100 of file Edge.java.

Member Data Documentation

◆ direction

final Vector3d eu.mihosoft.vrl.v3d.Edge.direction
private

◆ KEY_POLYGON_HOLES

final String eu.mihosoft.vrl.v3d.Edge.KEY_POLYGON_HOLES = "jcsg:edge:polygon-holes"
static

The Constant KEY_POLYGON_HOLES.

Definition at line 325 of file Edge.java.

Referenced by eu.mihosoft.vrl.v3d.Edge.boundaryPathsWithHoles(), and eu.mihosoft.vrl.v3d.Edge.boundaryPolygonsOfPlaneGroup().

◆ p1

final Vertex eu.mihosoft.vrl.v3d.Edge.p1
private

◆ p2

final Vertex eu.mihosoft.vrl.v3d.Edge.p2
private

The documentation for this class was generated from the following file: