/////////////////////////////////////////////////////////////////////
| 1085 | |
| 1086 | ////////////////////////////////////////////////////////////////////////// |
| 1087 | void CEntity::SetPosRotScale(const Vec3& vPos, const Quat& qRotation, const Vec3& vScale, int nWhyFlags) |
| 1088 | { |
| 1089 | int changed = 0; |
| 1090 | |
| 1091 | if (m_bNotInheritXform && (nWhyFlags & ENTITY_XFORM_FROM_PARENT)) // Ignore parent x-forms. |
| 1092 | return; |
| 1093 | |
| 1094 | if (CheckFlags(ENTITY_FLAG_IGNORE_PHYSICS_UPDATE) && (nWhyFlags & ENTITY_XFORM_PHYSICS_STEP)) // Ignore physical based position in editor related entities |
| 1095 | { |
| 1096 | return; |
| 1097 | } |
| 1098 | |
| 1099 | if (m_vPos != vPos) |
| 1100 | { |
| 1101 | nWhyFlags |= ENTITY_XFORM_POS; |
| 1102 | changed++; |
| 1103 | CHECKQNAN_VEC(vPos); |
| 1104 | m_vPos = vPos; |
| 1105 | } |
| 1106 | |
| 1107 | if (m_qRotation.v != qRotation.v || m_qRotation.w != qRotation.w) |
| 1108 | { |
| 1109 | nWhyFlags |= ENTITY_XFORM_ROT; |
| 1110 | changed++; |
| 1111 | m_qRotation = qRotation; |
| 1112 | } |
| 1113 | |
| 1114 | if (m_vScale != vScale) |
| 1115 | { |
| 1116 | nWhyFlags |= ENTITY_XFORM_SCL; |
| 1117 | changed++; |
| 1118 | m_vScale = vScale; |
| 1119 | } |
| 1120 | |
| 1121 | if (changed != 0) |
| 1122 | { |
| 1123 | InvalidateTM(nWhyFlags); |
| 1124 | } |
| 1125 | } |
| 1126 | |
| 1127 | ////////////////////////////////////////////////////////////////////////// |
| 1128 | void CEntity::CalcLocalTM(Matrix34& tm) const |
no outgoing calls
no test coverage detected