00001 00002 // Copyright (C) 2004-2007 by The Allacrost Project 00003 // All Rights Reserved 00004 // 00005 // This code is licensed under the GNU GPL version 2. It is free software 00006 // and you may modify it and/or redistribute it under the terms of this license. 00007 // See http://www.gnu.org/copyleft/gpl.html for details. 00009 00010 /*!**************************************************************************** 00011 * \file particle_keyframe.h 00012 * \author Raj Sharma, roos@allacrost.org 00013 * \brief Header file for particle keyframes 00014 * 00015 * Particle properties are keyframed- for example, you can vary the size of a 00016 * particle along its lifetime, to create some interesting effects. The 00017 * ParticleKeyframe class contains all of the keyframed properties for a given 00018 * snapshot in time (time ranges from 0.0 to 1.0), and these keyframes are stored 00019 * in the ParticleSystemDef class. 00020 *****************************************************************************/ 00021 00022 #ifndef __PARTICLE_KEYFRAME_HEADER__ 00023 #define __PARTICLE_KEYFRAME_HEADER__ 00024 00025 #include "defs.h" 00026 #include "utils.h" 00027 #include "color.h" 00028 00029 namespace hoa_video 00030 { 00031 00032 namespace private_video 00033 { 00034 00035 00036 /*!*************************************************************************** 00037 * \brief Keyframes, consist of a _time, plus various properties. These are 00038 * used to specify how the properties of a particle vary over time. 00039 * For example, in most systems, we'll want particles to fade out over 00040 * their lifetime, so this could be done by creating 2 keyframes, where 00041 * the alpha component of the 2nd keyframe's _color is zero. 00042 *****************************************************************************/ 00043 00044 class ParticleKeyframe 00045 { 00046 public: 00047 00048 ParticleKeyframe() 00049 : size_x(0.0f), 00050 size_y(0.0f), 00051 color(0.0f, 0.0f, 0.0f, 0.0f), 00052 rotation_speed(0.0f), 00053 size_variation_x(0.0f), 00054 size_variation_y(0.0f), 00055 rotation_speed_variation(0.0f), 00056 color_variation(0.0f, 0.0f, 0.0f, 0.0f) 00057 { 00058 } 00059 00061 float size_x; 00062 float size_y; 00063 00065 Color color; 00066 00068 float rotation_speed; 00069 00071 float size_variation_x; 00072 float size_variation_y; 00073 00075 float rotation_speed_variation; 00076 00079 Color color_variation; 00080 00081 float time; 00082 }; 00083 00084 00085 } // namespace private_video 00086 } // namespace hoa_video 00087 00088 #endif
1.5.1