first commit
This commit is contained in:
76
include/engine/motion/motion_channel.h
Normal file
76
include/engine/motion/motion_channel.h
Normal file
@ -0,0 +1,76 @@
|
||||
/* -----------------------------------------------------------------------------
|
||||
GSFramework
|
||||
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
#ifndef __MOTION_CHANNEL__
|
||||
#define __MOTION_CHANNEL__
|
||||
|
||||
|
||||
#include "geometry/curve.h"
|
||||
|
||||
|
||||
namespace GS {
|
||||
namespace Core {
|
||||
|
||||
/*!
|
||||
@short Motion channel object.
|
||||
|
||||
This class extends the curve class holding together a set of key frames and
|
||||
able to evaluate the underlying curve object at a specific position.
|
||||
A channel should be used on a specific value declared by the enumeration
|
||||
Type.
|
||||
|
||||
@author Emmanuel Julien (ejulien@gsworks.fr)
|
||||
*/
|
||||
struct MotionChannel : public Curve
|
||||
{
|
||||
enum Type
|
||||
{
|
||||
NoType = 0,
|
||||
Undf = 0,
|
||||
|
||||
// Transformation block.
|
||||
XPos, YPos, ZPos,
|
||||
XRot, YRot, ZRot,
|
||||
XScl, YScl, ZScl,
|
||||
XPiv, YPiv, ZPiv,
|
||||
//
|
||||
|
||||
RDif, GDif, BDif,
|
||||
RSpc, GSpc, BSpc,
|
||||
|
||||
DiffuseIntensity, SpecularIntensity,
|
||||
|
||||
ConeAngle, EdgeAngle,
|
||||
|
||||
Alpha,
|
||||
|
||||
ZoomFactor,
|
||||
|
||||
Range,
|
||||
|
||||
FogStart, FogEnd,
|
||||
RFog, GFog, BFog,
|
||||
|
||||
Last
|
||||
};
|
||||
|
||||
Type type;
|
||||
|
||||
/// Return the channel memory footprint.
|
||||
size_t MemoryFootPrint() const { return Curve::MemoryFootPrint() + sizeof(MotionChannel); }
|
||||
|
||||
bool FromMetaTag(NML::Tag &);
|
||||
NML::Tag *AsMetaTag() const;
|
||||
|
||||
MotionChannel();
|
||||
~MotionChannel();
|
||||
};
|
||||
|
||||
} // Core
|
||||
} // GS
|
||||
|
||||
|
||||
#endif // __MOTION_CHANNEL__
|
||||
Reference in New Issue
Block a user