public interface Wrappable extends PointAttachable
ModelComponent.NavpanelVisibility
Modifier and Type | Method and Description |
---|---|
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, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
isWritable, write
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, pt
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
- 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. 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. The returned distance should be negative.
If p0
is not penetrating, the method should return 0 as
quickly as it can.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 for