Define an affine transformation. More...
#include <AffineXform.hpp>
Public Member Functions | |
AffineXform () | |
AffineXform (const double *three_by_three, const double *translation) | |
AffineXform (const Matrix3 &mat, const CartVect &off) | |
void | accumulate (const AffineXform &other) |
void | xform_point (const double *input, double *output) const |
void | xform_point (double *in_out) const |
void | xform_vector (const double *input, double *output) const |
void | xform_vector (double *in_out) const |
AffineXform | inverse () const |
const Matrix3 & | matrix () const |
const CartVect & | offset () const |
bool | reflection () const |
bool | scale () const |
Static Public Member Functions | |
static AffineXform | translation (const double *vector) |
static AffineXform | rotation (double radians, const double *axis) |
static AffineXform | rotation (const double *from_vec, const double *to_vec) |
static AffineXform | reflection (const double *plane_normal) |
static AffineXform | scale (double f) |
static AffineXform | scale (const double *fractions) |
static AffineXform | scale (double f, const double *point) |
static AffineXform | scale (const double *fractions, const double *point) |
static ErrorCode | get_tag (Tag &tag_handle_out, Interface *moab, const char *tagname=0) |
Static Private Member Functions | |
static AffineXform | rotation (double cos_angle, double sin_angle, const CartVect &unit_axis) |
Private Attributes | |
Matrix3 | mMatrix |
CartVect | mOffset |
|
inline |
Definition at line 126 of file AffineXform.hpp.
Referenced by inverse(), reflection(), rotation(), scale(), and translation().
|
inline |
Definition at line 128 of file AffineXform.hpp.
Definition at line 133 of file AffineXform.hpp.
|
inline |
incorporate the passed transform into this one such that the resulting transform is the cumulative affect of this initial transform followed by the passed transform
Definition at line 186 of file AffineXform.hpp.
References moab::CartVect::array(), mMatrix, mOffset, and xform_point().
Referenced by moab::SMF_State::mmult(), and moab::operator*().
|
static |
get a tag that can be used to store an instance of this class
Definition at line 38 of file AffineXform.cpp.
References moab::AFFINE_XFORM_TAG_NAME, MB_TAG_BYTES, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, and moab::Interface::tag_get_handle().
|
inline |
get transform that is the inverse of this transform
Definition at line 221 of file AffineXform.hpp.
References AffineXform(), moab::Matrix3::inverse(), mMatrix, and mOffset.
|
inline |
get 3x3 matrix portion of transform
Definition at line 82 of file AffineXform.hpp.
References mMatrix.
|
inline |
get translation portion of transform
Definition at line 87 of file AffineXform.hpp.
References mOffset.
Referenced by scale().
|
inline |
Is this transform a reflection
A relfecting transform will require the reversal of the order of edges in a loop, etc. because it produces a mirror-image of the input geometry. This method tests if this is such a transform. A reflection may be created with by an explicit transform, scaling with a negative scale factor, etc. If multiple transforms are combined such that the transform is no longer a reflection (e.g. two reflections that are effectively a rotation), this method will return false.
Definition at line 227 of file AffineXform.hpp.
References moab::Matrix3::determinant(), and mMatrix.
|
inlinestatic |
reflect about plane through origin
Definition at line 153 of file AffineXform.hpp.
References AffineXform().
|
static |
define rotation such that if applied to from_vec
the result aligned with to_vec
Definition at line 48 of file AffineXform.cpp.
References AffineXform(), moab::CartVect::length(), length(), moab::CartVect::normalize(), and rotation().
|
inlinestaticprivate |
Definition at line 147 of file AffineXform.hpp.
References AffineXform(), and moab::outer_product().
|
inlinestatic |
rotate about axis through origin
Definition at line 140 of file AffineXform.hpp.
References moab::angle(), and moab::CartVect::normalize().
Referenced by moab::ReadABAQUS::create_instance_of_part(), moab::ReadSmf::rot(), and rotation().
|
inline |
Does this transform do any scaling
Definition at line 232 of file AffineXform.hpp.
References moab::Matrix3::determinant(), and mMatrix.
Referenced by scale(), and moab::ReadSmf::scale().
|
inlinestatic |
|
inlinestatic |
scale about a point
Definition at line 180 of file AffineXform.hpp.
References AffineXform(), and offset().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
move
Definition at line 135 of file AffineXform.hpp.
References AffineXform().
Referenced by moab::ReadSmf::trans().
|
inline |
apply transform to a point
Definition at line 192 of file AffineXform.hpp.
References mOffset, output, and xform_vector().
Referenced by accumulate(), and moab::SMF_State::vertex().
|
inline |
apply transform to a point
Definition at line 200 of file AffineXform.hpp.
References mOffset, and xform_vector().
|
inline |
apply transform to a vector
Definition at line 208 of file AffineXform.hpp.
References mMatrix, and output.
Referenced by moab::ReadABAQUS::create_instance_of_part(), moab::SMF_State::normal(), xform_point(), and xform_vector().
|
inline |
apply transform to a vector
Definition at line 215 of file AffineXform.hpp.
References xform_vector().
|
private |
Definition at line 112 of file AffineXform.hpp.
Referenced by accumulate(), inverse(), matrix(), reflection(), scale(), and xform_vector().
|
private |
Definition at line 113 of file AffineXform.hpp.
Referenced by accumulate(), inverse(), offset(), and xform_point().