source: trunk/src/emitter.cpp @ 288

Last change on this file since 288 was 288, checked in by sam, 11 years ago

Skeleton for the particle emitter class.

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11#if defined HAVE_CONFIG_H
12#   include "config.h"
13#endif
14
15#include <cstdio>
16#include <cmath>
17
18#include "core.h"
19
20/*
21 * Emitter implementation class
22 */
23
24class EmitterData
25{
26    friend class Emitter;
27
28private:
29    int tiler;
30    Float3 gravity;
31    int particles[100];
32    Float3 positions[100];
33    Float3 velocities[100];
34    int nparticles;
35};
36
37/*
38 * Public Emitter class
39 */
40
41Emitter::Emitter(int tiler, Float3 gravity)
42  : data(new EmitterData())
43{
44    data->tiler = tiler;
45    data->gravity = gravity;
46    data->nparticles = 0;
47}
48
49void Emitter::TickGame(float deltams)
50{
51    Entity::TickGame(deltams);
52}
53
54void Emitter::TickDraw(float deltams)
55{
56    Entity::TickDraw(deltams);
57}
58
59Emitter::~Emitter()
60{
61    delete data;
62}
63
Note: See TracBrowser for help on using the repository browser.