MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / UpdateOrigin

Method UpdateOrigin

Source/Engine/Level/Level.cpp:54–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52#endif
53
54void LargeWorlds::UpdateOrigin(Vector3& origin, const Vector3& position)
55{
56 if (Enable)
57 {
58 constexpr Real chunkSizeInv = 1.0 / ChunkSize;
59 constexpr Real chunkSizeHalf = ChunkSize * 0.5;
60 origin = Vector3(Int3((position - chunkSizeHalf) * chunkSizeInv)) * ChunkSize;
61 }
62}
63
64bool LayersMask::HasLayer(const StringView& layerName) const
65{

Callers 2

CopyFromMethod · 0.80
CopyViewDataMethod · 0.80

Calls 2

Int3Class · 0.85
Vector3Class · 0.50

Tested by

no test coverage detected