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

◆ AddArrow()

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

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

1389 {
1390 int pivot = GetBonePivot(GetFireGeometryLevel(), componentIndex);
1391 vector parentTransMat[4];
1392 vector arrowTransMat[4];
1393
1394 if (pivot == -1)
1395 {
1396 GetTransform(parentTransMat);
1397 }
1398 else
1399 {
1400 GetBoneTransformWS(pivot, parentTransMat);
1401 }
1402
1403 float scale = GetScale();
1404 scale = 1 / (scale * scale);
1405
1406 arrow.GetTransform(arrowTransMat);
1407 Math3D.MatrixInvMultiply4(parentTransMat, arrowTransMat, arrowTransMat);
1408
1409 // orthogonalize matrix - parent might be skewed
1410 Math3D.MatrixOrthogonalize4(arrowTransMat);
1411
1412 arrowTransMat[3] = arrowTransMat[3] * scale;
1413
1414 arrow.SetTransform(arrowTransMat);
1415
1416 AddChild(arrow, pivot);
1417 }
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().