Core 1.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Twist Class Reference

The twist deformation. More...

#include <twist.h>

Inheritance diagram for Twist:
Axis

Public Member Functions

 Twist (const double &, const double &)
 Creates a twisting operator. More...
 
 Twist (const Vector &, const Vector &, const double &)
 Creates a twisting operator. More...
 
 ~Twist ()
 Empty.
 
Cylinder GetCylinder (const Box &) const
 Compute the bounding cylinder of a box that would be deformed by the twist. More...
 
Box GetBox (const Box &) const
 Compute the bounding box of a box that would be deformed by the twist. More...
 
Vector Transform (const Vector &) const
 Transforms a point. More...
 
Vector InverseTransform (const Vector &) const
 Transforms a point. More...
 
Matrix Jacobian (const Vector &) const
 Compute the Jacobian of the transformation. More...
 
double K (const double &) const
 Compute the Lipschitz constant using the maximum distance to the axis.
 
- Public Member Functions inherited from Axis
 Axis ()
 Empty.
 
 Axis (const Vector &, const Vector &)
 Creates an axis given end vertices. More...
 
 ~Axis ()
 Empty.
 
void Rotate (const Matrix &)
 Rotates an axis. More...
 
void Translate (const Vector &)
 Translates an axis. More...
 
void Scale (const double &)
 Uniformly scales an axis. More...
 
void Scale (const Vector &)
 Scales an axis. More...
 
Quadric Equation (const Ray &) const
 Compute the polynomial equation of the Euclidean distance between a ray and the axis. More...
 
Vector Vertex (int) const
 Return one of the end vertexes of the axis.
 
Vector Point (const double &) const
 Compute a point on the axis.
 
Vector GetAxis () const
 Returns the normalized axis vector.
 
double Length () const
 Return the axis length.
 
Vector Symmetric (const Vector &) const
 Symmetric point. More...
 
Sphere Symmetric (const Sphere &) const
 Symmetric sphere. More...
 
Vector Normal (const Vector &) const
 Compute the normal vector between a point and its projection onto the edge. More...
 
double R (const Vector &) const
 Compute the squared distance to the segment. More...
 
double R (const Axis &) const
 Compute the squared distance between two axes. More...
 
double R (const Vector &, double &) const
 Compute the squared distance to the axis. More...
 
Matrix GetFrame () const
 Compute an orthonormal frame attached to the axis. More...
 

Protected Member Functions

Circle GetCircle (const Vector &) const
 Compute the circle obtained by rotating the point around the axis. More...
 
- Protected Member Functions inherited from Axis
double Radial (const Vector &, Vector &, Vector &) const
 Compute the radial coordinates of a point. More...
 
Vector2 Radial (const Vector &) const
 Compute the radial coordinates of a point. More...
 

Protected Attributes

double omega
 Angular velocity.
 
double angle
 Twisting angle between end vertices.
 
Vector y
 Orthonormal vectors.
 
- Protected Attributes inherited from Axis
Vector b = Vector::Z
 End vertices of the axis.
 
Vector axis = Vector::Z
 Normalized axis vector.
 
double length = 1.0
 Length of the axis.
 

Friends

std::ostream & operator<< (std::ostream &, const Twist &)
 Overloaded.
 

Additional Inherited Members

- Static Public Member Functions inherited from Axis
static Matrix GetFrame (const Vector &)
 Compute an orthonormal frame attached to the axis. More...
 
static Vector BoxVector (const Vector &)
 Compute the box vector extent of a unit circle with a given axis. More...
 

Detailed Description

The twist deformation.

Example of how to code a twist:

Twist twist(Vector(0,0,0),Vector(1,1,1),Math::Pi);
static const double Pi
π.
Definition: mathematics.h:174
The twist deformation.
Definition: twist.h:15
Vectors in three dimensions.
Definition: evector.h:21

Constructor & Destructor Documentation

◆ Twist() [1/2]

Twist::Twist ( const double &  length,
const double &  angle 
)
explicit

Creates a twisting operator.

Parameters
lengthLength of the vertial twisting axis.
angleThe twisting angle.

◆ Twist() [2/2]

Twist::Twist ( const Vector a,
const Vector b,
const double &  angle 
)
explicit

Creates a twisting operator.

Parameters
a,bEnd vertices of the twisting axis.
angleThe twisting angle between end vertices.

Member Function Documentation

◆ GetBox()

Box Twist::GetBox ( const Box box) const

Compute the bounding box of a box that would be deformed by the twist.

This function is slightly more accurate than computing the bounding cylinder, and then taking its bouding box.

Box c = t.GetCylinder().GetBox(Box::Unit); // %Box c should be embedding box a
Vector b
End vertices of the axis.
Definition: axis.h:18
An axis aligned box.
Definition: box.h:23
static const Box Unit
Unit box.
Definition: box.h:144
Box GetBox() const
Computes the axis-aligned bounding box of a cylinder.
Definition: cylinder.cpp:646
Box GetBox(const Box &) const
Compute the bounding box of a box that would be deformed by the twist.
Definition: twist.cpp:189
Cylinder GetCylinder(const Box &) const
Compute the bounding cylinder of a box that would be deformed by the twist.
Definition: twist.cpp:150
See also
GetCylinder(const Box&) const
Parameters
boxThe box.

◆ GetCircle()

Circle Twist::GetCircle ( const Vector p) const
protected

Compute the circle obtained by rotating the point around the axis.

Parameters
pPoint.

◆ GetCylinder()

Cylinder Twist::GetCylinder ( const Box box) const

Compute the bounding cylinder of a box that would be deformed by the twist.

Parameters
boxThe box.

◆ InverseTransform()

Vector Twist::InverseTransform ( const Vector p) const

Transforms a point.

Parameters
pArgument point.

◆ Jacobian()

Matrix Twist::Jacobian ( const Vector p) const

Compute the Jacobian of the transformation.

This function is needed to implement the computation of the gradient of the field function. The argument point is assumed to be in the frame of the twist.

Parameters
pPoint (in the twisting coordinate system).

◆ Transform()

Vector Twist::Transform ( const Vector p) const

Transforms a point.

Parameters
pArgument point.