Modifier and Type | Field and Description |
---|---|
static boolean |
groupHalfEdgesByHardEdge |
Point3d |
myRenderPnt |
Point3d |
pnt
3D point associated with this vertex.
|
Constructor and Description |
---|
Vertex3d()
Creates a new Vertex3d with a point initialized to (0,0,0) and an index
value of -1.
|
Vertex3d(double x,
double y,
double z)
Creates a new Vertex3d with a specified point and index value.
|
Vertex3d(double x,
double y,
double z,
int idx)
Creates a new Vertex3d with a specified point and index value.
|
Vertex3d(int idx)
Creates a new Vertex3d with point initialized to (0,0,0) and a specified
index value.
|
Vertex3d(Point3d pnt)
Creates a new Vertex3d with a specified point and an index value of -1.
|
Vertex3d(Point3d pnt,
int idx)
Creates a new Vertex3d with a specified point and index value.
|
Modifier and Type | Method and Description |
---|---|
void |
addIncidentHalfEdge(HalfEdge he)
Adds a half-edge to the list of half-edges incident onto this vertex.
|
Vertex3d |
clone() |
boolean |
computeAngleWeightedNormal(Vector3d nrm)
Computes a normal for this vertex by averaging the cross products of all
the incident half edges.
|
boolean |
computeAreaWeightedNormal(Vector3d nrm)
Computes a normal for this vertex by averaging the face normals
of all adjacent faces, scaled by their face areas
|
void |
computeCentroid(Vector3d centroid)
Computed the centroid of this element.
|
double |
computeCovariance(Matrix3d C)
Computes the covariance of the element, assuming a uniform density
of one.
|
boolean |
computeNormal(Vector3d nrm)
Computes a normal for this vertex by taking the average of all the
associated face normals.
|
boolean |
computeRenderNormal(Vector3d nrm) |
boolean |
computeWorldNormal(Vector3d nrm)
Computes a normal for this vertex by taking the average of all the
associated face normals, expressed in world coordinates
|
Vertex3d |
copy() |
double |
distance(Vector3d p) |
double |
distance(Vertex3d vtx) |
HalfEdge |
findIncidentHalfEdge(Vertex3d tail)
Looks for an incident half-edge with a given tail.
|
HalfEdge |
firstIncidentHalfEdge()
Returns the first incident half-edge listed for this vertex, or null if
there are no incident half-edges.
|
java.util.Iterator<HalfEdge> |
getIncidentHalfEdges()
Returns an iterator for all the half-edges which are incident onto this
vertex.
|
int |
getIndex()
Returns the index value associated with this vertex.
|
static int[] |
getIndices(java.util.Collection<Vertex3d> vtxs) |
MeshBase |
getMesh() |
Point3d |
getPoint(int idx)
Returns the
idx -th point associated with this element. |
Point3d |
getPosition() |
Point3d |
getWorldPoint()
Returns the point value of this vertex in world coordinates.
|
void |
getWorldPoint(Point3d pnt)
Returns the point value of this vertex in world coordinates.
|
Vertex3d |
interpolate(double s,
Vertex3d vb) |
boolean |
isGroupStart(HalfEdge he)
Start of a half edge group.
|
boolean |
isNormalBoundary(HalfEdge he)
Returns true if he is a boundary half-edge for purposes of computing
normals.
|
void |
nearestPoint(Point3d nearest,
Point3d pnt)
Determine nearest point to this feature
|
int |
numIncidentHalfEdges()
Returns the number of half-edges which are incident onto this
vertex.
|
int |
numPoints()
Returns the number of points associated with this element, if any, or
zero otherwise.
|
boolean |
removeIncidentHalfEdge(HalfEdge hedge)
Removes a half-edge from the list of half-edges incident onto this vertex.
|
void |
saveRenderInfo() |
void |
setIndex(int idx)
Sets the index value for this vertex.
|
void |
setMesh(MeshBase mesh) |
void |
setPosition(Point3d pos) |
void |
sumEdgeCrossProducts(Vector3d sum)
Sums the cross products of all inbound (indicent) and
outbound half edges.
|
void |
sumEdgeCrossProductsWorld(Vector3d sum)
Sums the cross products of all inbound (incident) and outbound
half edges, and returns the result in world coordinates.
|
void |
updateBounds(Vector3d min,
Vector3d max)
Updates the axis-aligned bounds of this element.
|
checkFlag, clearFlag, clearVisited, getType, getTypeName, isVisited, setFlag, setVisited
public static boolean groupHalfEdgesByHardEdge
public Point3d pnt
public Point3d myRenderPnt
public Vertex3d()
public Vertex3d(int idx)
idx
- desired index valuepublic Vertex3d(Point3d pnt, int idx)
pnt
field is set to refer directly to the supplied point.pnt
- point to use for the pnt
fieldidx
- desired index valuepublic Vertex3d(double x, double y, double z)
x
- vertex x coordinatey
- vertex y coordinatez
- vertex z coordinatepublic Vertex3d(double x, double y, double z, int idx)
x
- vertex x coordinatey
- vertex y coordinatez
- vertex z coordinateidx
- desired index valuepublic java.util.Iterator<HalfEdge> getIncidentHalfEdges()
HalfEdge
.public int numIncidentHalfEdges()
public boolean computeNormal(Vector3d nrm)
nrm
- returns the computed normalpublic boolean computeWorldNormal(Vector3d nrm)
nrm
- returns the computed normalpublic boolean computeAngleWeightedNormal(Vector3d nrm)
nrm
- returns the computed normalpublic boolean computeAreaWeightedNormal(Vector3d nrm)
nrm
- returns the computed normalpublic void sumEdgeCrossProducts(Vector3d sum)
sum
- returns the summed cross productspublic void sumEdgeCrossProductsWorld(Vector3d sum)
sum
- returns the summed cross productspublic boolean computeRenderNormal(Vector3d nrm)
public void addIncidentHalfEdge(HalfEdge he)
he
- HalfEdgeNode containing the half edge in questionpublic boolean isNormalBoundary(HalfEdge he)
public boolean isGroupStart(HalfEdge he)
public boolean removeIncidentHalfEdge(HalfEdge hedge)
hedge
- half-edge to removepublic HalfEdge firstIncidentHalfEdge()
public HalfEdge findIncidentHalfEdge(Vertex3d tail)
public int getIndex()
public void setIndex(int idx)
idx
- new index valuepublic void saveRenderInfo()
public Point3d getWorldPoint()
public void getWorldPoint(Point3d pnt)
public MeshBase getMesh()
public void setMesh(MeshBase mesh)
public Point3d getPosition()
public void setPosition(Point3d pos)
public Vertex3d copy()
public Vertex3d clone()
public int numPoints()
Boundable
public Point3d getPoint(int idx)
Boundable
idx
-th point associated with this element.getPoint
in interface Boundable
idx
- index of the point (must be on the range 0 to
Boundable.numPoints()
).idx
-th point associated with this element.
Must not be modified.public void updateBounds(Vector3d min, Vector3d max)
Boundable
min
and max
should be decreased or increased,
respectively, so that all spatial points associated with this element lie
within the axis-aligned box defined by min
and
max
.updateBounds
in interface Boundable
min
- minimum values to be updatedmax
- maximum values to be updatedpublic void computeCentroid(Vector3d centroid)
Boundable
computeCentroid
in interface Boundable
centroid
- returns the computed centroid value.public double computeCovariance(Matrix3d C)
Boundable
int_V \rho x x^T dV,where
\rho
is the density, x
is any
spatial point within the element, and the integral is evaluated
over the element's spatial extent. The method returns the element's
spatial size, which for elements of dimension 3, 2, 1, or 0 will
be a volume, area, length, or discrete value.
Implementation of this method is optional, with non-implementation indicated by having the method return -1. Non-implementation may prevent the element from being enclosed within certain types of oriented bounding box (OBB) constructions.
computeCovariance
in interface Boundable
C
- returns the covariancepublic static int[] getIndices(java.util.Collection<Vertex3d> vtxs)
public double distance(Vector3d p)
public double distance(Vertex3d vtx)
public void nearestPoint(Point3d nearest, Point3d pnt)
Feature
nearestPoint
in class Feature
nearest
- populated nearest pointpnt
- point to check distance to