public class ScaledTranslation3d extends java.lang.Object implements VectorTransformer3d
[ S p ] [ ] [ 0 1 ]where
S is a 3x3 diagonal
scaling matrix, and p is a translation offset.| Constructor and Description |
|---|
ScaledTranslation3d(Vector3d scale,
Vector3d p) |
| Modifier and Type | Method and Description |
|---|---|
ScaledTranslation3d |
copy()
Creates and returns a copy of this transformer.
|
void |
getOrigin(Vector3d p) |
void |
getScaling(Vector3d scaling) |
void |
inverseTransformCovec(Vector3d nr,
Vector3d n0)
Applies an inverse transform to covector
c0 and places the
result in cr. |
void |
inverseTransformPnt(Vector3d pr,
Vector3d p0)
Applies an inverse transform to point
p0 and places the
result in pr. |
void |
inverseTransformVec(Vector3d vr,
Vector3d v0)
Applies an inverse transform to vector
v0 and places the
result in vr. |
boolean |
isAffine()
Returns
true if this transformer implements a linear affine
transform. |
boolean |
isRigid()
Returns
true if this transformer implements a linear
rigid transform. |
void |
scaleDistance(double s)
Scale the distance units associated with this transformer.
|
void |
set(Vector3d scale,
Vector3d p) |
java.lang.String |
toString(java.lang.String fmtStr)
Returns a string representation of this transformer.
|
void |
transformCovec(Vector3d nr,
Vector3d n0)
Transforms a covector
c0 and places the result in
cr. |
void |
transformPnt(Vector3d pr,
Vector3d p0)
Transforms point
p0 and places the result in
pr. |
void |
transformVec(Vector3d vr,
Vector3d v0)
Transforms vector
v0 and places the result in
vr. |
public void getScaling(Vector3d scaling)
public void getOrigin(Vector3d p)
public void transformPnt(Vector3d pr, Vector3d p0)
p0 and places the result in
pr.transformPnt in interface VectorTransformer3dpr - returns the transformed pointp0 - point to be transformedpublic void transformVec(Vector3d vr, Vector3d v0)
v0 and places the result in
vr.transformVec in interface VectorTransformer3dvr - returns the transformed vectorv0 - vector to be transformedpublic void transformCovec(Vector3d nr, Vector3d n0)
c0 and places the result in
cr. If a vector is transformed linearly according to
vr = A v0,then the covector will be transformed according to
-1 T
cr = A c0,
Normal vectors and gradients are generally transformed as covectors.
In the case of normals, the application will need to normalize the
result if this transformation is not rigid.transformCovec in interface VectorTransformer3dnr - returns the transformed covectorn0 - normal to be transformedpublic void inverseTransformPnt(Vector3d pr, Vector3d p0)
p0 and places the
result in pr.inverseTransformPnt in interface VectorTransformer3dpr - returns the transformed pointp0 - point to be transformedpublic void inverseTransformVec(Vector3d vr, Vector3d v0)
v0 and places the
result in vr.inverseTransformVec in interface VectorTransformer3dvr - returns the transformed vectorv0 - vector to be transformedpublic void inverseTransformCovec(Vector3d nr, Vector3d n0)
c0 and places the
result in cr. See VectorTransformer3d.transformCovec(maspack.matrix.Vector3d, maspack.matrix.Vector3d) for more
details about covector transformation.inverseTransformCovec in interface VectorTransformer3dnr - returns the transformed normaln0 - normal to be transformedpublic boolean isAffine()
true if this transformer implements a linear affine
transform.isAffine in interface VectorTransformer3dpublic boolean isRigid()
true if this transformer implements a linear
rigid transform.isRigid in interface VectorTransformer3dpublic void scaleDistance(double s)
s.s - scaling factorpublic ScaledTranslation3d copy()
copy in interface VectorTransformer3dpublic java.lang.String toString(java.lang.String fmtStr)
VectorTransformer3dtoString in interface VectorTransformer3dfmtStr - format string describing how floating point
numbers should be formatted