Jamoma API  0.6.0.a19
TTSpatEntity.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspSpatLib
4  *
5  * @brief #TTSpatEntity describes the geometry of a point, and #TTSpatSource and #TTSpatSink specialise this further for the description of sources and sinks.
6  *
7  * @details
8  *
9  * @authors Trond Lossius, Timothy Place, Nils Peters,
10  *
11  * @copyright Copyright © 2011 by Trond Lossius, Nils Peters, and Timothy Place @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #include "TTSpatEntity.h"
18 
20 mPosition(),
21 mOrientation(),
22 mData()
23 {
24  ;
25 }
26 
27 
29 {
30 
31 }
32 
34 {
35  x = mPosition[0];
36  y = mPosition[1];
37  z = mPosition[2];
38 }
39 
40 
42 {
43  mPosition[0] = x;
44  mPosition[1] = y;
45  mPosition[2] = z;
46 }
47 
48 
50 {
51  q1 = mOrientation[0];
52  q2 = mOrientation[1];
53  q3 = mOrientation[2];
54  q4 = mOrientation[3];
55 }
56 
57 
59 {
60  mOrientation[0] = q1;
61  mOrientation[1] = q2;
62  mOrientation[2] = q3;
63  mOrientation[3] = q4;
64 }
65 
TTSpatEntity describes the geometry of a point, and TTSpatSource and TTSpatSink specialise this furth...
virtual ~TTSpatEntity()
Destructor.
double TTFloat64
64 bit floating point number
Definition: TTBase.h:188
TTSpatEntity()
Constructor.
void setPosition(TTFloat64 x, TTFloat64 y, TTFloat64 z)
Set the position of the point.
std::array< TTFloat64, 3 > mPosition
Position as Cartesian coordinates.
Definition: TTSpatEntity.h:29
void setOrientation(TTFloat64 q1, TTFloat64 q2, TTFloat64 q3, TTFloat64 q4)
Set the orientation of the point expressed as quaternions.
void getOrientation(TTFloat64 &q1, TTFloat64 &q2, TTFloat64 &q3, TTFloat64 &q4)
Get the orientation of the point expressed as quaternions.
void getPosition(TTFloat64 &x, TTFloat64 &y, TTFloat64 &z)
Get the current position of the point.
std::array< TTFloat64, 4 > mOrientation
The orientation of the object using Euler coordinates.
Definition: TTSpatEntity.h:30