public class FacetPoint extends AbstractBodyPoint
FacetBodyShape
.
Instance of this class are guaranteed to be immutable.
AbstractBodyPoint
,
Serialized FormBodyPoint.BodyPointName
Modifier | Constructor and Description |
---|---|
protected |
FacetPoint(FacetBodyShape bodyShape,
Intersection intersection,
String name)
Protected constructor from an
Intersection object. |
|
FacetPoint(FacetBodyShape bodyShape,
LLHCoordinates coordIn,
String name)
Constructor from lat/long/height coordinates.
Warning: Be aware of following limitations when using an LLH coordinates system using the normal height convention (typically the LLHCoordinatesSystem.BODYCENTRIC_NORMAL system):
Some regions of the space are not accessible with such a system: indeed, the accessible regions are limited
to the vertical lines from any point at the shape surface (lines intersecting the shape surface, with a direction
aligned with the local normal direction on the intersection point).
When the closest point on shape is either a vertex or placed at the boundary between two facets (on a shape
segment), an infinity of points share the same lat/long/normalHeight coordinates (see illustration below in 2D,
to be transposed in 3D).
Points on some regions of space can be built from several different lat/long/normal height coordinates.
|
|
FacetPoint(FacetBodyShape bodyShape,
LLHCoordinatesSystem coordSystem,
double latitude,
double longitude,
double height,
String name)
Constructor from lat/long/height coordinates.
Warning: Be aware of following limitations when using an LLH coordinates system using the normal height convention (typically the LLHCoordinatesSystem.BODYCENTRIC_NORMAL system):
Some regions of the space are not accessible with such a system: indeed, the accessible regions are limited
to the vertical lines from any point at the shape surface (lines intersecting the shape surface, with a direction
aligned with the local normal direction on the intersection point).
When the closest point on shape is either a vertex or placed at the boundary between two facets (on a shape
segment), an infinity of points share the same lat/long/normalHeight coordinates (see illustration below in 2D,
to be transposed in 3D).
Points on some regions of space can be built from several different lat/long/normal height coordinates.
|
|
FacetPoint(FacetBodyShape bodyShape,
Vector3D position,
Frame frame,
AbsoluteDate date,
String name)
Constructor from a position expressed in any given frame.
|
protected |
FacetPoint(FacetBodyShape bodyShape,
Vector3D position,
List<Triangle> closestTriangles,
boolean onTheShape,
String name)
Protected constructor from a position, a list of closest triangles and a flag stating if the point is known to be
on the shape: if the latter is set true, the normal height is set to 0 and the closest and radial projections on
the shape are set equal to this.
|
|
FacetPoint(FacetBodyShape bodyShape,
Vector3D position,
String name)
Constructor from a position.
|
Modifier and Type | Method and Description |
---|---|
protected Vector3D |
computeNormal()
Method to compute normal direction in body frame, to be implemented in each specific child class of
AbstractBodyPoint . |
FacetBodyShape |
getBodyShape()
Get the
BodyShape associated to this body point. |
FacetPoint |
getClosestPointOnShape()
Returns the closest point to this on the shape surface.
|
List<Triangle> |
getClosestTriangles()
Get the list of shape triangles closest to this.
|
FacetPoint |
getRadialProjectionOnShape()
Returns the body point, on the associated shape surface, in the radial direction corresponding to the position of
this: if several of them (may happen for not star-convex shapes), the method considers the one farthest to the
body frame origin (having the largest norm).
Warnings: the returned point is not necessary the closest point belonging to the shape in the radial direction. |
protected void |
setClosestPointOnShape(BodyPoint closestOnShape)
Setter for the entered body point as closest point on shape.
|
String |
toString(LLHCoordinatesSystem coordSystem)
Getter for a string representing the object using the entered coordinates system.
Note: the method may induce some computation if the coordinates and/or the closest triangles have not been computed yet. |
computePositionHeightCoordinateSignum, getLLHCoordinates, getName, getNormal, getNormalHeight, getPosition, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
angularSeparation, distance, getLLHCoordinates, getNativeFrame, getNormal, getPVCoordinates, isInsideShape, isOnShapeSurface
public FacetPoint(FacetBodyShape bodyShape, LLHCoordinatesSystem coordSystem, double latitude, double longitude, double height, String name)
LLHCoordinatesSystem.BODYCENTRIC_NORMAL
system):
o v0 = vertex0 . <-- normale to s01 %% \ . %%%%% \ . %%%%%%%% \ s01= segment between . %%%%%%%%% \ v0 and v1 . %%%%%%%%%% \ . \ %%%%%%%%%%% \ _ . | same {lat, long, normalHeight} coordinates on the portion of any sphere centered on v1 %%%%%%%%%%%% \ \ . | %%%%%%%%%%%%% o v1 . . . / . . . . . <-- normale to s12 %%%%%%%%%%%%% |_| %%%%%%%%%%%%% | %%%%%%%%%%%%% | %% INSIDE %%% | s12 %% BODY %%% | %%%%%%%%%%%%% | %%%%%%%%%%%%% |_ %%%%%%%%%%%%% | | %%%%%%%%%%%%% o v2 . . . . . . . . . . <-- normale to s12 %%%%%%%%%%%% /_/ . . %%%%%%%%%%% / . . %%%%%%%%%% / . . %%%%%%%%% / s23 . . <-- only the bisector is accessible to construction from {lat, long, normal height} coordinates %%%%%%%% / . %%%%%%% / . %%%%% / . %%% o v3 <-- normale to s23
bodyShape
- body shape on which the point is definedcoordSystem
- LLH coordinates system in which are expressed the entered lat/long/height (must not be
LLHCoordinatesSystem.ELLIPSODETIC
otherwise an exception is raised)latitude
- input latitudelongitude
- input longitudeheight
- input heightname
- name of the pointIllegalArgumentException
- if the input coordinates use the LLHCoordinatesSystem.ELLIPSODETIC
systempublic FacetPoint(FacetBodyShape bodyShape, LLHCoordinates coordIn, String name)
LLHCoordinatesSystem.BODYCENTRIC_NORMAL
system):
o v0 = vertex0 . <-- normale to s01 %% \ . %%%%% \ . %%%%%%%% \ s01= segment between . %%%%%%%%% \ v0 and v1 . %%%%%%%%%% \ . \ %%%%%%%%%%% \ _ . | same {lat, long, normalHeight} coordinates on the portion of any sphere centered on v1 %%%%%%%%%%%% \ \ . | %%%%%%%%%%%%% o v1 . . . / . . . . . <-- normale to s12 %%%%%%%%%%%%% |_| %%%%%%%%%%%%% | %%%%%%%%%%%%% | %% INSIDE %%% | s12 %% BODY %%% | %%%%%%%%%%%%% | %%%%%%%%%%%%% |_ %%%%%%%%%%%%% | | %%%%%%%%%%%%% o v2 . . . . . . . . . . <-- normale to s12 %%%%%%%%%%%% /_/ . . %%%%%%%%%%% / . . %%%%%%%%%% / . . %%%%%%%%% / s23 . . <-- only the bisector is accessible to construction from {lat, long, normal height} coordinates %%%%%%%% / . %%%%%%% / . %%%%% / . %%% o v3 <-- normale to s23
bodyShape
- body shape on which the point is definedcoordIn
- lat/long/height coordinates associated with the coordinates system in which they are expressedname
- name of the pointIllegalArgumentException
- if the input coordinates use the LLHCoordinatesSystem.ELLIPSODETIC
systempublic FacetPoint(FacetBodyShape bodyShape, Vector3D position, String name)
bodyShape
- body shape on which the point is definedposition
- point position in body framename
- name of the pointpublic FacetPoint(FacetBodyShape bodyShape, Vector3D position, Frame frame, AbsoluteDate date, String name) throws PatriusException
bodyShape
- body shape on which the point is definedposition
- position in provided frame at provided dateframe
- framedate
- datename
- name of the pointPatriusException
- if frame transformation cannot be computed at provided dateprotected FacetPoint(FacetBodyShape bodyShape, Vector3D position, List<Triangle> closestTriangles, boolean onTheShape, String name)
bodyShape
- body shape on which the point is definedposition
- point position in body frameclosestTriangles
- list of closest trianglesonTheShape
- flag stating if the point is known to be on the shape or not: if true, both closestPointOnShape and
radialPointOnShape attribute are set equal to this, and normalHeight is set to 0name
- name of the pointprotected FacetPoint(FacetBodyShape bodyShape, Intersection intersection, String name)
Intersection
object.
The built facet point is associated with one single triangle.
bodyShape
- body shape on which the point is definedintersection
- intersection defining both the position and the associated shape trianglename
- name of the pointpublic List<Triangle> getClosestTriangles()
public FacetBodyShape getBodyShape()
BodyShape
associated to this body point.getBodyShape
in interface BodyPoint
getBodyShape
in class AbstractBodyPoint
BodyShape
associated to this body pointpublic FacetPoint getRadialProjectionOnShape()
The returned facet point is associated with one single triangle.
getRadialProjectionOnShape
in interface BodyPoint
getRadialProjectionOnShape
in class AbstractBodyPoint
public FacetPoint getClosestPointOnShape()
The returned facet point is associated with one or several triangles following its position on the shape:
getClosestPointOnShape
in interface BodyPoint
getClosestPointOnShape
in class AbstractBodyPoint
protected void setClosestPointOnShape(BodyPoint closestOnShape)
setClosestPointOnShape
in class AbstractBodyPoint
closestOnShape
- body point to be setIllegalArgumentException
- if the entered body point is not a FacetPoint
instanceprotected final Vector3D computeNormal()
AbstractBodyPoint
.
Associated getter AbstractBodyPoint.getNormal()
is implemented in this class in order to handle lazy initialization of
this attribute. AbstractBodyPoint.getNormal()
).computeNormal
in class AbstractBodyPoint
public String toString(LLHCoordinatesSystem coordSystem)
toString
in interface BodyPoint
toString
in class AbstractBodyPoint
coordSystem
- coordinates system to be usedCopyright © 2023 CNES. All rights reserved.