272 Chapter 4 Scene Graphs
protected:
virtual void UpdateModelBound ();
virtual void UpdateModelNormals ();
virtual void UpdateWorldBound ();
};
As with the Spatial class, the data members are in public scope because there are no
immediate side effects from reading or writing them. But there are side effects that
the programmer must ensure, namely, the geometric update itself.
The function
UpdateMS (update model state) is the entry point into the update
of the model bound and model normals. The function should be called whenever
you change the model vertices. All that
UpdateMS does is call the protected functions
UpdateModelBound and UpdateModelNormals. The function UpdateModelBound com-
putes a model bounding volume from the collection of vertices. This ...