Public Member Functions | Private Attributes
edu.tum.cs.vis.model.util.Edge Class Reference

List of all members.

Public Member Functions

boolean containsVertex (Vertex v)
boolean containsVertexInside (Vertex v)
 Edge ()
 Edge (Vertex position1, Vertex position2)
Vector3f getEdgeValue ()
Vector3f getInvertedEdgeValue ()
Vertex[] getVerticesOfEdge ()
boolean hasVertex (Vertex v)
boolean isCollinear (Edge edge)
boolean isDirectNeighbor (Edge nEdge)
boolean isEqualTo (Edge edge)
boolean isSharpEdge ()
void isSharpEdge (final boolean value)
void setEdgeValue ()
void setInvertedEdgeValue ()
void setVerticesOfEdge (final Vertex position1, final Vertex position2)
String toString ()

Private Attributes

final Vector3f edge = new Vector3f()
final Vector3f invertedEdge = new Vector3f()
boolean isSharpEdge = false
final Vertex[] vertices = new Vertex[2]

Detailed Description

Class which implements a 3D edge entity. An edge contains of two vertices and of its coordinate vector value.

Author:
Andrei Stoica

Definition at line 19 of file Edge.java.


Constructor & Destructor Documentation

Default empty constructor for the Edge class

Definition at line 44 of file Edge.java.

edu.tum.cs.vis.model.util.Edge.Edge ( Vertex  position1,
Vertex  position2 
) [inline]

Constructor for the Edge class based on two points. Zero-length edges are allowed, since they trivially collapse to a point

Definition at line 52 of file Edge.java.


Member Function Documentation

Checks if the vertex v belongs to the support line of the edge

Parameters:
vvertex to be checked
Returns:
true if v is on the direction of the edge, false otherwise

Definition at line 212 of file Edge.java.

Checks if a vertex is inside the edge instance. This is checked taking in to consideration the two checking spheres of the vertices equality against other vertices. Thus a point is considered within the edge if it lies around the edge with a small tolerance and it is in between the boundaries of the two tolerance spheres enclosing the edge vertices.

Parameters:
vvertex
Returns:
true or false

Definition at line 238 of file Edge.java.

Gets the vectorial description of the edge equal to the already computed vectorial difference between vertex1 and vertex2 associated with the Edge object

Returns:
the edge 3D vector

Definition at line 66 of file Edge.java.

Gets the inverted vectorial description of the edge equal to the already computed vectorial difference between vertex2 and vertex1 associated with the Edge object

Returns:
the inversed edge 3D vector

Definition at line 76 of file Edge.java.

Gets the array containing the two vertices that define the Edge object.

Returns:
the array of two vertices of the edge: vertices[0] vertex no. 1, vertices[1] vertex no. 2.

Definition at line 86 of file Edge.java.

Returns whether a vertex has the same coordinates with the one of the edge vertices. By same coordinates tolerance spheres of a fixed small radius around the edge vertices are considered for the comparisons, in order to allow some tolerance given the floating point numbers, see: edu.tum.cs.vis.model.util.Thresholds#DISTANCE_TOLERANCE and edu.tum.cs.vis.model.util.Vertex#sameCoordinates(javax.vecmath.Point3f)

Parameters:
vvertex to be checked
Returns:
true if vertex is in sphere, false otherwise

Definition at line 110 of file Edge.java.

Checks if the current instance is has the same direction with the edge passed as argument. The edges' vectorial description are compared in this sense and depdending on their angle a decision is taken. Two edges are collinear (have same direction) if the angle between them is close to 0 or 180 with some tolerance level edu.tum.cs.vis.model.util.Thresholds#ANGLE_TOLERANCE

Parameters:
edgeto be checked
Returns:
boolean true if collinear / false if not

Definition at line 194 of file Edge.java.

Checks if the edge passed as an argument is a direct neighbor of the current edge instance. A direct neighbor is defined as an edge that has the same direction as the edge instance calling the method, and additionally, also has at least one vertex laying inside the edge instance (end vertices of this edge are excluded) or both end vertices coincide to the edge instance calling the method

Parameters:
nEdgeedge to be compared to the edge instance callign the method
Returns:
true or false

Definition at line 277 of file Edge.java.

boolean edu.tum.cs.vis.model.util.Edge.isEqualTo ( Edge  edge) [inline]

Checks if the edge is equal to the edge passed as argument. Two edges are equal if they have the same vertices and same edge value

Parameters:
edgeedge to be compared with
Returns:
boolean

Definition at line 171 of file Edge.java.

Returns whether an edge is sharp or not

Returns:
true if edge is sharp and false otherwise

Definition at line 95 of file Edge.java.

void edu.tum.cs.vis.model.util.Edge.isSharpEdge ( final boolean  value) [inline]

Sets isSharpEdge attribute to a valid boolean value

Parameters:
valuevalue to be set

Definition at line 159 of file Edge.java.

Sets the edge vector based on the existing vertices. If one of the vertices is null, nothing is done. The edge value is defined as edge := (vertex1 - vertex2)

Definition at line 121 of file Edge.java.

Sets the inverted edge vector based on the existing vertices. If one of the vertices is null, nothing is done. The edge value is defined as edge := (vertex2 - vertex1)

Definition at line 133 of file Edge.java.

void edu.tum.cs.vis.model.util.Edge.setVerticesOfEdge ( final Vertex  position1,
final Vertex  position2 
) [inline]

Sets the vertices of the edge object and afterwards computes the edge and inverted edge vectors.

Parameters:
position1first vertex of the edge
position2second vertex of the edge

Definition at line 146 of file Edge.java.

Definition at line 295 of file Edge.java.


Member Data Documentation

final Vector3f edu.tum.cs.vis.model.util.Edge.edge = new Vector3f() [private]

Stores the edge coordinates as a 3D floating point vector

Definition at line 24 of file Edge.java.

final Vector3f edu.tum.cs.vis.model.util.Edge.invertedEdge = new Vector3f() [private]

Stores the reciprocal edge vectorial coordinates vector

Definition at line 29 of file Edge.java.

boolean edu.tum.cs.vis.model.util.Edge.isSharpEdge = false [private]

Boolean field that stores if an edge is sharp or not

Definition at line 39 of file Edge.java.

Array containing the two vertices that define the edge

Definition at line 34 of file Edge.java.


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


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Mon Oct 6 2014 01:29:56