24 #ifndef vsr_cga3D_frame_INC
25 #define vsr_cga3D_frame_INC
29 namespace vsr {
namespace cga {
70 Frame(VSR_PRECISION _x, VSR_PRECISION _y, VSR_PRECISION _z);
83 Frame&
scale( VSR_PRECISION s ) { mScale = s;
return *
this; }
110 Rot quat()
const {
return Rot( mRot[0], -(mRot[3]), (mRot[2]), -(mRot[1]) ); }
148 Frame&
pos( VSR_PRECISION _x, VSR_PRECISION _y, VSR_PRECISION _z) { mPos =
Round::point(_x,_y,_z);
return *
this; }
157 Point posX()
const {
return (mPos +
x()).
null(); }
158 Point negX()
const {
return (mPos -
x()).
null(); }
159 Point posY()
const {
return (mPos +
y()).
null(); }
160 Point negY()
const {
return (mPos -
y()).
null(); }
161 Point posZ()
const {
return (mPos +
z()).
null(); }
162 Point negZ()
const {
return (mPos -
z()).
null(); }
198 Par tx( VSR_PRECISION v)
const;
199 Par ty( VSR_PRECISION v)
const;
200 Par tz( VSR_PRECISION v)
const;
212 Vec right()
const {
return x(); }
213 Vec up()
const {
return y(); }
214 Vec forward()
const {
return -
z(); }
239 VSR_PRECISION
ab()
const {
return aBiv; }
241 VSR_PRECISION
ax()
const {
return aVec; }
265 Frame&
move( VSR_PRECISION
dx , VSR_PRECISION dy, VSR_PRECISION dz );
281 Frame moveX( VSR_PRECISION amt )
const;
282 Frame moveY( VSR_PRECISION amt )
const;
283 Frame moveZ( VSR_PRECISION amt )
const;
Biv & db()
Set bivector velocity (rotational)
Definition: vsr_cga3D_frame.h:242
Frame & rot(const Biv &B)
Set rotor with bivector generator.
Definition: vsr_cga3D_frame.h:108
Par px() const
x direction point pair around center
Vec & dx()
Set vector velocity.
Definition: vsr_cga3D_frame.h:244
Par tx() const
Null Point Pair in local x direction.
Common Operations Specific to CGA3D.
NDlp< 5 > Dlp
DualPlane
Definition: vsr_cga3D_types.h:81
Dlp dxz() const
xz dual plane
NCir< 5 > Cir
Circle
Definition: vsr_cga3D_types.h:74
Par ipz() const
z direction imaginary point pair around center
NVec< 5 > Vec
Vector
Definition: vsr_cga3D_types.h:62
Point pos() const
Get Position.
Definition: vsr_cga3D_frame.h:138
Mot mot() const
Get Absolute Motor Relative to Origin.
Motor motor() const
Get Absolute Motor Relative to Origin.
Par ipx() const
x direction imaginary point pair around center
NDls< 5 > Dls
DualSphere
Definition: vsr_cga3D_types.h:76
Frame & twist(const Dll &)
Twist by dualLine and return *this.
Generic Geometric Number Types (templated on an algebra and a basis )
Definition: vsr_algebra.h:69
Frame & pos(VSR_PRECISION _x, VSR_PRECISION _y, VSR_PRECISION _z)
Set Position from x,y,z coordinates.
Definition: vsr_cga3D_frame.h:148
Definition: vsr_algebra.h:73
Frame & spin()
Spin Step (Local Rotation) */.
Rotor mRot
Orientation.
Definition: vsr_cga3D_frame.h:53
NLin< 5 > Lin
Line
Definition: vsr_cga3D_types.h:80
Par py() const
y direction point pair around center
static Rot rot(const Biv &b)
vsr::cga::Rotor from vsr::cga::Bivector
Biv db() const
Get bivector velocity (rotational)
Definition: vsr_cga3D_frame.h:243
Multivector< algebra, typename algebra::vector_basis > null() const
Conformal Mapping \(\boldsymbol(x)\to n_o + \boldsymbol{x} + \boldsymbol{x}^2n_\infty \) ...
Definition: vsr_generic_op.h:1118
Rotor relOrientRot(const Vec &v, bool pos=true)
Rotor to Orient Current Orientation towards v Rotor to Orient Current Orientation towards v...
Rotor rotor() const
Get Rotor.
Definition: vsr_cga3D_frame.h:99
Dls bound() const
Dual Sphere Shell.
Dlp dxy() const
xy dual plane
Frame & dilate(double t)
Dilate by t around center.
Frame & reset()
Reset to Origin.
Definition: vsr_cga3D_frame.h:85
Dlp dyz() const
yz dual plane
Frame & scale(VSR_PRECISION s)
Set Scale.
Definition: vsr_cga3D_frame.h:83
Lin lz() const
z direction direct line
Frame & pos(const Vec &v)
Set Postion from Vec v.
Definition: vsr_cga3D_frame.h:144
Biv relOrientBiv(const Vec &v, bool pos=true)
Get Bivector generator to Orient towards v.
Vec vec() const
Get Euclidean Vector of position.
Definition: vsr_cga3D_frame.h:142
Point & pos()
Get / Set Position by Reference.
Definition: vsr_cga3D_frame.h:140
Cir cyz() const
yz circle (real, direct)
Lin ly() const
y direction direct line
Frame & relOrient(const Vec &v, float t, bool pos=true)
Relative Orientation by amt t.
NPar< 5 > Par
Pair
Definition: vsr_cga3D_types.h:73
VSR_PRECISION aVec
Translational acceleration.
Definition: vsr_cga3D_frame.h:57
Vec dx() const
Get vector velocity.
Definition: vsr_cga3D_frame.h:245
Frame()
Default Constructor.
VSR_PRECISION ax() const
Get vector accelerator.
Definition: vsr_cga3D_frame.h:241
NDll< 5 > Dll
DualLine
Definition: vsr_cga3D_types.h:79
Vec dVec
Translational Velocity.
Definition: vsr_cga3D_frame.h:58
VSR_PRECISION & ax()
Set vector accelerator.
Definition: vsr_cga3D_frame.h:240
Frame & set(Pnt p, Rot r=Rot(1, 0, 0, 0))
Set Position and Orientation from Point and Rotor.
Definition: vsr_cga3D_frame.h:81
Frame & boost(const Par &)
Boost by point pair and return *this.
Frame & relTwist(const Frame &target, float t)
Relative twist towards frame f by amt t.
VSR_PRECISION scale() const
Get Scale.
Definition: vsr_cga3D_frame.h:88
Dll dll() const
DualLine Representation of Pose.
Cir icxz() const
xz circle (imaginary, direct)
Biv xz() const
xy euclidean bivector
Pnt Point
Null Vector \(p=\{e_1,e_2,e_3,n_o,n_\infty\}\)
Definition: vsr_cga3D_types.h:128
Trs trs() const
Generate Translation versor based on Position.
Rot & rot()
Get Rotor by reference.
Definition: vsr_cga3D_frame.h:102
Cir icxy() const
xy circle (imaginary, direct)
Frame & orient(const Vec &v, bool pos=true)
Orient z axis towards coordinate v, keeping y axis as vertical as possible (uses projection) boolean ...
Frame & move()
Translation Step (translate by velocity vector)
Cir cxz() const
xz circle (real, direct)
the versor library namespace
Definition: vsr_algebra.h:29
Lin lx() const
x direction direct line
Par ty() const
Null Point Pair in local y direction.
VSR_PRECISION aBiv
Rotational acceleration.
Definition: vsr_cga3D_frame.h:55
Rotor rot() const
Get 4x4 Rotation Matrix.
Definition: vsr_cga3D_frame.h:97
Frame & rot(const Rot &r)
Set rotor with rotor.
Definition: vsr_cga3D_frame.h:106
Frame rotXY(VSR_PRECISION amt) const
Rotate around local xy and return a new frame.
Dll DualLine
Dual Line bivector \(\lambda=\boldsymbol{B}+\boldsymbol{x}n_\infty\)
Definition: vsr_cga3D_types.h:139
Frame & orientX(const Vec &v, float amt, bool pos=true)
Orient X axis towards coordinate v, by amt t, keeping y axis as vertical as possible (uses projection...
Rot quat() const
Transpose rotor to quaternionic representation.
Definition: vsr_cga3D_frame.h:110
Frame & pos(const Pnt &p)
Set Position from Point p.
Definition: vsr_cga3D_frame.h:146
Orthonormal Frame composed from a Position and Orientation.
Definition: vsr_cga3D_frame.h:47
Par ipy() const
y direction imaginary point pair around center
NBiv< 5 > Biv
Bivector
Definition: vsr_cga3D_types.h:63
Point mPos
Position.
Definition: vsr_cga3D_frame.h:52
static Point point(VSR_PRECISION x, VSR_PRECISION y, VSR_PRECISION z)
Null Point from Coordinates.
Motor relMotor(const Frame &target)
Relative Motor to Take this to Frame f.
Par pz() const
z direction point pair around center
Biv yz() const
yz euclidean bivector
VSR_PRECISION mScale
Scale.
Definition: vsr_cga3D_frame.h:59
VSR_PRECISION ab() const
Get bivector accelerator (rotational)
Definition: vsr_cga3D_frame.h:239
Dls ibound() const
Dual Imaginary Sphere Shell.
NTrs< 5 > Trs
Translator
Definition: vsr_cga3D_types.h:91
Mot Motor
Twisting Rotor \(e^\lambda\)
Definition: vsr_cga3D_types.h:145
Cir cxy() const
xy circle (real, direct)
Cir icyz() const
yz circle (imaginary, direct)
Dll dlz() const
z direction dual line
Biv xy() const
xz euclidean bivector
Frame & relTwistAway(const Frame &target, float t)
Relative twist away frome frame f by amt t.
Par tz() const
Null Point Pair in local z direction.
VSR_PRECISION & ab()
Set bivector accelerator (rotational)
Definition: vsr_cga3D_frame.h:238
Dll dly() const
y direction dual line
Frame & step()
Move and Spin.
Dll dlx() const
x direction dual line
Biv dBiv
Rotational Velocity.
Definition: vsr_cga3D_frame.h:56
NMot< 5 > Mot
Motor
Definition: vsr_cga3D_types.h:92
NRot< 5 > Rot
Rotor
Definition: vsr_cga3D_types.h:64