150 inline Vector(
double x,
double y,
double z);
153 inline Vector(
double* xyz);
156 inline Vector(
float* xyz);
162 inline void GetValue(
double* xyz)
const;
185 inline double x()
const;
186 inline double y()
const;
187 inline double z()
const;
188 inline void x(
double);
189 inline void y(
double);
190 inline void z(
double);
306 inline Rotation(
double Xx,
double Yx,
double Zx,
307 double Xy,
double Yy,
double Zy,
308 double Xz,
double Yz,
double Zz);
312 inline void setValue(
float* oglmat);
313 inline void getValue(
float* oglmat)
const;
417 static Rotation RPY(
double roll,
double pitch,
double yaw);
426 void GetRPY(
double& roll,
double& pitch,
double& yaw)
const;
436 return RPY(Gamma,Beta,Alfa);
450 inline void GetEulerZYX(
double& Alfa,
double& Beta,
double& Gamma)
const {
541 inline void getValue(
float* oglmat)
const;
660 static Frame DH(
double a,
double alpha,
double d,
double theta);
765 AccelerationTwist():trans(),rot() {};
767 AccelerationTwist(const Vector& _trans,const Vector& _rot):trans(_trans),rot(_rot) {};
769 inline AccelerationTwist& operator-=(const AccelerationTwist& arg);
770 inline AccelerationTwist& operator+=(const AccelerationTwist& arg);
772 inline double& operator()(int i);
776 inline double operator()(int i) const;
778 double operator[] ( int index ) const
780 return this->operator() ( index );
783 double& operator[] ( int index )
785 return this->operator() ( index );
788 inline friend AccelerationTwist operator*(const AccelerationTwist& lhs,double rhs);
789 inline friend AccelerationTwist operator*(double lhs,const AccelerationTwist& rhs);
790 inline friend AccelerationTwist operator/(const AccelerationTwist& lhs,double rhs);
791 inline friend AccelerationTwist operator+(const AccelerationTwist& lhs,const AccelerationTwist& rhs);
792 inline friend AccelerationTwist operator-(const AccelerationTwist& lhs,const AccelerationTwist& rhs);
793 inline friend AccelerationTwist operator-(const AccelerationTwist& arg);
794 //inline friend double dot(const AccelerationTwist& lhs,const Wrench& rhs);
795 //inline friend double dot(const Wrench& rhs,const AccelerationTwist& lhs);
796 inline friend void SetToZero(AccelerationTwist& v);
800 static inline AccelerationTwist Zero();
803 inline void ReverseSign();
811 inline AccelerationTwist RefPoint(const Vector& v_base_AB) const;
816 inline friend bool Equal(const AccelerationTwist& a,const AccelerationTwist& b,double eps=epsilon);
819 inline friend bool operator==(const AccelerationTwist& a,const AccelerationTwist& b);
821 inline friend bool operator!=(const AccelerationTwist& a,const AccelerationTwist& b);
824 friend class Rotation;
962 inline double Norm()
const;
1024 inline double GetRot()
const;
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
A 2D frame class, for further documentation see the Frames class for methods with unchanged semantics...
double operator()(int i, int j)
Treats a frame as a 3x3 matrix and returns element i,j Access to elements 0..2,0.....
friend bool Equal(const Frame2 &a, const Frame2 &b, double eps)
Frame2(const Rotation2 &R, const Vector2 &V)
Vector2 operator*(const Vector2 &arg)
Frame2 & operator=(const Frame2 &arg)
void Integrate(const Twist &t_this, double frequency)
Rotation2 M
Orientation of the Frame.
Vector2 p
origine of the Frame
represents a frame transformation in 3D space (rotation + translation)
Rotation M
Orientation of the Frame.
void setValue(float *oglmat)
void Make4x4(double *d)
Reads data from an double array.
void Integrate(const Twist &t_this, double frequency)
The twist <t_this> is expressed wrt the current frame. This frame is integrated into an updated frame...
Frame & operator=(const Frame &arg)
Normal copy-by-value semantics.
friend bool Equal(const Frame &a, const Frame &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
void getValue(float *oglmat) const
friend bool operator==(const Frame &a, const Frame &b)
The literal equality operator==(), also identical.
static Frame DH_Craig1989(double a, double alpha, double d, double theta)
Vector operator*(const Vector &arg) const
Transformation of the base to which the vector is expressed.
Vector p
origine of the Frame
Frame Inverse() const
Gives back inverse transformation of a Frame.
double operator()(int i, int j)
Treats a frame as a 4x4 matrix and returns element i,j Access to elements 0..3,0.....
friend bool operator!=(const Frame &a, const Frame &b)
The literal inequality operator!=().
static Frame DH(double a, double alpha, double d, double theta)
A 2D Rotation class, for conventions see Rotation. For further documentation of the methods see Rotat...
double GetRot() const
Gets the angle (in radians).
Vector2 operator*(const Vector2 &v) const
double operator()(int i, int j) const
Access to elements 0..1,0..1, bounds are checked when NDEBUG is not set.
Rotation2(double ca, double sa)
static Rotation2 Rot(double angle)
The Rot... static functions give the value of the appropriate rotation matrix bac.
Rotation2()
c,s represent cos(angle), sin(angle), this also represents first col. of rot matrix from outside,...
static Rotation2 Identity()
friend bool Equal(const Rotation2 &a, const Rotation2 &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
Rotation2(double angle_rad)
Rotation2 Inverse() const
void SetRot(double angle)
The SetRot.. functions set the value of *this to the appropriate rotation matrix.
Rotation2 & operator=(const Rotation2 &arg)
represents rotations in 3 dimensional space.
Vector GetRot() const
Returns a vector with the direction of the equiv. axis and its norm is angle.
void GetRPY(double &roll, double &pitch, double &yaw) const
Gives back a vector in RPY coordinates, variables are bound by -PI <= roll <= PI -PI <= Yaw <= PI -PI...
void DoRotZ(double angle)
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.....
Rotation Inverse() const
Gives back the inverse rotation matrix of *this.
Rotation & operator=(const Rotation &arg)
Vector operator*(const Vector &v) const
Defines a multiplication R*V between a Rotation R and a Vector V. Complexity : 9M+6A.
Vector UnitY() const
Access to the underlying unitvectors of the rotation matrix.
void UnitZ(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
Vector UnitZ() const
Access to the underlying unitvectors of the rotation matrix.
Vector UnitX() const
Access to the underlying unitvectors of the rotation matrix.
double GetRotAngle(Vector &axis, double eps=epsilon) const
static Rotation EulerZYX(double Alfa, double Beta, double Gamma)
Gives back a rotation matrix specified with EulerZYX convention : First rotate around Z with alfa,...
static Rotation Rot2(const Vector &rotvec, double angle)
Along an arbitrary axes. rotvec should be normalized.
static Rotation Identity()
Gives back an identity rotaton matrix.
void GetEulerZYZ(double &alfa, double &beta, double &gamma) const
Gives back the EulerZYZ convention description of the rotation matrix : First rotate around Z with al...
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
Vector2 GetXZRot() const
Returns a 2D vector representing the equivalent rotation in the XZ plane that brings the Y axis onto ...
void setValue(float *oglmat)
friend bool operator==(const Rotation &a, const Rotation &b)
do not use operator == because the definition of Equal(.,.) is slightly different....
friend bool operator!=(const Rotation &a, const Rotation &b)
The literal inequality operator!=().
void UnitX(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
static Rotation Rot(const Vector &rotaxis, double angle)
Along an arbitrary axes. It is not necessary to normalize rotaxis. returns identity rotation matrix i...
void DoRotX(double angle)
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.....
static Rotation RotY(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
void getValue(float *oglmat) const
void SetInverse()
Sets the value of *this to its inverse.
static Rotation EulerZYZ(double Alfa, double Beta, double Gamma)
Gives back a rotation matrix specified with EulerZYZ convention : First rotate around Z with alfa,...
void GetEulerZYX(double &Alfa, double &Beta, double &Gamma) const
GetEulerZYX gets the euler ZYX parameters of a rotation : First rotate around Z with alfa,...
void UnitY(const Vector &X)
Access to the underlying unitvectors of the rotation matrix.
static Rotation RotZ(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
double & operator()(int i, int j)
Access to elements 0..2,0..2, bounds are checked when NDEBUG is not set.
void DoRotY(double angle)
The DoRot... functions apply a rotation R to *this,such that *this = *this * Rot.....
static Rotation RPY(double roll, double pitch, double yaw)
Sets the value of this object to a rotation specified with RPY convention: first rotate around X with...
represents both translational and rotational velocities.
friend Twist operator*(const Twist &lhs, double rhs)
Twist(const Vector &_vel, const Vector &_rot)
Twist & operator+=(const Twist &arg)
double & operator()(int i)
index-based access to components, first vel(0..2), then rot(3..5)
friend double dot(const Twist &lhs, const Wrench &rhs)
friend bool operator==(const Twist &a, const Twist &b)
The literal equality operator==(), also identical.
Vector rot
The rotational velocity of that point.
friend Twist operator-(const Twist &lhs, const Twist &rhs)
Twist()
The default constructor initialises to Zero via the constructor of Vector.
friend void SetToZero(Twist &v)
friend Twist operator/(const Twist &lhs, double rhs)
void ReverseSign()
Reverses the sign of the twist.
friend bool Equal(const Twist &a, const Twist &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
Twist RefPoint(const Vector &v_base_AB) const
Changes the reference point of the twist. The vector v_base_AB is expressed in the same base as the t...
friend Twist operator+(const Twist &lhs, const Twist &rhs)
Twist & operator-=(const Twist &arg)
double operator[](int index) const
Vector vel
The velocity of that point.
friend bool operator!=(const Twist &a, const Twist &b)
The literal inequality operator!=().
friend Vector2 operator-(const Vector2 &lhs, const Vector2 &rhs)
friend Vector2 operator*(const Vector2 &lhs, double rhs)
friend bool Equal(const Vector2 &a, const Vector2 &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
void Set3DZX(const Vector &v)
projects v in its ZX plane, and sets *this to these values
Vector2 & operator=(const Vector2 &arg)
double Normalize(double eps=epsilon)
void GetValue(double *xy) const
store vector components in array
void Set3DXY(const Vector &v)
projects v in its XY plane, and sets *this to these values
Vector2()
Does not initialise to Zero().
friend Vector2 operator/(const Vector2 &lhs, double rhs)
Vector2 & operator+=(const Vector2 &arg)
void Set3DYZ(const Vector &v)
projects v in its YZ plane, and sets *this to these values
friend void SetToZero(Vector2 &v)
friend Vector2 operator*(const Vector2 &lhs, const Vector2 &rhs)
friend Vector2 operator+(const Vector2 &lhs, const Vector2 &rhs)
Vector2 & operator-=(const Vector2 &arg)
double operator()(int index) const
Access to elements, range checked when NDEBUG is not set, from 0..1.
void Set3DPlane(const Frame &F_someframe_XY, const Vector &v_someframe)
projects v_someframe in the XY plane of F_someframe_XY, and sets *this to these values expressed wrt ...
A concrete implementation of a 3 dimensional vector class.
void Set2DPlane(const Frame &F_someframe_XY, const Vector2 &v_XY)
a 3D vector where the 2D vector v_XY is put in the XY plane of the frame F_someframe_XY.
friend double dot(const Vector &lhs, const Vector &rhs)
friend bool Equal(const Vector &a, const Vector &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
void GetValue(double *xyz) const
store vector components in array
void ReverseSign()
Reverses the sign of the Vector object itself.
friend void SetToZero(Vector &v)
To have a uniform operator to put an element to zero, for scalar values and for objects.
Vector & operator-=(const Vector &arg)
subtracts a vector from the Vector object itself
friend Vector operator+(const Vector &lhs, const Vector &rhs)
friend Vector operator/(const Vector &lhs, double rhs)
Scalar division is defined.
Vector & operator*=(double arg)
Multiply by a scalar.
friend bool operator==(const Vector &a, const Vector &b)
The literal equality operator==(), also identical.
double operator[](int index) const
Equivalent to double operator()(int index) const.
void Set2DZX(const Vector2 &v)
a 3D vector where the 2D vector v is put in the ZX plane
Vector & operator+=(const Vector &arg)
Adds a vector from the Vector object itself.
Vector & operator=(const Vector &arg)
Assignment operator. The normal copy by value semantics.
double Normalize(double eps=epsilon)
Vector()
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.
void Set2DXY(const Vector2 &v)
a 3D vector where the 2D vector v is put in the XY plane
double operator()(int index) const
Access to elements, range checked when NDEBUG is not set, from 0..2.
friend Vector operator*(const Vector &lhs, double rhs)
Scalar multiplication is defined.
friend Vector operator-(const Vector &lhs, const Vector &rhs)
friend bool operator!=(const Vector &a, const Vector &b)
The literal inequality operator!=().
void Set2DYZ(const Vector2 &v)
a 3D vector where the 2D vector v is put in the YZ plane
represents both translational and rotational acceleration.
friend bool Equal(const Wrench &a, const Wrench &b, double eps)
do not use operator == because the definition of Equal(.,.) is slightly different....
Wrench & operator+=(const Wrench &arg)
friend Wrench operator+(const Wrench &lhs, const Wrench &rhs)
Wrench & operator-=(const Wrench &arg)
Vector force
Force that is applied at the origin of the current ref frame.
friend bool operator==(const Wrench &a, const Wrench &b)
The literal equality operator==(), also identical.
friend Wrench operator/(const Wrench &lhs, double rhs)
Scalar division.
Wrench()
Does initialise force and torque to zero via the underlying constructor of Vector.
Wrench(const Vector &_force, const Vector &_torque)
double & operator()(int i)
index-based access to components, first force(0..2), then torque(3..5)
friend Wrench operator-(const Wrench &lhs, const Wrench &rhs)
friend bool operator!=(const Wrench &a, const Wrench &b)
The literal inequality operator!=().
Vector torque
Torque that is applied at the origin of the current ref frame.
double operator[](int index) const
Wrench RefPoint(const Vector &v_base_AB) const
Changes the reference point of the wrench. The vector v_base_AB is expressed in the same base as the ...
friend Wrench operator*(const Wrench &lhs, double rhs)
Scalar multiplication.
friend void SetToZero(Wrench &v)
Sets the Wrench to Zero, to have a uniform function that sets an object or double to zero.
void ReverseSign()
Reverses the sign of the current Wrench.
Frame(const Rotation &R, const Vector &V)
Twist()
The default constructor initialises to Zero via the constructor of Vector.
Vector2()
Does not initialise to Zero().
Vector()
Does not initialise the Vector to zero. use Vector::Zero() or SetToZero for that.
ccl_device_inline float beta(const float x, const float y)
IMETHOD Vector diff(const Vector &a, const Vector &b, double dt=1)
INLINE Rall1d< T, V, S > sin(const Rall1d< T, V, S > &arg)
bool operator==(const Rotation &a, const Rotation &b)
IMETHOD bool Equal(const VectorAcc &, const VectorAcc &, double=epsilon)
IMETHOD Vector addDelta(const Vector &a, const Vector &da, double dt=1)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
Vector Normalize(const Vector &, double eps=epsilon)
CCL_NAMESPACE_BEGIN struct Window V