|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--unbboolean.bool.Segment
Represents a line segment resulting from a intersection of a face and a plane.
See:
D. H. Laidlaw, W. B. Trumbore, and J. F. Hughes.
"Constructive Solid Geometry for Polyhedral Objects"
SIGGRAPH Proceedings, 1986, p.161.
Field Summary | |
static int |
EDGE
define as edge one of the segment ends |
static int |
FACE
define as face one of the segment ends |
static int |
VERTEX
define as vertex one of the segment ends |
Constructor Summary | |
Segment(Line line,
Face face,
int sign1,
int sign2,
int sign3)
Constructs a Segment based on elements obtained from the two planes relations |
Method Summary | |
java.lang.Object |
clone()
Clones the Segment object |
double |
getEndDistance()
Gets the distance from the origin until ending point |
javax.vecmath.Point3d |
getEndPosition()
Gets the ending position |
int |
getEndType()
Gets the type of the ending point |
Vertex |
getEndVertex()
Gets the end vertex |
int |
getIntermediateType()
Gets the type of the segment between the starting and ending points |
int |
getNumEndsSet()
Gets the number of ends already set |
double |
getStartDistance()
Gets the distance from the origin until the starting point |
javax.vecmath.Point3d |
getStartPosition()
Gets the starting position |
int |
getStartType()
Gets the type of the starting point |
Vertex |
getStartVertex()
Gets the start vertex |
boolean |
intersect(Segment segment)
Checks if two segments intersect |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int VERTEX
public static final int FACE
public static final int EDGE
Constructor Detail |
public Segment(Line line, Face face, int sign1, int sign2, int sign3)
line
- resulting from the two planes intersectionface
- face that intersects with the planesign1
- position of the face vertex1 relative to the plane (-1 behind, 1 front, 0 on)sign2
- position of the face vertex1 relative to the plane (-1 behind, 1 front, 0 on)sign3
- position of the face vertex1 relative to the plane (-1 behind, 1 front, 0 on)Method Detail |
public java.lang.Object clone()
clone
in class java.lang.Object
public Vertex getStartVertex()
public Vertex getEndVertex()
public double getStartDistance()
public double getEndDistance()
public int getStartType()
public int getIntermediateType()
public int getEndType()
public int getNumEndsSet()
public javax.vecmath.Point3d getStartPosition()
public javax.vecmath.Point3d getEndPosition()
public boolean intersect(Segment segment)
segment
- the other segment to check the intesection
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |