NL3D::CTrackKeyFramerLinear< CKeyRGBA, NLMISC::CRGBA > Class Reference

#include <track_keyframer.h>


Detailed Description

ITrack implementation for linear CRGBA keyframer.

Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2001

Definition at line 611 of file track_keyframer.h.

Public Member Functions

virtual void evalKey (const CKeyRGBA *previous, const CKeyRGBA *next, TAnimationTime datePrevious, TAnimationTime dateNext, TAnimationTime date)
 From ITrackKeyFramer.

virtual const IAnimatedValuegetValue () const
 From ITrack.


Private Attributes

CAnimatedValueBlendable< NLMISC::CRGBA_Value


Member Function Documentation

virtual void NL3D::CTrackKeyFramerLinear< CKeyRGBA, NLMISC::CRGBA >::evalKey const CKeyRGBA previous,
const CKeyRGBA next,
TAnimationTime  datePrevious,
TAnimationTime  dateNext,
TAnimationTime  date
[inline, virtual]
 

From ITrackKeyFramer.

Definition at line 622 of file track_keyframer.h.

References NLMISC::clamp(), NL3D::CKey< T >::OODeltaTime, NL3D::TAnimationTime, uint, and NL3D::CKey< T >::Value.

00625         {
00626                 if(previous && next)
00627                 {
00628                         // lerp from previous to cur.
00629                         date-= datePrevious;
00630                         date*= previous->OODeltaTime;
00631                         NLMISC::clamp(date, 0,1);
00632                         
00633                         // blend.
00634                         _Value.Value.blendFromui(previous->Value, next->Value, (uint)(date*256));
00635                 }
00636                 else
00637                 {
00638                         if (previous)
00639                                 _Value.Value= previous->Value;
00640                         else
00641                                 if (next)
00642                                         _Value.Value= next->Value;
00643                 }
00644         }

virtual const IAnimatedValue& NL3D::CTrackKeyFramerLinear< CKeyRGBA, NLMISC::CRGBA >::getValue  )  const [inline, virtual]
 

From ITrack.

Definition at line 616 of file track_keyframer.h.

00617         {
00618                 return _Value;
00619         }


Field Documentation

CAnimatedValueBlendable<NLMISC::CRGBA> NL3D::CTrackKeyFramerLinear< CKeyRGBA, NLMISC::CRGBA >::_Value [private]
 

Definition at line 647 of file track_keyframer.h.


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 08:10:47 2004 for NeL by doxygen 1.3.6