15#ifndef __igtlPositionMessage_h
16#define __igtlPositionMessage_h
111 igtlFloat32 m_Position[3];
114 igtlFloat32 m_Quaternion[4];
int GetPackType()
Gets the type of the pack. The returned value must be either POSITION_ONLY, WITH_QUATERNION3,...
SmartPointer< Self > Pointer
virtual int PackBody()
Packs (serialize) the body. Must be implemented in a child class.
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.
virtual int GetBodyPackSize()
Gets the size of the serialized body.
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 UnpackBody()
Unpacks (deserialize) the body. Must be implemented in a child class.
int SetPackTypeByBodySize(int s)
Specifies the pack type by body size (in most case obtained from general header).
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'.
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