From 5abff2f86f35aacbfafd4afd919b1a5faa16ac4f Mon Sep 17 00:00:00 2001 From: Longquan Chen Date: Wed, 23 Oct 2019 10:38:04 -0400 Subject: [PATCH] FEATURE: user has the temptation to reuse the Messages, this commit fullfilled the needs by setting the flag to false. See issue #161 --- Examples/Tracker/TrackerClient.cxx | 1 - Examples/Tracker/TrackerClient2.cxx | 1 - Examples/Tracker/TrackerClient3.cxx | 1 - Examples/Tracker/TrackerServer.cxx | 1 - Source/igtlBindMessage.cxx | 7 ++++++- Source/igtlCapabilityMessage.cxx | 4 +++- Source/igtlCommandMessage.cxx | 7 +++++++ Source/igtlImageMessage.cxx | 11 +++++++++++ Source/igtlImageMessage2.cxx | 11 +++++++++++ Source/igtlImageMetaMessage.cxx | 3 ++- Source/igtlLabelMetaMessage.cxx | 3 ++- Source/igtlNDArrayMessage.cxx | 3 ++- Source/igtlPointMessage.cxx | 3 ++- Source/igtlPolyDataMessage.cxx | 4 +++- Source/igtlPositionMessage.cxx | 7 ++++++- Source/igtlStatusMessage.cxx | 7 +++++-- Source/igtlStringMessage.cxx | 5 ++++- Source/igtlTrackingDataMessage.cxx | 1 + Source/igtlTrajectoryMessage.cxx | 1 + Source/igtlTransformMessage.cxx | 5 +++++ 20 files changed, 71 insertions(+), 15 deletions(-) diff --git a/Examples/Tracker/TrackerClient.cxx b/Examples/Tracker/TrackerClient.cxx index 876730570..f7b7a14f8 100644 --- a/Examples/Tracker/TrackerClient.cxx +++ b/Examples/Tracker/TrackerClient.cxx @@ -73,7 +73,6 @@ int main(int argc, char* argv[]) igtl::Matrix4x4 matrix; GetRandomTestMatrix(matrix); ts->GetTime(); - transMsg->InitPack(); transMsg->SetMatrix(matrix); transMsg->SetTimeStamp(ts); transMsg->Pack(); diff --git a/Examples/Tracker/TrackerClient2.cxx b/Examples/Tracker/TrackerClient2.cxx index 82e4509e9..5e81d9d49 100644 --- a/Examples/Tracker/TrackerClient2.cxx +++ b/Examples/Tracker/TrackerClient2.cxx @@ -71,7 +71,6 @@ int main(int argc, char* argv[]) float quaternion[4]; GetRandomTestVectors(position, quaternion); - positionMsg->InitPack(); positionMsg->SetPosition(position); positionMsg->SetQuaternion(quaternion); positionMsg->Pack(); diff --git a/Examples/Tracker/TrackerClient3.cxx b/Examples/Tracker/TrackerClient3.cxx index 38a7c1989..8409618e8 100644 --- a/Examples/Tracker/TrackerClient3.cxx +++ b/Examples/Tracker/TrackerClient3.cxx @@ -97,7 +97,6 @@ int main(int argc, char* argv[]) { for (int i = 0; i < numdev; i ++) { - transMsg->InitPack(); transMsg->SetDeviceName(devicename[i]); igtl::Matrix4x4 matrix; GetRandomTestMatrix(matrix, phi[i], theta[i]); diff --git a/Examples/Tracker/TrackerServer.cxx b/Examples/Tracker/TrackerServer.cxx index b43015a55..1fe3740d7 100644 --- a/Examples/Tracker/TrackerServer.cxx +++ b/Examples/Tracker/TrackerServer.cxx @@ -68,7 +68,6 @@ int main(int argc, char* argv[]) { igtl::Matrix4x4 matrix; GetRandomTestMatrix(matrix); - transMsg->InitPack(); transMsg->SetDeviceName("Tracker"); transMsg->SetMatrix(matrix); transMsg->Pack(); diff --git a/Source/igtlBindMessage.cxx b/Source/igtlBindMessage.cxx index 40756a322..1476951a3 100644 --- a/Source/igtlBindMessage.cxx +++ b/Source/igtlBindMessage.cxx @@ -42,6 +42,7 @@ void BindMessageBase::Init() int BindMessageBase::SetNumberOfChildMessages(unsigned int n) { + m_IsBodyPacked = false; this->m_ChildMessages.resize(n); return this->m_ChildMessages.size(); } @@ -57,6 +58,7 @@ int BindMessageBase::AppendChildMessage(igtl::MessageBase * child) { if (this->m_ChildMessages.size() < 0xFFFF) { + m_IsBodyPacked = false; ChildMessageInfo info; #if OpenIGTLink_HEADER_VERSION >= 2 info.type = child->GetMessageType(); @@ -81,6 +83,7 @@ int BindMessageBase::SetChildMessage(unsigned int i, igtl::MessageBase * child) { if (i < this->m_ChildMessages.size()) { + m_IsBodyPacked = false; #if OpenIGTLink_HEADER_VERSION >= 2 this->m_ChildMessages[i].type = child->GetMessageType(); #else @@ -300,6 +303,7 @@ int GetBindMessage::AppendChildMessage(const char * type, const char * name) if (strlen(type) < IGTL_HEADER_TYPE_SIZE && strlen(name) < IGTL_HEADER_NAME_SIZE) { + m_IsBodyPacked = false; BindMessageBase::ChildMessageInfo info; info.type = type; info.name = name; @@ -408,6 +412,7 @@ StartBindMessage::~StartBindMessage() void StartBindMessage::SetResolution(igtlUint64 res) { + m_IsBodyPacked = false; this->m_Resolution = res; } @@ -534,4 +539,4 @@ int RTSBindMessage::UnpackContent() -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlCapabilityMessage.cxx b/Source/igtlCapabilityMessage.cxx index dee48da86..8696644eb 100755 --- a/Source/igtlCapabilityMessage.cxx +++ b/Source/igtlCapabilityMessage.cxx @@ -52,6 +52,7 @@ CapabilityMessage::~CapabilityMessage() void CapabilityMessage::SetTypes(std::vector types) { + m_IsBodyPacked = false; this->m_TypeNames.clear(); this->m_TypeNames = types; } @@ -61,6 +62,7 @@ int CapabilityMessage::SetType(int id, const char* type) { if (id < (int)this->m_TypeNames.size() && strlen(type) < IGTL_HEADER_TYPE_SIZE) { + m_IsBodyPacked = false; this->m_TypeNames[id] = type; return 1; } @@ -152,4 +154,4 @@ int CapabilityMessage::UnpackContent() } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlCommandMessage.cxx b/Source/igtlCommandMessage.cxx index 0165a8382..f8318dfb0 100644 --- a/Source/igtlCommandMessage.cxx +++ b/Source/igtlCommandMessage.cxx @@ -64,6 +64,7 @@ CommandMessage::~CommandMessage() int CommandMessage::SetCommandId(igtlUint32 aId) { + m_IsBodyPacked = false; this->m_CommandId = aId; return 1; } @@ -75,6 +76,7 @@ int CommandMessage::SetCommandName(const char* aCommandName) { return 0; } + m_IsBodyPacked = false; strcpy((char*)m_CommandName, aCommandName); return 1; } @@ -92,6 +94,7 @@ int CommandMessage::SetCommandContent(const char* string) { return 0; } + m_IsBodyPacked = false; this->m_Command = string; return (int) this->m_Command.length(); } @@ -103,6 +106,7 @@ int CommandMessage::SetCommandContent(const std::string & string) { return 0; } + m_IsBodyPacked = false; this->m_Command = string; return (int) this->m_Command.length(); } @@ -114,6 +118,7 @@ int CommandMessage::SetContentEncoding(igtlUint16 enc) { return 0; } + m_IsBodyPacked = false; this->m_Encoding = enc; return 1; } @@ -218,6 +223,7 @@ int RTSCommandMessage::SetCommandErrorString(const char* anErrorString) { return 0; } + m_IsBodyPacked = false; strcpy((char*)m_CommandName, anErrorString); return 1; } @@ -229,6 +235,7 @@ int RTSCommandMessage::SetCommandErrorString(const std::string& anErrorString) { return 0; } + m_IsBodyPacked = false; strcpy((char*)m_CommandName, anErrorString.c_str()); return 1; } diff --git a/Source/igtlImageMessage.cxx b/Source/igtlImageMessage.cxx index d8b1ebf2d..b5b88799c 100644 --- a/Source/igtlImageMessage.cxx +++ b/Source/igtlImageMessage.cxx @@ -67,6 +67,7 @@ ImageMessage::~ImageMessage() void ImageMessage::SetDimensions(int s[3]) { + m_IsBodyPacked = false; dimensions[0] = s[0]; dimensions[1] = s[1]; dimensions[2] = s[2]; @@ -82,6 +83,7 @@ void ImageMessage::SetDimensions(int s[3]) void ImageMessage::SetDimensions(int i, int j, int k) { + m_IsBodyPacked = false; dimensions[0] = i; dimensions[1] = j; dimensions[2] = k; @@ -116,6 +118,7 @@ int ImageMessage::SetSubVolume(int dim[3], int off[3]) off[1] + dim[1] <= dimensions[1] && off[2] + dim[2] <= dimensions[2]) { + m_IsBodyPacked = false; subDimensions[0] = dim[0]; subDimensions[1] = dim[1]; subDimensions[2] = dim[2]; @@ -137,6 +140,7 @@ int ImageMessage::SetSubVolume(int dimi, int dimj, int dimk, int offi, int offj, offj + dimj <= dimensions[1] && offk + dimk <= dimensions[2]) { + m_IsBodyPacked = false; subDimensions[0] = dimi; subDimensions[1] = dimj; subDimensions[2] = dimk; @@ -175,6 +179,7 @@ void ImageMessage::GetSubVolume(int &dimi, int &dimj, int &dimk, void ImageMessage::SetSpacing(float s[3]) { + m_IsBodyPacked = false; spacing[0] = s[0]; spacing[1] = s[1]; spacing[2] = s[2]; @@ -182,6 +187,7 @@ void ImageMessage::SetSpacing(float s[3]) void ImageMessage::SetSpacing(float si, float sj, float sk) { + m_IsBodyPacked = false; spacing[0] = si; spacing[1] = sj; spacing[2] = sk; @@ -203,6 +209,7 @@ void ImageMessage::GetSpacing(float &si, float &sj, float &sk) void ImageMessage::SetOrigin(float p[3]) { + m_IsBodyPacked = false; matrix[0][3] = p[0]; matrix[1][3] = p[1]; matrix[2][3] = p[2]; @@ -210,6 +217,7 @@ void ImageMessage::SetOrigin(float p[3]) void ImageMessage::SetOrigin(float px, float py, float pz) { + m_IsBodyPacked = false; matrix[0][3] = px; matrix[1][3] = py; matrix[2][3] = pz; @@ -231,6 +239,7 @@ void ImageMessage::GetOrigin(float &px, float &py, float &pz) void ImageMessage::SetNormals(float o[3][3]) { + m_IsBodyPacked = false; matrix[0][0] = o[0][0]; matrix[0][1] = o[0][1]; matrix[0][2] = o[0][2]; @@ -244,6 +253,7 @@ void ImageMessage::SetNormals(float o[3][3]) void ImageMessage::SetNormals(float t[3], float s[3], float n[3]) { + m_IsBodyPacked = false; matrix[0][0] = t[0]; matrix[1][0] = t[1]; matrix[2][0] = t[2]; @@ -283,6 +293,7 @@ void ImageMessage::GetNormals(float t[3], float s[3], float n[3]) void ImageMessage::SetMatrix(Matrix4x4& mat) { + m_IsBodyPacked = false; matrix[0][0] = mat[0][0]; matrix[1][0] = mat[1][0]; matrix[2][0] = mat[2][0]; diff --git a/Source/igtlImageMessage2.cxx b/Source/igtlImageMessage2.cxx index d52928852..bf447224e 100644 --- a/Source/igtlImageMessage2.cxx +++ b/Source/igtlImageMessage2.cxx @@ -101,6 +101,7 @@ ImageMessage2::~ImageMessage2() void ImageMessage2::SetDimensions(int s[3]) { + m_IsBodyPacked = false; dimensions[0] = s[0]; dimensions[1] = s[1]; dimensions[2] = s[2]; @@ -116,6 +117,7 @@ void ImageMessage2::SetDimensions(int s[3]) void ImageMessage2::SetDimensions(int i, int j, int k) { + m_IsBodyPacked = false; dimensions[0] = i; dimensions[1] = j; dimensions[2] = k; @@ -150,6 +152,7 @@ int ImageMessage2::SetSubVolume(int dim[3], int off[3]) off[1] + dim[1] <= dimensions[1] && off[2] + dim[2] <= dimensions[2]) { + m_IsBodyPacked = false; subDimensions[0] = dim[0]; subDimensions[1] = dim[1]; subDimensions[2] = dim[2]; @@ -171,6 +174,7 @@ int ImageMessage2::SetSubVolume(int dimi, int dimj, int dimk, int offi, int offj offj + dimj <= dimensions[1] && offk + dimk <= dimensions[2]) { + m_IsBodyPacked = false; subDimensions[0] = dimi; subDimensions[1] = dimj; subDimensions[2] = dimk; @@ -209,6 +213,7 @@ void ImageMessage2::GetSubVolume(int &dimi, int &dimj, int &dimk, void ImageMessage2::SetSpacing(float s[3]) { + m_IsBodyPacked = false; spacing[0] = s[0]; spacing[1] = s[1]; spacing[2] = s[2]; @@ -216,6 +221,7 @@ void ImageMessage2::SetSpacing(float s[3]) void ImageMessage2::SetSpacing(float si, float sj, float sk) { + m_IsBodyPacked = false; spacing[0] = si; spacing[1] = sj; spacing[2] = sk; @@ -237,6 +243,7 @@ void ImageMessage2::GetSpacing(float &si, float &sj, float &sk) void ImageMessage2::SetOrigin(float p[3]) { + m_IsBodyPacked = false; matrix[0][3] = p[0]; matrix[1][3] = p[1]; matrix[2][3] = p[2]; @@ -244,6 +251,7 @@ void ImageMessage2::SetOrigin(float p[3]) void ImageMessage2::SetOrigin(float px, float py, float pz) { + m_IsBodyPacked = false; matrix[0][3] = px; matrix[1][3] = py; matrix[2][3] = pz; @@ -265,6 +273,7 @@ void ImageMessage2::GetOrigin(float &px, float &py, float &pz) void ImageMessage2::SetNormals(float o[3][3]) { + m_IsBodyPacked = false; matrix[0][0] = o[0][0]; matrix[0][1] = o[0][1]; matrix[0][2] = o[0][2]; @@ -278,6 +287,7 @@ void ImageMessage2::SetNormals(float o[3][3]) void ImageMessage2::SetNormals(float t[3], float s[3], float n[3]) { + m_IsBodyPacked = false; matrix[0][0] = t[0]; matrix[1][0] = t[1]; matrix[2][0] = t[2]; @@ -317,6 +327,7 @@ void ImageMessage2::GetNormals(float t[3], float s[3], float n[3]) void ImageMessage2::SetMatrix(Matrix4x4& mat) { + m_IsBodyPacked = false; matrix[0][0] = mat[0][0]; matrix[1][0] = mat[1][0]; matrix[2][0] = mat[2][0]; diff --git a/Source/igtlImageMetaMessage.cxx b/Source/igtlImageMetaMessage.cxx index 2fccf5ebb..91a78542e 100644 --- a/Source/igtlImageMetaMessage.cxx +++ b/Source/igtlImageMetaMessage.cxx @@ -203,6 +203,7 @@ ImageMetaMessage::~ImageMetaMessage() int ImageMetaMessage::AddImageMetaElement(ImageMetaElement::Pointer& elem) { + m_IsBodyPacked = false; this->m_ImageMetaList.push_back(elem); return this->m_ImageMetaList.size(); } @@ -330,4 +331,4 @@ int ImageMetaMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlLabelMetaMessage.cxx b/Source/igtlLabelMetaMessage.cxx index 747e26d70..9ea30c106 100644 --- a/Source/igtlLabelMetaMessage.cxx +++ b/Source/igtlLabelMetaMessage.cxx @@ -181,6 +181,7 @@ LabelMetaMessage::~LabelMetaMessage() int LabelMetaMessage::AddLabelMetaElement(LabelMetaElement::Pointer& elem) { + m_IsBodyPacked = false; this->m_LabelMetaList.push_back(elem); return this->m_LabelMetaList.size(); } @@ -295,4 +296,4 @@ int LabelMetaMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlNDArrayMessage.cxx b/Source/igtlNDArrayMessage.cxx index 9709c773e..2dc57b07a 100644 --- a/Source/igtlNDArrayMessage.cxx +++ b/Source/igtlNDArrayMessage.cxx @@ -154,6 +154,7 @@ NDArrayMessage::~NDArrayMessage() int NDArrayMessage::SetArray(int type, ArrayBase * a) { + m_IsBodyPacked = false; // Check if type is valid if (type < 2 || type > 13 || type == 8 || type == 9 || type == 12) @@ -287,4 +288,4 @@ int NDArrayMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlPointMessage.cxx b/Source/igtlPointMessage.cxx index 1dbc9dc83..0fc7c3199 100644 --- a/Source/igtlPointMessage.cxx +++ b/Source/igtlPointMessage.cxx @@ -176,6 +176,7 @@ PointMessage::~PointMessage() int PointMessage::AddPointElement(PointElement::Pointer& elem) { + m_IsBodyPacked = false; this->m_PointList.push_back(elem); return this->m_PointList.size(); } @@ -296,4 +297,4 @@ int PointMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlPolyDataMessage.cxx b/Source/igtlPolyDataMessage.cxx index ddf48854d..15f59f3e2 100644 --- a/Source/igtlPolyDataMessage.cxx +++ b/Source/igtlPolyDataMessage.cxx @@ -953,6 +953,7 @@ void PolyDataMessage::ClearAttributes() void PolyDataMessage::AddAttribute(PolyDataAttribute * att) { + m_IsBodyPacked = false; this->m_Attributes.push_back(att); } @@ -1009,6 +1010,7 @@ bool RTSPolyDataMessage::GetStatus() const void RTSPolyDataMessage::SetStatus(bool status) { + m_IsBodyPacked = false; m_Status = status ? 1 : 0; } @@ -1049,4 +1051,4 @@ int RTSPolyDataMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlPositionMessage.cxx b/Source/igtlPositionMessage.cxx index 28af88745..00b982998 100644 --- a/Source/igtlPositionMessage.cxx +++ b/Source/igtlPositionMessage.cxx @@ -57,6 +57,7 @@ void PositionMessage::SetPackType(int t) int PositionMessage::SetPackTypeByContentSize(int s) { + m_IsBodyPacked = false; if (s == IGTL_POSITION_MESSAGE_POSITON_ONLY_SIZE) { this->m_PackType = POSITION_ONLY; @@ -81,6 +82,7 @@ int PositionMessage::SetPackTypeByContentSize(int s) void PositionMessage::SetPosition(const float* pos) { + m_IsBodyPacked = false; this->m_Position[0] = pos[0]; this->m_Position[1] = pos[1]; this->m_Position[2] = pos[2]; @@ -88,6 +90,7 @@ void PositionMessage::SetPosition(const float* pos) void PositionMessage::SetPosition(float x, float y, float z) { + m_IsBodyPacked = false; this->m_Position[0] = x; this->m_Position[1] = y; this->m_Position[2] = z; @@ -96,6 +99,7 @@ void PositionMessage::SetPosition(float x, float y, float z) void PositionMessage::SetQuaternion(const float* quat) { + m_IsBodyPacked = false; this->m_Quaternion[0] = quat[0]; this->m_Quaternion[1] = quat[1]; this->m_Quaternion[2] = quat[2]; @@ -104,6 +108,7 @@ void PositionMessage::SetQuaternion(const float* quat) void PositionMessage::SetQuaternion(float ox, float oy, float oz, float w) { + m_IsBodyPacked = false; this->m_Quaternion[0] = ox; this->m_Quaternion[1] = oy; this->m_Quaternion[2] = oz; @@ -280,4 +285,4 @@ int PositionMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlStatusMessage.cxx b/Source/igtlStatusMessage.cxx index b165ca0dc..d96760ea5 100644 --- a/Source/igtlStatusMessage.cxx +++ b/Source/igtlStatusMessage.cxx @@ -42,7 +42,7 @@ StatusMessage::~StatusMessage() void StatusMessage::SetCode(int code) { - + m_IsBodyPacked = false; if (code >= 0 && code < STATUS_NUM_TYPES) { this->m_Code = code; @@ -60,6 +60,7 @@ int StatusMessage::GetCode() void StatusMessage::SetSubCode(igtlInt64 subcode) { + m_IsBodyPacked = false; this->m_SubCode = subcode; } @@ -70,6 +71,7 @@ igtlInt64 StatusMessage::GetSubCode() void StatusMessage::SetErrorName(const char* name) { + m_IsBodyPacked = false; this->m_ErrorName[IGTL_STATUS_ERROR_NAME_LENGTH-1] = '\0'; strncpy(this->m_ErrorName, name, IGTL_STATUS_ERROR_NAME_LENGTH); } @@ -81,6 +83,7 @@ const char* StatusMessage::GetErrorName() void StatusMessage::SetStatusString(const char* str) { + m_IsBodyPacked = false; this->m_StatusMessageString = str; } @@ -142,4 +145,4 @@ int StatusMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlStringMessage.cxx b/Source/igtlStringMessage.cxx index e9817e943..d70107efb 100644 --- a/Source/igtlStringMessage.cxx +++ b/Source/igtlStringMessage.cxx @@ -42,6 +42,7 @@ int StringMessage::SetString(const char* string) { return 0; } + m_IsBodyPacked = false; this->m_String = string; return (int) this->m_String.length(); } @@ -53,6 +54,7 @@ int StringMessage::SetString(const std::string & string) { return 0; } + m_IsBodyPacked = false; this->m_String = string; return (int) this->m_String.length(); } @@ -62,6 +64,7 @@ int StringMessage::SetEncoding(igtlUint16 enc) { // TODO: the argument should be validated before it is substituted this->m_Encoding = enc; + m_IsBodyPacked = false; return 1; } @@ -134,4 +137,4 @@ int StringMessage::UnpackContent() return 1; } -} // namespace igtl \ No newline at end of file +} // namespace igtl diff --git a/Source/igtlTrackingDataMessage.cxx b/Source/igtlTrackingDataMessage.cxx index cfeb71c13..20a245b82 100644 --- a/Source/igtlTrackingDataMessage.cxx +++ b/Source/igtlTrackingDataMessage.cxx @@ -273,6 +273,7 @@ TrackingDataMessage::~TrackingDataMessage() int TrackingDataMessage::AddTrackingDataElement(TrackingDataElement::Pointer& elem) { + m_IsBodyPacked = false; this->m_TrackingDataList.push_back(elem); return this->m_TrackingDataList.size(); } diff --git a/Source/igtlTrajectoryMessage.cxx b/Source/igtlTrajectoryMessage.cxx index ddca99662..aacdf06d1 100644 --- a/Source/igtlTrajectoryMessage.cxx +++ b/Source/igtlTrajectoryMessage.cxx @@ -228,6 +228,7 @@ TrajectoryMessage::~TrajectoryMessage() int TrajectoryMessage::AddTrajectoryElement(TrajectoryElement::Pointer& elem) { + m_IsBodyPacked = false; this->m_TrajectoryList.push_back(elem); return this->m_TrajectoryList.size(); } diff --git a/Source/igtlTransformMessage.cxx b/Source/igtlTransformMessage.cxx index 57a3ad7c5..0d13cf299 100644 --- a/Source/igtlTransformMessage.cxx +++ b/Source/igtlTransformMessage.cxx @@ -57,6 +57,7 @@ TransformMessage::~TransformMessage() void TransformMessage::SetPosition(float p[3]) { + m_IsBodyPacked = false; matrix[0][3] = p[0]; matrix[1][3] = p[1]; matrix[2][3] = p[2]; @@ -72,6 +73,7 @@ void TransformMessage::GetPosition(float p[3]) void TransformMessage::SetPosition(float px, float py, float pz) { + m_IsBodyPacked = false; matrix[0][3] = px; matrix[1][3] = py; matrix[2][3] = pz; @@ -86,6 +88,7 @@ void TransformMessage::GetPosition(float* px, float* py, float* pz) void TransformMessage::SetNormals(float o[3][3]) { + m_IsBodyPacked = false; matrix[0][0] = o[0][0]; matrix[0][1] = o[0][1]; matrix[0][2] = o[0][2]; @@ -112,6 +115,7 @@ void TransformMessage::GetNormals(float o[3][3]) void TransformMessage::SetNormals(float t[3], float s[3], float n[3]) { + m_IsBodyPacked = false; matrix[0][0] = t[0]; matrix[1][0] = t[1]; matrix[2][0] = t[2]; @@ -138,6 +142,7 @@ void TransformMessage::GetNormals(float t[3], float s[3], float n[3]) void TransformMessage::SetMatrix(Matrix4x4& mat) { + m_IsBodyPacked = false; matrix[0][0] = mat[0][0]; matrix[1][0] = mat[1][0]; matrix[2][0] = mat[2][0];