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

Method GetNormal

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

Source from the content-addressed store, hash-verified

295}
296
297Vector3Val ClothObject::GetNormal(float x, float y) const
298{
299 int xInt = toInt(x * (_knots.W() - 1));
300 int yInt = toInt(y * (_knots.H() - 1));
301 saturate(xInt, 0, _knots.W() - 1);
302 saturate(yInt, 0, _knots.H());
303 const ClothKnot& knot = _knots.Get(xInt, yInt);
304 return knot._norm;
305}
306
307} // namespace Poseidon

Callers 4

FlagAnimateMethod · 0.45
ChangeMethod · 0.45
InitShapeMethod · 0.45
InitMethod · 0.45

Calls 5

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

Tested by

no test coverage detected