| 156 | |
| 157 | |
| 158 | void debugDrawBone (const Matrix44& rParent, const Matrix44& rBone, const float pColor[4]) |
| 159 | { |
| 160 | Vec3 vBone = rParent.GetTranslationOLD() - rBone.GetTranslationOLD(); |
| 161 | float fBoneSize = vBone.Length(); |
| 162 | |
| 163 | Matrix34 m34=Matrix34(GetTransposed44(rBone)); |
| 164 | debugDrawSphere(m34, fBoneSize / 15, pColor); |
| 165 | |
| 166 | if (fBoneSize < 1e-4) |
| 167 | return; |
| 168 | |
| 169 | debugDrawLine (rParent.GetTranslationOLD(), rBone.GetTranslationOLD(), pColor); |
| 170 | |
| 171 | Matrix44 matBone2; |
| 172 | float q = fBoneSize/20; |
| 173 | BuildMatrixFromFwd (vBone/fBoneSize, rBone.GetTranslationOLD(), matBone2); |
| 174 | debugDrawLine (rBone.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(q,q,q)), pColor); |
| 175 | debugDrawLine (rBone.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(-q,q,q)), pColor); |
| 176 | debugDrawLine (rBone.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(q,-q,q)), pColor); |
| 177 | debugDrawLine (rBone.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(-q,-q,q)), pColor); |
| 178 | |
| 179 | debugDrawLine (matBone2.TransformPointOLD(Vec3( q, q,q)), matBone2.TransformPointOLD(Vec3(-q,q,q)), pColor); |
| 180 | debugDrawLine (matBone2.TransformPointOLD(Vec3(-q, q,q)), matBone2.TransformPointOLD(Vec3(-q,-q,q)), pColor); |
| 181 | debugDrawLine (matBone2.TransformPointOLD(Vec3(-q,-q,q)), matBone2.TransformPointOLD(Vec3(q,-q,q)), pColor); |
| 182 | debugDrawLine (matBone2.TransformPointOLD(Vec3( q,-q,q)), matBone2.TransformPointOLD(Vec3(q,q,q)), pColor); |
| 183 | |
| 184 | debugDrawLine (rParent.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(q,q,q)), pColor); |
| 185 | debugDrawLine (rParent.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(-q,q,q)), pColor); |
| 186 | debugDrawLine (rParent.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(q,-q,q)), pColor); |
| 187 | debugDrawLine (rParent.GetTranslationOLD(), matBone2.TransformPointOLD(Vec3(-q,-q,q)), pColor); |
| 188 | } |
| 189 | |
| 190 | bool IsValidString(const char*szMorphTarget) |
| 191 | { |
no test coverage detected