147 inline Vector() {data[0]=data[1]=data[2] = 0.0;}
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;
357 inline void DoRotX(
double angle);
360 inline void DoRotY(
double angle);
363 inline void DoRotZ(
double angle);
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 {
468 return Vector(data[0],data[3],data[6]);
480 return Vector(data[1],data[4],data[7]);
492 return Vector(data[2],data[5],data[8]);
540 inline void setValue(
float* oglmat);
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;
921 inline Vector2(
double x,
double y);
962 inline double Norm()
const;
1005 inline double operator() (
int i,
int j)
const;
1018 inline void SetRot(
double angle);
1024 inline double GetRot()
const;
1054 inline double operator() (
int i,
int j)
const;
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
double operator()(int i, int j)
friend bool Equal(const Frame2 &a, const Frame2 &b, double eps)
friend Frame2 operator*(const Frame2 &lhs, const Frame2 &rhs)
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)
Frame & operator=(const Frame &arg)
Normal copy-by-value semantics.
friend bool Equal(const Frame &a, const Frame &b, double eps)
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 p
origine of the Frame
Frame Inverse() const
Gives back inverse transformation of a Frame.
friend Frame operator*(const Frame &lhs, const Frame &rhs)
Composition of two frames.
double operator()(int i, int j)
friend bool operator!=(const Frame &a, const Frame &b)
The literal inequality operator!=().
static Frame DH(double a, double alpha, double d, double theta)
double GetRot() const
Gets the angle (in radians)
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()
Default constructor does NOT initialise to Zero().
static Rotation2 Identity()
friend Rotation2 operator*(const Rotation2 &lhs, const Rotation2 &rhs)
friend bool Equal(const Rotation2 &a, const Rotation2 &b, double eps)
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.
void GetRPY(double &roll, double &pitch, double &yaw) const
void DoRotZ(double angle)
Rotation Inverse() const
Gives back the inverse rotation matrix of *this.
Rotation & operator=(const Rotation &arg)
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)
static Rotation Rot2(const Vector &rotvec, double angle)
Along an arbitrary axes. rotvec should be normalized.
friend Rotation operator*(const Rotation &lhs, const Rotation &rhs)
static Rotation Identity()
Gives back an identity rotaton matrix.
void GetEulerZYZ(double &alfa, double &beta, double &gamma) const
static Rotation RotX(double angle)
The Rot... static functions give the value of the appropriate rotation matrix back.
void setValue(float *oglmat)
friend bool operator==(const Rotation &a, const Rotation &b)
The literal equality operator==(), also identical.
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)
void DoRotX(double angle)
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)
void GetEulerZYX(double &Alfa, double &Beta, double &Gamma) const
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)
static Rotation RPY(double roll, double pitch, double yaw)
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 double dot(const Wrench &rhs, const Twist &lhs)
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)
friend Twist operator-(const Twist &arg)
void ReverseSign()
Reverses the sign of the twist.
friend bool Equal(const Twist &a, const Twist &b, double eps)
Twist RefPoint(const Vector &v_base_AB) const
friend Twist operator*(double lhs, const Twist &rhs)
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 &arg)
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)
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)
friend Vector2 operator*(double lhs, const Vector2 &rhs)
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 Vector Normalize(const Vector &a, double eps)
return a normalized vector
friend double dot(const Vector &lhs, const Vector &rhs)
friend bool Equal(const Vector &a, const Vector &b, double eps)
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)
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.
friend Vector operator-(const Vector &arg)
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.
friend Vector operator*(const Vector &lhs, const Vector &rhs)
Vector & operator=(const Vector &arg)
Assignment operator. The normal copy by value semantics.
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
friend Vector operator*(double lhs, const Vector &rhs)
Scalar multiplication is defined.
represents both translational and rotational acceleration.
friend bool Equal(const Wrench &a, const Wrench &b, double eps)
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 Wrench operator-(const Wrench &arg)
An unary - operator.
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
friend Wrench operator*(const Wrench &lhs, double rhs)
Scalar multiplication.
friend Wrench operator*(double lhs, const Wrench &rhs)
Scalar multiplication.
friend void SetToZero(Wrench &v)
void ReverseSign()
Reverses the sign of the current Wrench.
local_group_size(16, 16) .push_constant(Type b
local_group_size(16, 16) .push_constant(Type rhs
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 Vector addDelta(const Vector &a, const Vector &da, double dt=1)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
Vector Normalize(const Vector &, double eps=epsilon)
double epsilon
default precision while comparing with Equal(..,..) functions. Initialized at 0.0000001.
IMETHOD bool Equal(const VectorAcc &, const VectorAcc &, double=epsilon)
ccl_device_inline float beta(float x, float y)
CCL_NAMESPACE_BEGIN struct Window V