PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A struct that stores transformation parameters and provides method to transform the particle. Basically, given a reference particle, this provides method to translate, rotate, and scale the reference particle. More...
#include <particleTransform.h>
Public Member Functions | |
ParticleTransform () | |
Constructor. | |
ParticleTransform (util::Point translate, util::Point axis, double theta, double scale=1.) | |
Constructor. | |
ParticleTransform (const ParticleTransform &t) | |
Copy constructor. | |
util::Point | apply (const util::Point &v) const |
Returns the transformed vector. We assume that the passed vector passes through origin. | |
std::string | printStr (int nt=0, int lvl=0) const |
Returns the string containing printable information about the object. | |
void | print (int nt=0, int lvl=0) const |
Prints the information about the object. | |
Data Fields | |
util::Point | d_translation |
Translational vector. | |
util::Point | d_axis |
Axis of rotation. | |
double | d_theta |
Angle of rotation. | |
double | d_scale |
Volumetric scaling factor. | |
A struct that stores transformation parameters and provides method to transform the particle. Basically, given a reference particle, this provides method to translate, rotate, and scale the reference particle.
Definition at line 25 of file particleTransform.h.
|
inline |
Constructor.
Default constructor creates identity transformation, i.e., transform(x) = x.
Definition at line 44 of file particleTransform.h.
|
inline |
Constructor.
translate | Translation vector |
axis | Axis of rotation |
theta | Angle of rotation |
scale | Volumetric scaling |
Definition at line 56 of file particleTransform.h.
|
inline |
Copy constructor.
t | Another ParticleTransform object |
Definition at line 65 of file particleTransform.h.
|
inline |
Returns the transformed vector. We assume that the passed vector passes through origin.
Let B(0, R) is the ball centered at origin. Let v is a point in ball B (0,R).
Suppose we want to transform v so that it is now in ball B(x, r), where x is the point in space, r is the radius of new ball.
Further, suppose we also want to rotate the v by angle theta about axis a and scale v by amount s.
To do this, we assume that this class was constructed with x, a, theta, and s, i.e. ParticleTransform(x, a, theta, s).
Following transformation is applied on vector v
v | Vector v in ball |
Definition at line 96 of file particleTransform.h.
References d_axis, d_scale, d_theta, d_translation, and util::rotate().
Referenced by particle::BaseParticle::BaseParticle().
|
inline |
Prints the information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 132 of file particleTransform.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
nt | Number of tabs to append before printing |
lvl | Information level (higher means more information) |
Definition at line 112 of file particleTransform.h.
References d_axis, d_scale, d_theta, d_translation, util::io::getTabS(), and util::Point::printStr().
Referenced by print().
util::Point particle::ParticleTransform::d_axis |
Axis of rotation.
Definition at line 31 of file particleTransform.h.
Referenced by apply(), and printStr().
double particle::ParticleTransform::d_scale |
Volumetric scaling factor.
Definition at line 37 of file particleTransform.h.
Referenced by apply(), particle::BaseParticle::BaseParticle(), and printStr().
double particle::ParticleTransform::d_theta |
Angle of rotation.
Definition at line 34 of file particleTransform.h.
Referenced by apply(), and printStr().
util::Point particle::ParticleTransform::d_translation |
Translational vector.
Definition at line 28 of file particleTransform.h.
Referenced by apply(), and printStr().