namespace rend overview

Included by: zmodeler.h

Description

rend namespace provides interfaces which relates to rendering aspects in ZModeler. Among interfaces for materials, textures and extensions, some types defintions and enumerations are defined in this namespace too.

Rendering in ZModeler

ZModeler renders via services::IRenderManager by supplying a so-called render blocks to this manager. Render block is defined by struct tRenderBlock which contains rendering data (pointers to buffers), description of data supplied and rendering behaviour flags. Thus, for example, you can supply the same rendering data (vertex and index buffers), but depending on behaviour flags, it can be rendered solid with material, drawn as colored mesh lines only or could be a semitransparent colored tint/highlight.

Types and definitions

enum eColorType Color type definition for material.
enum eTextureGroup Texture group/type definition.
enum eRenderBlockType Render-block elements type.
RENDERBLOCK_* Render block behaviour flags definitions.
struct tRenderBlock Rendering data block for services::IRenderManager which contains raw data to be rendered. You can pass these blocks to render manager in any order. This is low-level API data type: use only if there is no walkarounds.
enum eUVSource UVMapping source for texture layer.
struct tTextureLayerInfo The struct for managing texture layers on material. It contains information about single texture layer, including a pointer to rend::ITexture interface.

Interfaces

IEngine Rendering engine interface. Current implementation resides on Direct3D 9 engine. Primary purpose is to render lines, polygons and manage materials and textures, even thought materials and textures service are implemented as independant services.
ILightsManager Interface of light manager. Ligts are restricted resources and have to be maintained properly.
IMaterial Material interface. Materials in ZModeler are actually tree-structured and can inherit or supress some parameters from parent materials. Materials are refered by zero-based index with zero index of a so-called "Default Material".
IRenderTechnique Rendering technique is applied on nodes level and performs rendering of the node. Only one technique can be applied to a node, but it's behaviour can be customized and, optionally, extended with several IRenderExtension interfaces. Render technique is held by scene::IVisualizeable interface which is transparently available in each visual node in scene.
IRenderExtension An extension to IRenderTechnique. Extension can be applied on mesh and/or polygon level and affect rendering of the mesh. Instances of these interfaces are controlled and maintained by IRenderTechnique interface.
ITexture Interface describes singe texture. Textures of different types are loaded with according ITextureLoader which are maintained and managed by services::ITexturesService. Textures could belong into some container (e.g. textures pack name) and stores it's original path and filename. This particullary allows to reload texture if it was externally modified. Each texture contains a pointer to a so-called base texture which is in current implementation an instance of IDirect3DTexture9 interface.
ILODTexture Extension of ITexture interface which adds mip-maps on textures. Currently not used.
ITextureContainerLoader Implements methods to load textures from containers (texture packs or archives). Containers can use standard texture loaders if required.
ITextureLoader Interface for loading textures of some format. This is usually a class that reads some texture format from a stream and creates rendering-compatible texture.
See Also:
References overview
services::IRenderManager interface
services::IMaterialsService interface
services::ITexturesService interface