|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.rsl.konrad.geometry.AbstractShape
edu.stanford.rsl.konrad.geometry.AbstractSurface
edu.stanford.rsl.konrad.geometry.splines.SurfaceBSpline
public class SurfaceBSpline
Class to model a surface made of BSplines.
Field Summary | |
---|---|
static int |
TESSELATE_COMPOUND_OF_COMPOUND_SHAPES
|
static int |
TESSELATE_COMPOUND_OF_OCTREES
|
static int |
TESSELATE_COMPOUND_SHAPE
|
static int |
TESSELATE_LINEAR_OCTREE
|
static int |
TESSELATE_NESTED_OCTREE
|
Constructor Summary | |
---|---|
SurfaceBSpline(java.util.ArrayList<PointND> list,
double[] uKnots,
double[] vKnots)
Constructor for a surface BSpline. |
|
SurfaceBSpline(java.util.ArrayList<PointND> controlPoints,
SimpleVector uKnots,
SimpleVector vKnots)
Constructor for a surface BSpline. |
|
SurfaceBSpline(java.lang.String title,
java.util.ArrayList<PointND> list,
double[] uKnots,
double[] vKnots)
Constructor for a surface BSpline. |
Method Summary | |
---|---|
void |
applyTransform(Transform t)
Applies the Transform t to the object. |
double[] |
computeInitialUV(PointND point)
Computes approximate u, v coordinates to of the closest control point to the given point. |
PointND |
evaluate(double u,
double v)
Returns a point on the surface at position (u, v). |
java.util.ArrayList<PointND> |
getControlPoints()
|
int |
getDimension()
Returns the external dimension of the shape. |
PointND[] |
getRasterPoints(int number)
Rasters the shape with a given number of points or less. |
java.lang.String |
getTitle()
|
SimpleVector |
getUKnots()
|
SimpleVector |
getVKnots()
|
java.util.ArrayList<PointND> |
intersect(AbstractCurve other)
Returns the intersection points between the curve and the shape. |
PointND[] |
intersectDeCasteljau(StraightLine line)
|
boolean |
isBounded()
Returns true if the shape is of limited space |
static SurfaceBSpline |
readBSpline(java.io.BufferedReader reader)
Reads a BSpline from a BufferedReader and returns it. |
static java.util.ArrayList<SurfaceBSpline> |
readSplinesFromFile(java.lang.String filename)
|
void |
setTitle(java.lang.String title)
|
AbstractShape |
tesselateMesh(double samplingU,
double samplingV,
int mode)
Tesselates the BSplineSurface into a mesh of Triangles. |
AbstractShape |
tessellateMesh(double samplingU,
double samplingV)
Tesselates the BSplineSurface into a mesh of Triangles. |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractSurface |
---|
evaluate, getInternalDimension |
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape |
---|
getHitsOnBoundingBox_slow, getHitsOnBoundingBox, getMax, getMin |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TESSELATE_COMPOUND_SHAPE
public static final int TESSELATE_COMPOUND_OF_COMPOUND_SHAPES
public static final int TESSELATE_COMPOUND_OF_OCTREES
public static final int TESSELATE_LINEAR_OCTREE
public static final int TESSELATE_NESTED_OCTREE
Constructor Detail |
---|
public SurfaceBSpline(java.util.ArrayList<PointND> controlPoints, SimpleVector uKnots, SimpleVector vKnots)
controlPoints
- the control pointsuKnots
- the knot vector in u directionvKnots
- the knot vector in v directionpublic SurfaceBSpline(java.util.ArrayList<PointND> list, double[] uKnots, double[] vKnots)
list
- the control pointsuKnots
- the knot vector in u directionvKnots
- the knot vector in v directionpublic SurfaceBSpline(java.lang.String title, java.util.ArrayList<PointND> list, double[] uKnots, double[] vKnots)
title
- the title of the BSplinelist
- the control pointsuKnots
- the knot vector in u directionvKnots
- the knot vector in v directionMethod Detail |
---|
public java.util.ArrayList<PointND> getControlPoints()
public SimpleVector getUKnots()
public SimpleVector getVKnots()
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the title to setpublic PointND evaluate(double u, double v)
AbstractSurface
evaluate
in class AbstractSurface
u
- the internal position in u dimensionv
- the internal position in v dimension
public int getDimension()
AbstractShape
getDimension
in class AbstractShape
public static SurfaceBSpline readBSpline(java.io.BufferedReader reader) throws java.io.IOException
reader
- the reader
java.io.IOException
public static java.util.ArrayList<SurfaceBSpline> readSplinesFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public double[] computeInitialUV(PointND point)
point
- the point
public java.util.ArrayList<PointND> intersect(AbstractCurve other)
AbstractShape
intersect
in class AbstractShape
public PointND[] intersectDeCasteljau(StraightLine line)
public AbstractShape tessellateMesh(double samplingU, double samplingV)
samplingU
- number of points in u directionsamplingV
- number of points in v direction
public AbstractShape tesselateMesh(double samplingU, double samplingV, int mode)
samplingU
- number of points in u directionsamplingV
- number of points in v directionmode
- the internal representation of the mesh. Possible modes are
public void applyTransform(Transform t)
Transformable
applyTransform
in interface Transformable
applyTransform
in class AbstractShape
t
- the transform to apply to the object.public boolean isBounded()
AbstractShape
isBounded
in class AbstractShape
public PointND[] getRasterPoints(int number)
AbstractShape
getRasterPoints
in class AbstractShape
number
- the number of points
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |