MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / UpdateWorldBound

Method UpdateWorldBound

GTE/Graphics/Node.cpp:162–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void Node::UpdateWorldBound()
163{
164 if (!worldBoundIsCurrent)
165 {
166 // Start with an invalid bound.
167 worldBound.SetCenter({ 0.0f, 0.0f, 0.0f });
168 worldBound.SetRadius(0.0f);
169
170 for (auto& child : mChild)
171 {
172 if (child)
173 {
174 // GrowToContain ignores invalid child bounds. If the world
175 // bound is invalid and a child bound is valid, the child
176 // bound is copied to the world bound. If the world bound and
177 // child bound are valid, the smallest bound containing both
178 // bounds is assigned to the world bound.
179 worldBound.GrowToContain(child->worldBound);
180 }
181 }
182 }
183}
184
185void Node::GetVisibleSet(Culler& culler,
186 std::shared_ptr<Camera> const& camera, bool noCull)

Callers 3

TestIntersectionMethod · 0.45
FindIntersectionMethod · 0.45
PropagateBoundToRootMethod · 0.45

Calls 3

SetCenterMethod · 0.80
SetRadiusMethod · 0.80
GrowToContainMethod · 0.80

Tested by 1

TestIntersectionMethod · 0.36