Class shell

Class Documentation

class enve::shell

Base class for ENVE shell.

Public Functions

shell(shell const&) = delete

Shell copy constructor.

shell(shell&&) = delete

Shell move constructor.

shell &operator=(const shell&) = delete

Shell assignment operator.

shell &operator=(shell&&) = delete

Shell move assignment operator.

~shell(void) = default

Shell class destructor.

shell(size_t size, real r_x, real m_x, real r_y, real m_y, real l_y)

Shell class constructor.

Parameters
  • size – Input ribs number

  • r_x – Input shell radius on x axis (m)

  • m_x – Input shell curve degree for x axis

  • r_y – Input shell radius on y axis (m)

  • m_y – Input shell curve degree for y axis

  • l_y – Input surface half width on y axis (m)

shell(size_t size, shape const &shape_obj)

Shell class constructor.

Parameters
  • size – Input ribs number

  • shape_obj – Input shape object

void resize(size_t size)

Resize shell size, position and stored contact results.

Parameters

size – Input ribs number

size_t size(void) const

Get shell ribs number.

real surfaceMaxRadius(void) const

Get shell surface maximum radius (m)

real surfaceMaxWidth(void) const

Get shell surface maximum width on y axis (m)

real surfaceWidth(void) const

Get shell surface width (m)

bool checkWidthBound(real y) const

Get shell surface maximum width on reference (m)

Parameters

y – Coordinate of y axis

real surfaceRadius(real y) const

Get shell surface of revolution rib radius at y axis coordinate (m)

Parameters

y – Coordinate of y axis

real surfaceDerivative(real y, real tolerance = EPSILON_MEDIUM) const

Get shell surface of revolution rib first derivative with respect to y coordinate.

Parameters
  • y – Coordinate of y axis

  • tolerance – Tolerance

real surfaceAngle(real y, real tolerance = EPSILON_MEDIUM) const

Get shell surface of revolution rib angle with respect to y axis (rad)

Parameters
  • y – Coordinate of y axis

  • tolerance – Tolerance

real ribRadius(size_t i) const

Get i-th rib unloaded radius (m)

Parameters

i – Input index

point ribCenter(size_t i) const

Get i-th rib center (m)

Parameters

i – Input index

real ribWidth(size_t i) const

Get rib width (m)

Parameters

i – Input index

real ribAngle(size_t i) const

Get rib angle (rad)

Parameters

i – Input index

void translate(vec3 const &vector)

Translate shell by vector.

Parameters

vector – Translation vector

vec3 translation(void) const

Returns shell translation vector.

void rotate(real angle, vec3 const &axis)

Rotate shell by a rotation angle around an arbitrary axis.

Parameters
  • angle – Input angle (rad)

  • axis – Input axis

void rotate(real angle, std::string const &axis)

Rotate shell by a rotation angle around an arbitrary axis.

Parameters
  • angle – Input angle (rad)

  • axis – Input axis

mat3 rotation(void) const

Returns shell rotation matrix.

mat3 linear(void) const

Returns shell linear matrix (rotation + scaling + shearing)

void transform(affine const &pose)

Set 4x4 affine transformation matrix

Warning: Rotation matrix must be orthonormal!

Parameters

pose – Input 4x4 affine transformation matrix

void transform(mat4 const &pose)

Set 4x4 affine transformation matrix

Warning: Rotation matrix must be orthonormal!

Parameters

pose – Input 4x4 affine transformation matrix

affine const &transformation(void) const

Get 4x4 affine transformation matrix.

bool checkTransformation(mat4 const &pose, real tolerance = EPSILON_LOW) const

Check if 4x4 affine transformation matrix is othornormal and right-handed.

Parameters
  • pose – Input 4x4 affine transformation matrix

  • tolerance – Affine trasformation othonomality check tolerance

bool checkTransformation(affine const &pose, real tolerance = EPSILON_LOW) const

Check if 4x4 affine transformation matrix is othornormal and right-handed.

Parameters
  • pose – Input 4x4 affine transformation matrix

  • tolerance – Affine trasformation othonomality check tolerance

vec3 x(void) const

Get x vector.

vec3 y(void) const

Get y vector.

vec3 z(void) const

Get z vector.

void eulerAngles(vec3 &angles) const

Get current Euler angles (rad)

WARNING: Rotation sequence ZXY!

Parameters

angles – Frame Euler angles

std::shared_ptr<aabb> bbox(void) const

Get shell bonding aabb as object pointer vector.

void updateBBox(void)

Update shell bonding aabb.

bool setup(ground::mesh const &ground, affine const &pose, std::string const method)

Update current shell position and find contact parameters (intersection with mesh)

Parameters
  • ground – Mesh ground object

  • pose – 4x4 affine transformation matrix

  • method – Method name (choose from: “geometric” or “sampling”)

bool setup(ground::flat const &ground, affine const &pose, std::string const method)

Update current shell position and find contact parameters (intersection with plane)

Parameters
  • ground – Flat ground object

  • pose – 4x4 affine transformation

  • method – Method name (choose from: “geometric” or “sampling”)

void contactPoint(point &point) const

Get contact point.

Parameters

point – Contact point

void contactPoint(size_t i, point &point) const

Get contact point.

Parameters
  • i – Input i-th index

  • point – Contact point

void contactPoint(std::vector<point> &point) const

Get contact points vector.

Parameters

point – Contact points vector

void contactNormal(vec3 &normal) const

Get contact normal vector.

Parameters

normal – Contact point normal direction

void contactNormal(size_t i, vec3 &normal) const

Get contact normal vector for the i-th rib.

Parameters
  • i – Input i-th index

  • normal – Contact point normal direction

void contactNormal(std::vector<vec3> &normal) const

Get contact normal vectors vector.

Parameters

normal – Contact point normal direction vector

void contactFriction(real &friction) const

Get contact friction coefficient.

Parameters

friction – Contact friction coefficient

void contactFriction(size_t i, real &friction) const

Get i-th rib contact friction coefficient.

Parameters
  • i – Input i-th index

  • friction – Contact friction coefficient

void contactFriction(std::vector<real> &friction) const

Get contact friction coefficient vector.

Parameters

friction – Contact friction coefficient vector

void contactDepth(real &depth) const

Get contact depth at center point (m) (projected on rib plane)

Parameters

depth – Contact depth

void contactDepth(size_t i, real &depth) const

Get contact depth at center point for the i-th rib (m) (projected on rib plane)

Parameters
  • i – Input i-th index

  • depth – Contact depth

void contactDepth(std::vector<real> &depth) const

Get contact depth vector (m) (projected on rib plane)

Parameters

depth – Contact depth

void contactArea(real &area) const

Get contact area (m^2)

Parameters

area – Contact area

void contactArea(size_t i, real &area) const

Get i-th rib contact area (m^2)

Parameters
  • i – Input i-th index

  • area – Contact area

void contactArea(std::vector<real> &area) const

Get contact area vector (m^2)

Parameters

area – Contact area vector

void contactVolume(real &volume) const

Get contact volume (m^3)

Parameters

volume – Contact volume

void contactVolume(size_t i, real &volume) const

Get i-th rib contact volume (m^3)

Parameters
  • i – Input i-th index

  • volume – Contact volume

void contactVolume(std::vector<real> &volume) const

Get contact volume vector (m^3)

Parameters

volume – Contact volume vector

void contactPointAffine(affine &pose) const

Get contact point 4x4 affine transformation matrix.

Parameters

pose – Contact point affine transformation matrix

void contactPointAffine(size_t i, affine &pose) const

Get contact point 4x4 affine transformation matrix for the i-th rib.

Parameters
  • i – Input i-th index

  • pose – Contact point affine transformation matrix

void contactPointAffine(std::vector<affine> &pose) const

Get contact point 4x4 affine transformation matrices.

Parameters

pose – Contact point affine transformation matrices vector

void relativeAngles(vec3 &angles) const

Get shell relative angles (rad)

WARNING: Rotation sequence ZXY!

Parameters

angles – Relative angles vector (rad)

void relativeAngles(size_t i, vec3 &angles) const

Get shell relative angles for the i-th rib (rad)

WARNING: Rotation sequence ZXY!

Parameters
  • i – Input i-th index

  • angles – Relative angles vector (rad)

void relativeAngles(std::vector<vec3> &angles) const

Get shell relative angles as vector (rad)

WARNING: Rotation sequence ZXY!

Parameters

angles – Relative angles vector (rad)

void print(out_stream &os) const

Print contact parameters.

Parameters

os – Output stream type