Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18504/src/net/sourceforge/bprocessor/gl/model
Added Files:
Intersection.java
Log Message:
Implemented general mechanism for finding point in model (vertex, point on edge, point on surface, edge intersection, surface/edge intersection, edge midpoint)
--- NEW FILE: Intersection.java ---
//---------------------------------------------------------------------------------
// $Id: Intersection.java,v 1.1 2006/03/07 22:31:06 henryml Exp $
//
// Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net)
// Released under the Lesser GNU Public License v2.1
//---------------------------------------------------------------------------------
package net.sourceforge.bprocessor.gl.model;
import net.sourceforge.bprocessor.model.Geometric;
import net.sourceforge.bprocessor.model.Vertex;
/**
* Intersection
*/
public class Intersection {
/** Vertex point */
public static final int VERTEX = 1;
/** Edge point */
public static final int EDGE = 2;
/** Surface point */
public static final int SURFACE = 3;
/** Edge midpoint */
public static final int EDGE_MIDPOINT = 4;
/** Edge intersection */
public static final int EDGE_INTERSECTION = 5;
/** Surface intersection */
public static final int SURFACE_INTERSECTION = 6;
/** Plane intersection */
public static final int PLANE_INTERSECTION = 7;
/** The vertex */
private Vertex vertex;
/** The type */
private int type;
/** The primary object */
private Geometric object;
/**
* Constructor
* @param vertex The vertex
* @param type The type
* @param object The object
*/
public Intersection(Vertex vertex, int type, Geometric object) {
super();
this.vertex = vertex;
this.type = type;
this.object = object;
}
/**
*
* @return vertex
*/
public Vertex vertex() {
return vertex;
}
/**
*
* @return type
*/
public int type() {
return type;
}
/**
*
* @return object
*/
public Geometric object() {
return object;
}
}
|