105 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
108 std::ostringstream oss;
109 oss << tabS <<
"------- ParticleTransform --------" << std::endl << std::endl;
110 oss << tabS <<
"Scale = " <<
d_scale << std::endl;
111 oss << tabS <<
"Angle = " <<
d_theta << std::endl;
115 oss << tabS << std::endl;
126 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); }
std::string getTabS(int nt)
Returns tab spaces of a given size.
Collection of methods useful in simulation.
util::Point rotate(const util::Point &p, const double &theta, const util::Point &axis)
Returns the vector after rotating by desired angle.
A struct that stores transformation parameters and provides method to transform the particle....
util::Point apply(const util::Point &v) const
Maps a reference-configuration point to world coordinates using the same rule as geom::mapSimilarity...
double d_theta
Angle of rotation (radians)
ParticleTransform(util::Point translate, util::Point axis, double theta, double scale=1.)
Constructor with pivot at origin (reference mesh centered at origin).
util::Point d_rotationPoint
Pivot for rotation and scale (same role as rotationPoint in GeomObject::transform)....
void print(int nt=0, int lvl=0) const
Prints the information about the object.
util::Point d_translation
Rigid translation after rotate+scale about the pivot (matches GeomObject::transform).
ParticleTransform(const ParticleTransform &t)
Copy constructor.
double d_scale
Uniform scale factor.
util::Point d_axis
Unit axis of rotation.
ParticleTransform(util::Point translate, util::Point axis, double theta, double scale, util::Point rotation_point)
Constructor with explicit rotation pivot, as in GeomObject::transform.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
ParticleTransform()
Constructor.
A structure to represent 3d vectors.
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.