DayZ 1.28
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ AddArrow()

void IEntity::AddArrow ( Object arrow,
int componentIndex,
vector closeBonePosWS,
vector closeBoneRotWS )
inlineprivate

См. определение в файле Object.c строка 1371

1372 {
1373 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1374 vector parentTransMat[4];
1375 vector arrowTransMat[4];
1376
1377 if (pivot == -1)
1378 {
1379 GetTransform(parentTransMat);
1380 }
1381 else
1382 {
1383 GetBoneTransformWS(pivot, parentTransMat);
1384 }
1385
1386 float scale = GetScale();
1387 scale = 1 / (scale * scale);
1388
1389 arrow.GetTransform(arrowTransMat);
1390 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1391
1392 // orthogonalize matrix - parent might be skewed
1393 Math3D.MatrixOrthogonalize4(arrowTransMat);
1394
1395 arrowTransMat[3] = arrowTransMat[3] * scale;
1396
1397 arrow.SetTransform(arrowTransMat);
1398
1399 AddChild(arrow, pivot);
1400 }
proto int GetBonePivot(int level, int component)
Get the pivot point of the bone from the component index in the LOD, level can be geometry,...
proto native int GetFireGeometryLevel()
proto native void GetBoneTransformWS(int pivot, out vector transform[4])
proto native external bool AddChild(notnull IEntity child, int pivot, bool positionOnly=false)
Adds child entity to this entity.
proto external void GetTransform(out vector mat[])
Returns transformation of Entity. It returns only so much vectors as array is big.
proto native external float GetScale()

Перекрестные ссылки AddChild(), GetBonePivot(), GetBoneTransformWS(), GetFireGeometryLevel(), GetScale(), GetTransform(), Math3D::MatrixInvMultiply4(), Math3D::MatrixOrthogonalize4() и Object().