# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NL3D::CMotionBlur Class Reference

This class help perfoming motion blur on a portion of the screen. More...

#include <motion_blur.h>

List of all members.

Public Methods

 CMotionBlur ()
void startMotionBlur (uint x, uint y, uint width, uint height)
 Must be called before performing motion blur on a image sequence. More...

void releaseMotionBlur ()
 release the resources used by motion blur. More...

void performMotionBlur (IDriver *driver, float motionBlurAmount)
 perform motion blur, using the given driver This can only have been called between a startMotionBlur / releaseMotionBlur pair. More...


Protected Attributes

NLMISC::CSmartPtr< ITexture_Tex
uint _X
uint _Y
uint _W
uint _H


Detailed Description

This class help perfoming motion blur on a portion of the screen.

Author:
Nicolas Vizerie , Nevrax France
Date:
2001

Definition at line 45 of file motion_blur.h.


Constructor & Destructor Documentation

NL3D::CMotionBlur::CMotionBlur  
 

Definition at line 39 of file motion_blur.cpp.


Member Function Documentation

void NL3D::CMotionBlur::performMotionBlur IDriver   driver,
float    motionBlurAmount
 

perform motion blur, using the given driver This can only have been called between a startMotionBlur / releaseMotionBlur pair.

It must be called after the scene has been drawn of course. WARNING : this change the projection matrix and the frustum in the driver.

Parameters:
motionBlurAmount  ranges from 0.f to 1.f. Blend using the following : motionBlurAmount * previous frame + (1 - motionBlurAmount) * current Frame buffer state

Definition at line 62 of file motion_blur.cpp.

References _H, _Tex, _W, _X, _Y, height, nlassert, NLMISC::raiseToNextPowerOf2, and width.

void NL3D::CMotionBlur::releaseMotionBlur  
 

release the resources used by motion blur.

Definition at line 56 of file motion_blur.cpp.

References _H, _Tex, _W, _X, and _Y.

void NL3D::CMotionBlur::startMotionBlur uint    x,
uint    y,
uint    width,
uint    height
 

Must be called before performing motion blur on a image sequence.

Motion blur is performed on a rectangular area. 2 calls -> nlassert. Once motion blur must be stopped, you must call releaseMotionBlur.

Parameters:
x  the x position of the top-left coener of the rectangle on which motion blur apply
y  the y position of the top-left coener of the rectangle on which motion blur apply
width  the width of the rectangle on which motion blur apply
height  the height of the rectangle on which motion blur apply

Definition at line 45 of file motion_blur.cpp.

References _H, _Tex, _W, _X, _Y, height, nlassert, width, x, and y.


Member Data Documentation

uint NL3D::CMotionBlur::_H [protected]
 

Definition at line 73 of file motion_blur.h.

Referenced by performMotionBlur, releaseMotionBlur, and startMotionBlur.

NLMISC::CSmartPtr<ITexture> NL3D::CMotionBlur::_Tex [protected]
 

Definition at line 72 of file motion_blur.h.

Referenced by performMotionBlur, releaseMotionBlur, and startMotionBlur.

uint NL3D::CMotionBlur::_W [protected]
 

Definition at line 73 of file motion_blur.h.

Referenced by performMotionBlur, releaseMotionBlur, and startMotionBlur.

uint NL3D::CMotionBlur::_X [protected]
 

Definition at line 73 of file motion_blur.h.

Referenced by performMotionBlur, releaseMotionBlur, and startMotionBlur.

uint NL3D::CMotionBlur::_Y [protected]
 

Definition at line 73 of file motion_blur.h.

Referenced by performMotionBlur, releaseMotionBlur, and startMotionBlur.


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