Http://blog.sina.com.cn/s/blog_60d6fadc010128mo.html
1.Const with the = 0 the Understanding
There is no relationship between Const and =0, to be understood separately.
The member function is then modified with a const, and the popular understanding is that the member variables of the class cannot be modified within the function unless the member variable is mutable.
= 0 means that this member function is a pure virtual function, that is, it can not be defined, only the interface, by its inheriting class specifically define its behavior, of course, you can also define the default function body. If a class contains a pure virtual function of =0, then this class is an abstract class that cannot be instantiated specifically (it cannot create its object), but only by deriving subclasses.
Example: factory class from Ogre
template< TypeName T >
Class Factoryobj
{
Public
Virtual ~factoryobj () {};
Virtual const string& GetType () const = 0;
Virtual t* CreateInstance (const string& name) = 0;
virtual void destroyinstance (t*) = 0;
};
Chapter III OGRE Design Assignments
Ogre's brightest spot: A separate design of scene and scene content.
Ogre the most flexible and valuable system: the material scripting system.
Ogre supports three modes of animation: Skeletal animation (Skeleton), variant animation (Morph), Attitude Animation (Pose).
Synth frame: Allows users to achieve full-screen two-dimensional post-processing effects at the viewport level. Note: This is the operation for the viewport.
What the resource means: all the data needed to render the geometry to the rendered target's data. Four states of the resource: Undefined, declared, not loaded, loaded.
Root object: The main entry point of the Ogre application as the appearance class for the entire engine.
Explorer: single-piece mode, using a single-piece object Resourcegroupmanager as the resource manager. Note The resource Group manager and the resource Manager are distinguished.
Ogre is an extremely important component concept: Scene manager. The specific execution of all scene graphs comes from the Scenemanager class, which supports multiple concurrent scene managers, although most of the time only one scene manager is working. Scene node (scenenode). Entity, which inherits from the active object (Movableobject).
Render system and render target: The former is a layer of abstraction for the underlying hardware API ogre. The latter is an object type created by the former. There is also rendering to the window and rendering to the texture.
The manager in Ogre is a single-piece mode.
Fourth Chapter OGRE Initialization of
Ogre's most famous selling point: it has good adaptability and elasticity. The so-called elasticity, is based on your own situation to choose the degree of control, like when driving the choice of manual or automatic block.
Ogre Render window: The only place that can be used by the system to render the scene. Like a canvas, Ogre draws the contents of your program to its surface. The camera is used to capture the scene, and the viewport is used to store film. The concept of "deep conflict" and its solution.
Render Loop: The simplest method, root->startrendering (); After invocation, Ogre will render all objects that can be rendered continuously. There are a number of ways to end rendering, and the best way is to return false in frame listening.
Frame monitoring: A frame listener is an instance of a class that conforms to the Framelistener interface. Ogre renders the method of the Framelistener interface at the beginning and end of each frame.
Manual initialization of the ogre.
The plug-in section-the most important of the two plugins is the octal tree scene Manager (Octreescenemanager), the Particle System Manager plug-in (Plugin_particlefx).
Rendering system-a way to get the rendering system. Manually set the method for rendering the system.
Render window--a way to manually create a render window. You can insert Ogre's rendering window into some window systems or build systems (Qt, wxWidgets) to get the handle of the current render window in the system. You can also let Ogre use the window you provided to him as the parent window for rendering.
Camera and scene management-these two classes render your scene.
Camera-has azimuth properties and cannot be rendered. The vertebral body is calculated according to the setting, and then the object is removed. Three rendering modes: border, solid, point. Point, direction, focus. Local coordinate system for axis bindings: The origin is the point where the camera is located, as the axis and the world coordinate system.
Advanced Camera Properties--ogre Stereo rendering (though not very useful).
Viewport-The realization principle of "Pip".
Main loop rendering--manual rendering, automatic rendering.
Fifth Chapter OGRE Scene Manager
Scene Map-Organize and manage objects that can be rendered in it.
Scene manager-Scene node, three important actions in scene diagram: Move, rotate, zoom, the target of the operation is the scene node rather than the scene content.
Spatial relationships and 3D transformations--ogre The default way is to move in the parent space, rotate and scale in the ontology space.
Active objects in a scene--render objects and objects that can be rendered. The former is a camera, lighting and so on. The latter is a concrete object.
Special properties of the camera: it can be placed directly into the scene without being attached to the scene node, or it can not depend on the node to perform its own rotational movement. When hooking to a node, note the lock offset axis setting, or the camera maintains a fixed "up" state, which prevents scrolling.
Lighting: Local radiation illumination algorithm. Global emissivity model. What is the concept of "render path"? Point Light, Spotlight light, and directional light.
World map-Contains everything except the "active object". The most heavily generated maps are usually built on a grid model.
Universal Space Segmentation strategy: Ogre's scene segmentation is based on the object granularity rather than the polygon itself. Four-fork tree, eight-fork tree, binary tree partition space method.
Static geometry-usually composed of many moving objects that are no longer active. Modern GPUs are adept at rendering a small number of large objects, not many and small.
Zoom: If you zoom in on the scene node, you find that the solid model suddenly has a strange change. It may be because the normals are scaled together because the light calculation refers to the data of the standard normals, and the scaled normals will have a corresponding effect on the calculation. The workaround is to call the Setnormalisenormals () method after zooming, but this also consumes some execution efficiency.
Sixth Chapter OGRE the material
Ogre material-The material is a term that represents how your object reflects on the light.
The 101 Report of the material--ogre is a real-time rendering engine for hardware acceleration. For hardware, no matter how complex the material, the final rendering to the screen results in only one type, that is the color. Ogre as a typical rendering engine, the color of the object is decomposed into four different light effects: environmental Reflection (Ambient), diffuse reflection (diffuse), emission (emissive), and specular reflection (specular).
The basis of object coloring: The local emissivity model, the factors that influence the color of the object: the properties of the light source itself, the angle of the observer, the color of the object.
Texture mapping: Using a texture map is equivalent to wrapping a 3D object with a 2D image.
Programmable Coloring Technology: The advent of the programmable graphics pipeline (programmable graphics pipeline) is by far the biggest leap in real-time rendering of 3D graphics acceleration technology.
Fixed function pipe: fixed function pipe (fixed-function pipeline), can not be programmed, you tell the hardware object vertex and the image of the pixel correspondence, and then to the hardware to do the following work: The object's vertex information map to the world space, Then combine the texture to rasterize the vertex data, and then draw it to the screen.
Material and programming--before you understand something advanced!
Batch: Ogre the most basic rendering unit is called a render object. For efficiency, minimize the change in rendering status.
Material Cologne: Ogre The material is shared by all references.
The most active two blocks in the ogre material: technology and solutions. Technology: A method of rendering an object. Scenario: A collection of rendering techniques.
LOD: Level of detail
Access: Pass. The channel is the most basic rendering unit. It is also a basic unit that renders objects to indicate their rendering state. Several times a frame of the channel will be rendered several times.
Texture unit: Texture sampling for the corresponding hardware.
Texture compression: A common DDS is a compressed texture format.
Video streaming:
Entities: Entities and sub-entities are the entrances to object rendering features. Models and sub-models are the portals of object structural features (geometry data).
Examples of materials--
GPU Program parameter types: indexed--Location index (Indexed), name positioning (Named). By Settings-Manual, Automatic.
Chapter Seventh Resource Management
material resources, model resources, bone resources, font resources, GPU resources, texture resources.
Resource Management-use resource management policies to process resources.
Resource group-Two ways to manage: By type, by group.
Resource group and world map--By default the entire map is loaded into the "general" resource group via the scene manager.
Resource Location (archive)--archive interface functions
The life cycle of a resource-the various states of a resource and the events that trigger its transformation.
Resource logical management--the resource manager is primarily responsible for managing the loading and unloading of resources.
Resource loading-Different resource types may be loaded in different ways.
Loading of manually created resources--
Background processing Resource Onboarding--The default ogre is not thread safe.
Four states of a resource--not defined--declared--not loaded.
Resource management practices-code authoring for plug-in loading methods.
Initialization of resources-the order in which resources are initialized: Before you can formally add resources, you need to initialize the appropriate resource groups first. Before initializing the resource itself, you need to create the desired render window, because parsing of the resource script may depend on the configuration of the GPU.
Unload resources--Two kinds
Cleanup Resource/Destroy resource Group--
Unload a single resource--
Files in Ogre (Archive)--can be described as: a folder where a series of files are stored together. The value is: Provides an entry for Ogre to access the file.
Custom files are implemented to load the--wad file type by customizing the resource.
Eighth chapter Ogre Render target
Ogre rendering to texture technology.
Concept Overview--
Render window-When using multiple windows, only the first window is set to Ogre's render main window, bound to D3D or OpenGL.
Viewport-
Render to texture-simply put, the concept is to render part or all of the current scene into a texture that can be used, and then use it as a normal texture in the next rendering. (Haha, just think of me when I talk about the double-cache transparent overlay on the radar chart). Applications: such as real-time shading, dynamic reflection, etc.
Performance impact-reading data from the cache is a time-consuming task.
Render target-related types-the base class for render targets: abstract interface "RenderTarget". Three types of render target are derived: window render target, texture render target, multiple render target.
Examples-Different implementations: D3drenderwindow,glxwindow,gtkwindow,sdlwindow and Win32window.
Render-to-texture implementation--create a texture render target--set a camera and viewport to render the scene content to a texture target (DAO 8.4)
Nineth Chapter Animation
Animations are quickly alternately obtained by a static picture.
Control Method-Keyframe, controller.
Ogre supported animation types-Digital animation tracks, node animation tracks, vertex animation tracks.
Animation--skeletal animation, vertex animation, variant animation, pose animation
Hardware animation vs. software Animation-When hardware acceleration, model data in hardware animations cannot be used by the CPU.
Mount Point--
Controller--
Animated instances-try to use "in-place animation" to show the movement of the model.
Tenth Chapter Bulletin Board and particle
Bulletin Board-The bulletin board is a simple quadrilateral that relies on the camera to determine the direction. The front is always facing the camera. Function: As a container (a surface layer), is commonly used to improve the performance of dense scenes.
Bulletin Board Collection--the bulletin board cannot render itself. A bulletin board collection is a manager that manages the same type.
Centralized bulletin board type: point to bulletin Board (default), guide board, Vertical Bulletin board.
Bulletin board Pool-inform the number in advance, ogre in advance, and provide it to you when you need it.
Texture coordinates of the bulletin board--How to assign two texture coordinates.
Bulletin board chain-create effects such as lightning, radio waves, speed lines, and trajectories that need to "follow the previous motion" rather than a separate set of bulletin boards.
Banded trajectories-like linked lists, are added at the head and removed at the tail to achieve a ribbon effect.
Particle systems-a simple way to achieve many effects.
The basis of particle systems-two ways to define them: script (recommended), hard-coded.
The particle system and the 3D scene-the emitter is bound to the node, and the emitted particles are not controlled.
The scope of the particle system-the concept of bounding box.
Update of the particle system--ogre the soft-inspired way. After a particle has been out of view for some time, it will stop updating, which is frozen. Ogre allows it to advance a quantity on the timeline.
Spatial sorting of particle systems--the ability to render particles is sorted according to the distance of the particles to the camera (not default, high power).
Emitter-the shape of the emitter, the angle of launch, the rate of emission, the duration of the launch, the life cycle of the particles, the color of the particles. A custom emitter plug-in can be inserted at run time, which is the simplest extension method for particle systems in ogre.
Effect-affects the particle. Type: linear force, Color attenuator, color modifier, zoom, spinner, color map.
11th Dynamic Shadows
The important role of Shadows: To show a sense of space in 3D space.
Shadow technology-template shadow, texture shadow. Each has two forms: adjustment, addition.
Chapter Knowledge Points Summary "reprint"