|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hedgehog.HObject
com.hedgehog.geo.GeometricObject
com.hedgehog.geo.threed.surfaces.Surface3D
com.hedgehog.geo.threed.surfaces.QuadraticSurface3D
public class QuadraticSurface3D
Title: QuadraticSurface3D - models a 3D quadratic/quadric surface.
Description: Models a 3D quadratic/quadric surface as an QuadraticEquation3D object.
This class supports the method intersection(), which tests for an intersection between a surface and a 3D ray. Thus, if the QuadraticSurface3D object can be formed for a 3D object/surface then a ray-intersection test exists.
For example, Sphere3D supports the method toQuadraticSurface3D() which returns a QuadraticSurface3D.
Copyright: Copyright (c) Hedgehog Software 2007-2009.
Company: Hedgehog Software
QuadraticShape2D,
QuadraticEquation3D| Field Summary | |
|---|---|
protected QuadraticEquation3D |
mQuadraticEquation
The surface quadratic equation. |
protected double |
mxMax
Maximum x value. |
protected double |
mxMin
Minimum x value. |
protected double |
myMax
Maximum y value. |
protected double |
myMin
Minimum y value. |
protected double |
mzMax
Maximum z value. |
protected double |
mzMin
Minimum z value. |
| Fields inherited from class com.hedgehog.geo.threed.surfaces.Surface3D |
|---|
mBoundingBox |
| Fields inherited from class com.hedgehog.HObject |
|---|
mID, mName |
| Constructor Summary | |
|---|---|
QuadraticSurface3D()
Default constructor. |
|
QuadraticSurface3D(QuadraticEquation3D quadraticEquation)
Constructor. |
|
QuadraticSurface3D(QuadraticEquation3D quadraticEquation,
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax)
Constructor. |
|
QuadraticSurface3D(QuadraticSurface3D object)
Copy constructor. |
|
| Method Summary | |
|---|---|
java.util.Vector<ModelObject> |
childModelObjects()
Returns a vector of this object's child ModelObject objects. |
java.sql.PreparedStatement |
databaseInsertStatement(java.sql.Connection connection,
int modelID)
Returns a prepared statement for inserting (INSERT command) a ModelObject object into a database. |
java.sql.PreparedStatement |
databaseUpdateStatement(java.sql.Connection connection,
int modelID)
Returns a prepared statement for updating (UPDATE command) a ModelObject object into a database. |
ModelObject |
fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int objectID)
Returns a model object from the specified database table. |
ModelObject |
fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
Returns a model object from the specified xml node. |
QuadraticEquation3D |
getQuadraticEquation3D()
Returns the underlying quadratic equation. |
double |
getXMax()
Returns the maximum x value. |
double |
getXMin()
Returns the minimum x value. |
double |
getYMax()
Returns the maximum y value. |
double |
getYMin()
Returns the minimum y value. |
double |
getZMax()
Returns the maximum z value. |
double |
getZMin()
Returns the minimum z value. |
Intersection3D |
intersection(Ray3D ray,
double tolerance)
Tests for intersection between this surface and the specified ray. |
Intersection3D |
intersection(StraightLine3D line,
double tolerance)
Returns the intersection object between this general surface and a straight line segment. |
Vector3D |
normal(Point3D p,
boolean normalised)
Returns the normal at the specified point. |
Point3D |
pointOnSurface(double u,
double v,
double tolerance)
Returns null since a QuadraticSurface3D object is represented implicitly via a QuadraticEquation3D object, which requires x, y and z coordinates to evaluate. |
boolean |
pointOnSurface(Point3D p,
double tolerance)
Tests whether or not the specified point is on the surface of this shape. |
void |
setQuadraticEquation3D(QuadraticEquation3D quadraticEquation)
Sets the underlying quadratic equation. |
void |
setXMax(double xmax)
Sets the maximum x value. |
void |
setXMin(double xmin)
Sets the minimum x value. |
void |
setYMax(double ymax)
Sets the maximum y value. |
void |
setYMin(double ymin)
Sets the minimum y value. |
void |
setZMax(double zmax)
Sets the maximum z value. |
void |
setZMin(double zmin)
Sets the minimum z value. |
java.lang.String |
toString()
Returns a String representation of a QuadraticSurface3D object. |
X3DNode |
toX3DNode(X3DObject x3dObject)
X3D support. |
org.w3c.dom.Element |
toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode)
Returns the xml node of this object. |
| Methods inherited from class com.hedgehog.geo.threed.surfaces.Surface3D |
|---|
area, areaOfPatch, cornerPoint00, cornerPoint01, cornerPoint10, cornerPoint11, curvatureU, curvatureV, elementalArea, feature, featureFromGaussMeanCurvature, gaussCurvature, gaussMeanCurvatures, getBoundingBox, is2D, is3D, isCornerPoint, isCurve, isGrid, isMesh, isPoint, isPointSet, isShape, isSurface, magnitudesFirstOrder, magnitudesSecondOrder, meanCurvature, minmaxScalarProperty, minmaxVectorProperty, normal, parametricCheck, pointNet, principalCurvatures, radiusCurvatureU, radiusCurvatureV, secondDerivativeU, secondDerivativeUV, secondDerivativeV, setBoundingBox, tangentVectorU, tangentVectorV, twistVector |
| Methods inherited from class com.hedgehog.geo.GeometricObject |
|---|
objectDimension |
| Methods inherited from class com.hedgehog.HObject |
|---|
clone, compare, compareTo, copy, equals, getID, getName, hashCode, hasID, hasName, setID, setName |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected QuadraticEquation3D mQuadraticEquation
protected double mxMin
protected double mxMax
protected double myMin
protected double myMax
protected double mzMin
protected double mzMax
| Constructor Detail |
|---|
public QuadraticSurface3D()
public QuadraticSurface3D(QuadraticEquation3D quadraticEquation)
quadraticEquation - The underlying quadratic equation.
public QuadraticSurface3D(QuadraticEquation3D quadraticEquation,
double xmin,
double xmax,
double ymin,
double ymax,
double zmin,
double zmax)
quadraticEquation - The underlying quadratic equation.xmin - Minimum x value.xmax - Maximum x value.ymin - Minimum y value.ymax - Maximum y value.zmin - Minimum z value.zmax - Maximum z value.public QuadraticSurface3D(QuadraticSurface3D object)
object - Object to copy.| Method Detail |
|---|
public QuadraticEquation3D getQuadraticEquation3D()
public void setQuadraticEquation3D(QuadraticEquation3D quadraticEquation)
quadraticEquation - New QuadraticEquation3D object.public double getXMin()
public double getXMax()
public double getYMin()
public double getYMax()
public double getZMin()
public double getZMax()
public void setXMin(double xmin)
xmin - New minimum x value.public void setXMax(double xmax)
xmax - New maximum x value.public void setYMin(double ymin)
ymin - New minimum y value.public void setYMax(double ymax)
ymax - New maximum y value.public void setZMin(double zmin)
zmin - New minimum z value.public void setZMax(double zmax)
zmax - New maximum z value.
public Intersection3D intersection(Ray3D ray,
double tolerance)
ray - Ray.tolerance - Required tolerance.
public Intersection3D intersection(StraightLine3D line,
double tolerance)
line - The straight line to test for intersection with this torus.tolerance - Required tolerance.
public boolean pointOnSurface(Point3D p,
double tolerance)
p - Point to test.tolerance - Required tolerance.
public Vector3D normal(Point3D p,
boolean normalised)
p - Point at which surface normal is required.normalised - Specifies whether or not the returned vector is normalised or not.
public java.lang.String toString()
toString in class java.lang.Object
public Point3D pointOnSurface(double u,
double v,
double tolerance)
throws java.lang.IllegalArgumentException
pointOnSurface in class Surface3Du - Parametric u coordinate.v - Parametric v coordinate.tolerance - Required tolerance.
java.lang.IllegalArgumentException - Thrown if (u,v) are out of range [0:1].public java.util.Vector<ModelObject> childModelObjects()
childModelObjects in interface ModelObject
public java.sql.PreparedStatement databaseInsertStatement(java.sql.Connection connection,
int modelID)
throws java.sql.SQLException
databaseInsertStatement in interface ModelObjectconnection - Database connection.modelID - Model ID.
java.sql.SQLException - Thrown if an SQL exception occurs.
public java.sql.PreparedStatement databaseUpdateStatement(java.sql.Connection connection,
int modelID)
throws java.sql.SQLException
databaseUpdateStatement in interface ModelObjectconnection - Database connection.modelID - Model ID.
java.sql.SQLException - Thrown if an SQL exception occurs.
public org.w3c.dom.Element toXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Element documentRootNode)
throws InvalidObjectException
toXMLNode in interface ModelObjectdocument - XML document.documentRootNode - Document root node.
InvalidObjectException - Thrown if this object's ID is equal to the default ID of -1.
public ModelObject fromXMLNode(org.w3c.dom.Document document,
org.w3c.dom.Node documentRootNode,
org.w3c.dom.Node node,
Model model)
throws InvalidObjectException
fromXMLNode in interface ModelObjectdocument - XML document.documentRootNode - Document root node; ie Model node.node - XML node.model - The model to which the returned object is associated with.
InvalidObjectException - Thrown if an error occurred building the object.
public ModelObject fromDatabase(java.sql.Connection connection,
Model model,
int modelID,
int objectID)
throws java.sql.SQLException
fromDatabase in interface ModelObjectconnection - Database connection.modelID - Model ID.objectID - Object ID in associated ModelObjects table.model - Model built from database.
java.sql.SQLException - Thrown if an SQL exception occurs.
public X3DNode toX3DNode(X3DObject x3dObject)
throws InvalidObjectException
toX3DNode in interface ModelObjectx3dObject - X3D object.
InvalidObjectException - Thrown if this object is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||