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

Method IsInside

engine/Poseidon/World/Simulation/Collisions.cpp:1905–1931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1903}
1904
1905void Landscape::IsInside(StaticArrayAuto<OLink<Object>>& objects, Object* ignore, Vector3Par pos, ObjIntersect isect)
1906{
1907 objects.Clear();
1908 int xMin, xMax, zMin, zMax;
1909 ::ObjRadiusRectangle(xMin, xMax, zMin, zMax, pos, 25);
1910 int x, z;
1911 for (x = xMin; x <= xMax; x++)
1912 {
1913 for (z = zMin; z <= zMax; z++)
1914 {
1915 const ObjectList& list = _objects(x, z);
1916 int n = list.Size();
1917 for (int i = 0; i < n; i++)
1918 {
1919 Object* obj = list[i];
1920 if (obj == ignore)
1921 {
1922 continue;
1923 }
1924 if (obj->IsInside(pos, isect))
1925 {
1926 objects.Add(obj);
1927 }
1928 }
1929 }
1930 }
1931}
1932
1933static RString ShapeName(const Object* obj)
1934{

Callers

nothing calls this directly

Calls 4

ObjRadiusRectangleFunction · 0.85
ClearMethod · 0.45
SizeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected