edu.jhu.ece.iacl.jist.structures.geom
Class Segment

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.structures.geom.Segment
Direct Known Subclasses:
Edge

public class Segment
extends java.lang.Object

The Class Segment.

Author:
Blake Lucas

Field Summary
 Vertex v1
          The v2.
 Vertex v2
          The v2.
 
Constructor Summary
protected Segment(Vertex v1, Vertex v2)
          Instantiates a new segment.
 
Method Summary
 boolean contains(Vertex v)
          Contains.
 boolean contains(Vertex V1, Vertex V2)
          Contains.
 void flip()
          Flip.
 Vertex getOpposite(Vertex v)
          Gets the opposite.
 Vector3 getVector()
          Gets the vector.
 Vertex[] toArray()
          To array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

v1

public Vertex v1
The v2.


v2

public Vertex v2
The v2.

Constructor Detail

Segment

protected Segment(Vertex v1,
                  Vertex v2)
Instantiates a new segment.

Parameters:
v1 - the v1
v2 - the v2
Method Detail

toArray

public Vertex[] toArray()
To array.

Returns:
the vertex[]

getOpposite

public Vertex getOpposite(Vertex v)
Gets the opposite.

Parameters:
v - the v
Returns:
the opposite

contains

public boolean contains(Vertex v)
Contains.

Parameters:
v - the v
Returns:
true, if successful

contains

public boolean contains(Vertex V1,
                        Vertex V2)
Contains.

Parameters:
V1 - the v1
V2 - the v2
Returns:
true, if successful

flip

public void flip()
Flip.


getVector

public Vector3 getVector()
Gets the vector.

Returns:
the vector