scene_particle_emitter.h
1 /*
2 ** ClanLib SDK
3 ** Copyright (c) 1997-2013 The ClanLib Team
4 **
5 ** This software is provided 'as-is', without any express or implied
6 ** warranty. In no event will the authors be held liable for any damages
7 ** arising from the use of this software.
8 **
9 ** Permission is granted to anyone to use this software for any purpose,
10 ** including commercial applications, and to alter it and redistribute it
11 ** freely, subject to the following restrictions:
12 **
13 ** 1. The origin of this software must not be misrepresented; you must not
14 ** claim that you wrote the original software. If you use this software
15 ** in a product, an acknowledgment in the product documentation would be
16 ** appreciated but is not required.
17 ** 2. Altered source versions must be plainly marked as such, and must not be
18 ** misrepresented as being the original software.
19 ** 3. This notice may not be removed or altered from any source distribution.
20 **
21 ** Note: Some of the libraries ClanLib may link to may have additional
22 ** requirements or restrictions.
23 **
24 ** File Author(s):
25 **
26 ** Magnus Norddahl
27 */
28 
29 
30 #pragma once
31 
32 #include "api_scene3d.h"
33 #include <memory>
34 
35 namespace clan
36 {
39 
40 class Scene;
41 class SceneParticleEmitter_Impl;
42 class OctTreeObject;
43 class AxisAlignedBoundingBox;
44 class ParticleEmitterPassData;
45 
46 class CL_API_SCENE SceneParticleEmitter
47 {
48 public:
51  bool is_null() const { return !impl; }
52 
53  enum Type
54  {
56  type_spot
57  };
58 
59  Type get_type() const;
60  Vec3f get_position() const;
61  Quaternionf get_orientation() const;
62  float get_particles_per_second() const;
63  float get_falloff() const;
64  float get_life_span() const;
65  float get_start_size() const;
66  float get_end_size() const;
67  float get_speed() const;
68  Vec3f get_acceleration() const;
69  std::string get_particle_texture() const;
70  std::string get_gradient_texture() const;
71 
72  void set_type(Type type);
73  void set_position(const Vec3f &position);
74  void set_orientation(const Quaternionf &orientation);
75  void set_particles_per_second(float pps);
76  void set_falloff(float falloff);
77  void set_life_span(float life_span);
78  void set_start_size(float size);
79  void set_end_size(float size);
80  void set_speed(float speed);
81  void set_acceleration(const Vec3f &acceleration);
82  void set_particle_texture(const std::string &texture);
83  void set_gradient_texture(const std::string &texture);
84 
85 private:
86  std::shared_ptr<SceneParticleEmitter_Impl> impl;
87 };
88 
89 }
90 
Type
Definition: scene_particle_emitter.h:53
Definition: scene_particle_emitter.h:55
Definition: scene.h:50
Definition: scene_particle_emitter.h:46
bool is_null() const
Definition: scene_particle_emitter.h:51
Quaternion - Float.
Definition: quaternion.h:188