- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

# MapExtractor Class Reference

Search for all occurrences

## Detailed Description

This is the cental modul for map extraction, this node controls the map extraction process by communicating with the different modules.

The map extraction is done in the following steps:

- The map extraction node calls the ProcessSurface function of the layout module, and passes the address of the current target mesh to it.
- The layout module collects surface points on the target mesh, fills a TargetLocation structure for each of those points, and calls the map extractor modules ProcessSurfacePoint function for each of them separately.
- The map extraction module then uses the locator module to find a point on the source meshes which belongs to the specified target point by calling the LocateSurfacePoint function. The locator module fills a SurfacePoint structure with the requested information.
- The map extraction module uses all the enabled component modules to calculate data for the given target-source surface point pair. It passes both the target and the source point location as a parameter to the ProcessSurfacePoint function of the components. The returned data is then passed to the utilizer modules, which does something with the data. In most cases the utilizer modules need additional information about the current target-source surface point pair, which is specific to the type of the layout module. The TargetLocation structure has some generic data fields where the layout module can put additional information, which can be later used by the utilized module to know how to use the result (for example in case of traditional map extraction, the x and y coordinates of the current point is stored in that area).

Note that the map extractor does not process the locations immediately, it collects the target locations specified by the layout in a temporary array, and sometimes it flushes that array by processing all the locations. This processing is done in two steps, first the map extraction node uses the locator module to find the corresponting surface points on the source surfaces, and then it processes these target-source pairs by calling the correspontind functions in the components and utilizers. This way the components can do preprocession on the target-source location collection if that makes the work easier for them (for example the AO baking component uses the GPU to calculate the needed data, so it cannot process the target-source location pairs one by one). The layout node can ask the map extractor to flush these buffers by calling the function Flush.

A full map extraction process consist of the following modules:

- Main map extractor node: it controls the whole extraction process. Any plugin can create a map extraction node, set different parameters for it, and then call the Execute function which will perform the operation.
- Layout module: this module is used to collect points on the target surface. The map extraction will calculate data for each of these points on the target surface. For example in regular texture map extraction the layout node collects surface locations on the target meshes which are belongs to a texel on the texture.
- Locator module: this module is used by the map extractor to find the surface point on the source mesh which belongs to a given surface point on the target mesh (see class Locator). For example in case of arbitrary meshes, the locator object usually fires rays at the target surface location, and calculates intersection between the ray and the source meshes.
- Component modules: these modules are used to calculate different kind of data for target-source surface point pairs. The data is represented as a color. This data is then passed to the utilized modules. For example the displacement component simly calculates the distance between the target and source locations in the target normal vector direction.
- Utilizer modules: each component has a correspoding utilizer module attached. The utilized module takes the data which comes from the component and does something with it, for example stores the data in a file. The utilizers are usually comunicating with the layout module to obtain information about the current target-source surface point pair. For this reason, the type of the layout module is controlled by the utilizers. All the components must use the same type of utilizer. For example in traditional texture map extraction the utilizers are writing the data which comes from the components into image files.

Definition at line 63 of file MapExtractorInterface.h.

`#include <MapExtractorInterface.h>`

Inheritance diagram for MapExtractor:
[legend]

List of all members.

The documentation for this class was generated from the following file:

- MapExtractor/MapExtractorInterface.h

MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor
MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor MapExtractor