public interface Wrappable extends PointAttachable
ModelComponent.NavpanelVisibility
Modifier and Type | Field and Description |
---|---|
static double |
OUTSIDE |
Modifier and Type | Method and Description |
---|---|
double |
getCharacteristicRadius()
Returns a typical "radius" that should be expected for this wrappable,
defined as the distance for a surface point to the center.
|
RigidTransform3d |
getPose() |
double |
penetrationDistance(Vector3d nrm,
Matrix3d dnrm,
Point3d p0)
Computes the penetration distance of a point
p0 into this
Wrappable, along with the normal nrm that points from
p0 to its nearest point on the surface. |
void |
surfaceTangent(Point3d pt,
Point3d pa,
Point3d p1,
double lam0,
Vector3d sideNrm)
Computes the point
pt on the surface of this Wrappable such
that the line segment (pa,pt) is both tangent to the surface and as near
as possible to the line defined by the two points pa and p1. |
createPointAttachment
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
static final double OUTSIDE
void surfaceTangent(Point3d pt, Point3d pa, Point3d p1, double lam0, Vector3d sideNrm)
pt
on the surface of this Wrappable such
that the line segment (pa,pt) is both tangent to the surface and as near
as possible to the line defined by the two points pa and p1.
To assist with the computation, pKcheck[kmax]t
can be assumed to lie
fairly close to p1
, and its projection onto the line can be
assumed to lie between p1
and another point p0 defined by
p0 = (1-lam0) pa + lam0 p1where
lam0
is a parameter between 0 and 1.pt
- returns the tangent pointpa
- first point of the linep1
- second point of the linelam0
- parameter defining point p0 as defined abovesideNrm
- a normalized vector perpendicular to the plane defined by
pa
, p1
and pt
. Can be used
to help compute pt
double penetrationDistance(Vector3d nrm, Matrix3d dnrm, Point3d p0)
p0
into this
Wrappable, along with the normal nrm
that points from
p0
to its nearest point on the surface. The distance should
be negative if the point is inside the wrappable, and positive otherwise.
If the point is outside and further than some minimum distance,
then the method should return the constant OUTSIDE
.
If possible, the method should also compute the derivative of the
normal with respect to changes in p0
, and return this in
dnrm
. If this is not possible, dnrm
should be
set to 0.
nrm
- returns the normal (should be normalized)dnrm
- returns the derivative of the normal with respect to
changes in p0, or zero if this cannot be determined.p0
- point to determine penetration forOUTSIDE
if the
point is further than some minimum distance from the wrappable.double getCharacteristicRadius()
RigidTransform3d getPose()