Blender V4.3
particles.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifndef __PARTICLES_H__
6#define __PARTICLES_H__
7
8#include "util/array.h"
9#include "util/types.h"
10
11#include "graph/node.h"
12
14
15class Device;
16class DeviceScene;
17class Progress;
18class Scene;
19
20/* Particle System */
21
22struct Particle {
23 int index;
24 float age;
25 float lifetime;
27 float4 rotation;
28 float size;
31};
32
33class ParticleSystem : public Node {
34 public:
36
39
40 void tag_update(Scene *scene);
41
43};
44
45/* ParticleSystem Manager */
46
48 bool need_update_;
49
50 public:
53
55 DeviceScene *dscene,
56 Scene *scene,
57 Progress &progress);
58 void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress);
59 void device_free(Device *device, DeviceScene *dscene);
60
61 void tag_update(Scene *scene);
62
63 bool need_update() const;
64};
65
67
68#endif /* __PARTICLES_H__ */
void device_free(Device *device, DeviceScene *dscene)
void tag_update(Scene *scene)
void device_update(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
void device_update_particles(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)
#define CCL_NAMESPACE_END
#define NODE_DECLARE
Definition node_type.h:142
array< Particle > particles
Definition particles.h:42
NODE_DECLARE ParticleSystem()
void tag_update(Scene *scene)
float age
Definition particles.h:24
float3 location
Definition particles.h:26
float size
Definition particles.h:28
float4 rotation
Definition particles.h:27
float3 velocity
Definition particles.h:29
float3 angular_velocity
Definition particles.h:30
int index
Definition particles.h:23