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

The twist deformation in the plane. More...

#include <twist.h>

Public Member Functions

 Twist2 (const Vector2 &, const double &, const double &, const double &)
 Creates a twisting operator. More...
 
 ~Twist2 ()
 Empty.
 
Vector2 Transform (const Vector2 &) const
 Transforms a point. More...
 
Vector2 InverseTransform (const Vector2 &) const
 Inverse transformation of a point. More...
 
double Angle () const
 Return the angle.
 
Box2 GetBox () const
 Compute the bouding box of the region where twist occurs.
 

Protected Attributes

Vector2 c
 Center.
 
double rb
 Radii.
 
double angle
 Twisting angle.
 

Friends

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

Detailed Description

The twist deformation in the plane.

Example of how to code a twist:

Twist2 twist(Vector(0,0,0),1.0,3.0,Math::Pi);
static const double Pi
π.
Definition: mathematics.h:174
The twist deformation in the plane.
Definition: twist.h:41
Vectors in three dimensions.
Definition: evector.h:21

Constructor & Destructor Documentation

◆ Twist2()

Twist2::Twist2 ( const Vector2 c,
const double &  ra,
const double &  rb,
const double &  a 
)
explicit

Creates a twisting operator.

The deformation is enclosed in a disc delimited by the maximum radius, the region inside the smaller disc is simply rotated, whereas the region in the annulus is twisted.

Parameters
cCenter.
ra,rbRadii.
aTwisting angle.

Member Function Documentation

◆ InverseTransform()

Vector2 Twist2::InverseTransform ( const Vector2 p) const

Inverse transformation of a point.

Parameters
pArgument point.

◆ Transform()

Vector2 Twist2::Transform ( const Vector2 p) const

Transforms a point.

Parameters
pArgument point.