MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / GetPosition

Method GetPosition

engine/Poseidon/World/Simulation/Cloth/ClothObject.cpp:287–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287Vector3Val ClothObject::GetPosition(float x, float y) const
288{
289 int xInt = toInt(x * (_knots.W() - 1));
290 int yInt = toInt(y * (_knots.H() - 1));
291 saturate(xInt, 0, _knots.W() - 1);
292 saturate(yInt, 0, _knots.H() - 1);
293 const ClothKnot& knot = _knots.Get(xInt, yInt);
294 return knot._pos;
295}
296
297Vector3Val ClothObject::GetNormal(float x, float y) const
298{

Callers

nothing calls this directly

Calls 5

saturateFunction · 0.85
toIntFunction · 0.50
WMethod · 0.45
HMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected