Not particularly indicate, all of the nets taken online.
3D scene is a substantive content of a 3D program. If the 3D objects and various lights are stacked in the scene, then the scene is not a scene but is a garbage. Scene requires an orderly organization, which is a problem with any 3D engine. OGREs put forward several important concepts in order to solve the problem of scene management and implement them as an example in the engine: Entity: Scene elements, Mesh (model) instances in the scene. Light: Scene elements, real world lights in scenarios. Camera: Scene elements, real world observers in scenarios. SceneNode: Abstract scene management unit. Note that SceneNode and several other concepts are different, and several other concepts are abstraction of real things, while SceneNode does not exist in the real world, it is an abstract concept proposed for organizational scenes. Ogre's thoughts are like this: divide the scenes in the real world into different spaces of abstraction, and can also be divided into different small spaces in the region. Each space is managed by a scenenode object, and SceneNode will process mobile, rotation, and zoom, etc. Behavior related to space. On each scerenode, you can mount various scene elements (such as: Entity, Light, Camera et al.), The scene elements are not responsible for behaviors related to spatial location, all handed over to SceneNode (Light and Camera class also saved yourself The location, but many times, it is also hung up to SceneNode to handle it, and will be detailed later. Ogre will organize a large number of SceneNode to organize a tree structure in accordance with the space of space, thereby completing the ordered organization of the entire scene. The scenario structure is as follows: The location of the scenario root node is often at the center of the scene. Each node object uses data members to save relative displacement and relative rotation of the parent node (this is important). The node class provides the movement and rotation functions of the node. Thus, when the node 1 moves and rotates, its all child nodes and the scene elements they mounted will also move passively and rotate. Imagine 5 people and a dog sitting in the car, when the car turns, the relative position of 5 people and dogs did not change, but they all turned! This is the huge power of the node tree organizational scene. Think about it, when narrowing and rotating the root node, the whole world shrinks and rotates. OGRE provides a SceneManager class to be responsible for maintenance of the entire scene node tree. SceneManager is also responsible for the management and maintenance of Entity, Light and Camera. So when we do it in the scene, we are more dealing with SceneManager.
There are two modes of the processing method for the input event: Immediate mode and buffer mode. Generally speaking, the immediate mode is suitable for the 3D scene roaming process, and the system captures the input device status before each frame, and controls the objects and video players in the scene according to these states. The buffer mode is suitable for the GUI interface (such as setting menu), the input device state can be sent to each GUI element for processing (such as the button being pressed).
Therefore, the constructive function of Exampleframelistener has the usebufferedInput parameter, the default situation is False, which is the immediate mode. In addition, the constructor of ExampleFramelistener also requires the rendering window and the current camera as parameters, because OGRE supports multi-window rendering and multi-camera, ExampleFrameListener needs to know the control of the control.