public abstract class DeformationTransformer extends GeometryTransformer
r
returns its deformed position
f(r)
and the deformation gradient F
at that
location.GeometryTransformer.Constrainer, GeometryTransformer.UndoState, GeometryTransformer.UniformScalingConstrainer
Constructor and Description |
---|
DeformationTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
computeTransform(AffineTransform3d XR,
AffineTransform3d X1)
Transforms an affine transform
X1 and returns the result in
XR . |
void |
computeTransform(Matrix3d MR,
Matrix3d M1,
Vector3d r)
Transforms a general 3 X 3 matrix
M1 , located at reference
position r , and returns the result in MR . |
void |
computeTransform(Plane pr,
Plane p1,
Vector3d r)
Transforms a plane
p1 , located at reference position
r , and returns the result in pr . |
void |
computeTransform(RigidTransform3d TR,
RigidTransform3d T1)
Transforms a rigid transform
T1 and returns the result in
TR . |
void |
computeTransform(RotationMatrix3d RR,
RotationMatrix3d R1,
Vector3d r)
Transforms a rotation matrix
R1 , located at reference
position r , and returns the result in RR . |
void |
computeTransformPnt(Point3d pr,
Point3d p1)
Transforms a point
p1 and returns the result in
pr . |
void |
computeTransformVec(Vector3d vr,
Vector3d v1,
Vector3d r)
Transforms a vector
v1 , and returns the result in
vr . |
abstract void |
getDeformation(Vector3d p,
Matrix3d F,
Vector3d r)
Computes the deformed position
f(r) and deformation
gradient F for a given reference point r in
undeformed coordinates. |
DeformationTransformer |
getInverse()
Returns
null by since this transformer is not by default
invertible; subclasses my override this. |
boolean |
isAffine()
Returns
false since this transformer does not implement a
linear affine transform. |
boolean |
isInvertible()
Returns
false since this transformer is not by default
invertible; subclasses my override this. |
boolean |
isRigid()
Returns
false since this transformer does not implement a
linear rigid transform. |
computeLocalTransform, computeRightAffineTransform, computeTransform, create, isRestoring, isSaving, popRestoreData, restoreObject, saveObject, setUndoState, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transform, transformPnt, transformPnt, transformVec, transformVec, transformWorld, transformWorld
public boolean isRigid()
false
since this transformer does not implement a
linear rigid transform.isRigid
in class GeometryTransformer
public boolean isAffine()
false
since this transformer does not implement a
linear affine transform.isAffine
in class GeometryTransformer
public boolean isInvertible()
false
since this transformer is not by default
invertible; subclasses my override this.isInvertible
in class GeometryTransformer
public DeformationTransformer getInverse()
null
by since this transformer is not by default
invertible; subclasses my override this.getInverse
in class GeometryTransformer
public abstract void getDeformation(Vector3d p, Matrix3d F, Vector3d r)
f(r)
and deformation
gradient F
for a given reference point r
in
undeformed coordinates.p
- if non-null
, returns the deformed positionF
- if non-null
, returns the deformation gradientr
- reference point in undeformed coordinatespublic void computeTransformPnt(Point3d pr, Point3d p1)
p1
and returns the result in
pr
. The transform is computed according to
pr = f(p1)This method provides the low level implementation for point transformations and does not do any saving or restoring of data.
computeTransformPnt
in class GeometryTransformer
pr
- transformed pointp1
- point to be transformedpublic void computeTransformVec(Vector3d vr, Vector3d v1, Vector3d r)
v1
, and returns the result in
vr
.
The transform is computed according to
vr = F v1where F is the deformation gradient at the reference position. This method provides the low level implementation for vector transformations and does not do any saving or restoring of data.
computeTransformVec
in class GeometryTransformer
vr
- transformed vectorv1
- vector to be transformedr
- reference position of the vector, in original coordinatespublic void computeTransform(RigidTransform3d TR, RigidTransform3d T1)
T1
and returns the result in
TR
. If
[ R1 p1 ] T1 = [ ] [ 0 1 ]the transform is computed according to
[ RF R1 f(p1) ] TR = [ ] [ 0 1 ]where PF RF = F is the left polar decomposition of the deformation gradient at the reference position. This method provides the low level implementation for the transformation of rigid transforms and does not do any saving or restoring of data.
computeTransform
in class GeometryTransformer
TR
- transformed transformT1
- transform to be transformedpublic void computeTransform(AffineTransform3d XR, AffineTransform3d X1)
X1
and returns the result in
XR
. If
[ A1 p1 ] X1 = [ ] [ 0 1 ]the transform is computed according to
[ F A1 f(pf) ] XR = [ ] [ 0 1 ]where F is the deformation gradient at the reference position. This method provides the low level implementation for the transformation of affine transforms and does not do any saving or restoring of data.
computeTransform
in class GeometryTransformer
XR
- transformed transformX1
- transform to be transformedpublic void computeTransform(RotationMatrix3d RR, RotationMatrix3d R1, Vector3d r)
R1
, located at reference
position r
, and returns the result in RR
.
The transform is computed according to
RR = RF R1where PF RF = F is the left polar decomposition of the deformation gradient at the reference position. This method provides the low level implementation for the transformation of rotation matrices and does not do any saving or restoring of data.
computeTransform
in class GeometryTransformer
RR
- transformed rotationR1
- rotation to be transformedr
- reference position of the rotation, in original coordinatespublic void computeTransform(Matrix3d MR, Matrix3d M1, Vector3d r)
M1
, located at reference
position r
, and returns the result in MR
.
The transform is computed according to
MR = F M1where F is the deformation gradient at the reference position. This method provides the low level implementation for the transformation of 3 X 3 matrices and does not do any saving or restoring of data.
computeTransform
in class GeometryTransformer
MR
- transformed matrixM1
- matrix to be transformedr
- reference position of the matrix, in original coordinatespublic void computeTransform(Plane pr, Plane p1, Vector3d r)
p1
, located at reference position
r
, and returns the result in pr
.
Assume that p1
is defined by a normal n1
and offset o1
such that all planar points x
satisfy
n1^T x = o1Then the transformed normal
nr
and offset or
are computed according to
nr = inv(F)^T n1 nr = nr / ||nr|| or = nr^T f(r)where F is the deformation gradient at the reference position. This method provides the low level implementation for the transformation of planes and does not do any saving or restoring of data.
computeTransform
in class GeometryTransformer
pr
- transformed planep1
- plane to be transformedr
- reference position of the plane, in original coordinates