Package cz.fidentis.analyst.data.mesh
Interface MeshPoint
- All Superinterfaces:
IPosition
,Serializable
- All Known Subinterfaces:
RayIntersection
- All Known Implementing Classes:
MeshPointImpl
,RayIntersectionImpl
MeshPoint represents a point with position, normal, and texture coordinates
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
distance
(javax.vecmath.Point3d v1, javax.vecmath.Point3d v2) Helper method that calculates distance of two 3D points.javax.vecmath.Vector3d
Returns normal vector at the pointjavax.vecmath.Point3d
get position of thePoint3d
objectjavax.vecmath.Vector3d
double
relativeDistance
(javax.vecmath.Point3d point) Method for calculating relative distance topoint
.void
setCurvature
(Curvature curvature) Sets curvature of the mesh point.void
setNormal
(javax.vecmath.Vector3d newNormal) Sets the normal vectorvoid
setPosition
(javax.vecmath.Point3d newPos)
-
Method Details
-
distance
static double distance(javax.vecmath.Point3d v1, javax.vecmath.Point3d v2) Helper method that calculates distance of two 3D points.- Parameters:
v1
- The first 3D point. Must not be null.v2
- The second 3D point. Must not be null.- Returns:
- distance
- Throws:
NullPointerException
- if some input parameter is missing.
-
relativeDistance
double relativeDistance(javax.vecmath.Point3d point) Method for calculating relative distance topoint
. Positive ifpoint
is in front (same side as normal vector) ofMeshPoint
. Negative ifpoint
is behind (opposite side as normal vector) ofMeshPoint
.- Parameters:
point
-Point3d
from which to calculate relative distance toMeshPoint
.- Returns:
- Positive or negative distance depending if
point
is in front of/behindMeshPoint
.
-
getNormal
javax.vecmath.Vector3d getNormal()Returns normal vector at the point- Returns:
- normal vector at the point
-
getPosition
javax.vecmath.Point3d getPosition()Description copied from interface:IPosition
get position of thePoint3d
object- Specified by:
getPosition
in interfaceIPosition
- Returns:
- position of the
Point3d
object
-
getCurvature
Curvature getCurvature()- Returns:
- curvature
-
getTexCoord
javax.vecmath.Vector3d getTexCoord()- Returns:
- texture coordinates
-
setPosition
void setPosition(javax.vecmath.Point3d newPos) - Parameters:
newPos
- New position, must not benull
-
setNormal
void setNormal(javax.vecmath.Vector3d newNormal) Sets the normal vector- Parameters:
newNormal
- New normal vector ornull
-
setCurvature
Sets curvature of the mesh point.- Parameters:
curvature
- Curvature
-