OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011, Blender Foundation. | 2 * Copyright 2011, Blender Foundation. |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 class Device; | 29 class Device; |
30 class DeviceScene; | 30 class DeviceScene; |
31 class Mesh; | 31 class Mesh; |
32 class Progress; | 32 class Progress; |
33 class Scene; | 33 class Scene; |
34 struct Transform; | 34 struct Transform; |
35 | 35 |
36 /* Object */ | 36 /* Object */ |
37 | 37 |
| 38 struct Particle { |
| 39 float age; |
| 40 float lifetime; |
| 41 }; |
| 42 |
38 class Object { | 43 class Object { |
39 public: | 44 public: |
40 Mesh *mesh; | 45 Mesh *mesh; |
41 Transform tfm; | 46 Transform tfm; |
42 BoundBox bounds; | 47 BoundBox bounds; |
43 ustring name; | 48 ustring name; |
44 uint random_id; | 49 uint random_id; |
45 int pass_id; | 50 int pass_id; |
46 vector<ParamValue> attributes; | 51 vector<ParamValue> attributes; |
47 uint visibility; | 52 uint visibility; |
48 MotionTransform motion; | 53 MotionTransform motion; |
49 bool use_motion; | 54 bool use_motion; |
50 bool use_holdout; | 55 bool use_holdout; |
51 | 56 |
| 57 int particle_id; |
| 58 vector<Particle> particles; |
| 59 |
52 Object(); | 60 Object(); |
53 ~Object(); | 61 ~Object(); |
54 | 62 |
55 void tag_update(Scene *scene); | 63 void tag_update(Scene *scene); |
56 | 64 |
57 void compute_bounds(bool motion_blur); | 65 void compute_bounds(bool motion_blur); |
58 void apply_transform(); | 66 void apply_transform(); |
59 }; | 67 }; |
60 | 68 |
61 /* Object Manager */ | 69 /* Object Manager */ |
62 | 70 |
63 class ObjectManager { | 71 class ObjectManager { |
64 public: | 72 public: |
65 bool need_update; | 73 bool need_update; |
66 | 74 |
67 ObjectManager(); | 75 ObjectManager(); |
68 ~ObjectManager(); | 76 ~ObjectManager(); |
69 | 77 |
70 void device_update(Device *device, DeviceScene *dscene, Scene *scene, Pr
ogress& progress); | 78 void device_update(Device *device, DeviceScene *dscene, Scene *scene, Pr
ogress& progress); |
71 void device_update_transforms(Device *device, DeviceScene *dscene, Scene
*scene, Progress& progress); | 79 void device_update_transforms(Device *device, DeviceScene *dscene, Scene
*scene, Progress& progress); |
| 80 void device_update_particles(Device *device, DeviceScene *dscene, Scene
*scene, Progress& progress); |
72 void device_free(Device *device, DeviceScene *dscene); | 81 void device_free(Device *device, DeviceScene *dscene); |
73 | 82 |
74 void tag_update(Scene *scene); | 83 void tag_update(Scene *scene); |
75 | 84 |
76 void apply_static_transforms(Scene *scene, Progress& progress); | 85 void apply_static_transforms(Scene *scene, Progress& progress); |
77 }; | 86 }; |
78 | 87 |
79 CCL_NAMESPACE_END | 88 CCL_NAMESPACE_END |
80 | 89 |
81 #endif /* __OBJECT_H__ */ | 90 #endif /* __OBJECT_H__ */ |
82 | 91 |
OLD | NEW |