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

◆ AddArrow()

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

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

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