15#ifndef __igtlPositionMessage_h
16#define __igtlPositionMessage_h
111 igtlFloat32 m_Position[3];
114 igtlFloat32 m_Quaternion[4];
virtual int PackContent()
Packs (serialize) the content. Must be implemented in all child classes.
int GetPackType()
Gets the type of the pack. The returned value must be either POSITION_ONLY, WITH_QUATERNION3,...
SmartPointer< Self > Pointer
igtlNewMacro(igtl::PositionMessage)
void GetQuaternion(float *ox, float *oy, float *oz, float *w)
Gets the quaternion. The function substitutes the elements of the quaternion in 'ox',...
void SetPosition(const float *pos)
Sets the position by 3-element array of x, y, and z coordinates.
int SetPackTypeByContentSize(int s)
Specifies the pack type by body size (in most case obtained from general header).
void SetQuaternion(const float *quat)
Sets the quaternion by 4-element array.
igtlTypeMacro(igtl::PositionMessage, igtl::MessageBase)
void GetQuaternion(float *quat)
Gets the quaternion. The function substitutes the array of elements of the quaternion in 'quat'.
virtual int CalculateContentBufferSize()
Gets the size of the serialized content.
void SetQuaternion(float ox, float oy, float oz, float w)
Sets the quaternion by elements of the quaternion (ox, oy, oz and w).
void Init()
Initializes the class.
virtual int SetMessageHeader(const MessageHeader *mb)
Sets the message header.
void SetPackType(int t)
Sets the type of the pack. 't' must be either POSITION_ONLY, WITH_QUATERNION3, or ALL.
SmartPointer< const Self > ConstPointer
void GetPosition(float *pos)
Gets the position. The function substitutes 3-element array of x, y and z coordinates in 'pos'.
virtual int UnpackContent()
Unpacks (deserialize) the content. Must be implemented in all child classes.
igtlInt32 m_PackType
The type of message formats (either POSITION_ONLY, WITH_QUATERNION3, or ALL).
void SetPosition(float x, float y, float z)
Sets the position by x, y, and z coordinates.
void GetPosition(float *x, float *y, float *z)
Gets the position. The function substitutes the coordinates in 'x', 'y', and 'z'.
Implements transparent reference counting.
The "igtl" namespace contains all OpenIGTLink classes. There are several nested namespaces within the...
class MessageBase MessageHeader