29 #ifndef VISUALINSTANCEPARTICLES_H 30 #define VISUALINSTANCEPARTICLES_H 32 #include "scene/3d/visual_instance.h" 33 #include "scene/resources/material.h" 34 #include "scene/main/timer.h" 45 VAR_LIFETIME=VS::PARTICLE_LIFETIME,
46 VAR_SPREAD=VS::PARTICLE_SPREAD,
47 VAR_GRAVITY=VS::PARTICLE_GRAVITY,
48 VAR_LINEAR_VELOCITY=VS::PARTICLE_LINEAR_VELOCITY,
49 VAR_ANGULAR_VELOCITY=VS::PARTICLE_ANGULAR_VELOCITY,
50 VAR_LINEAR_ACCELERATION=VS::PARTICLE_LINEAR_ACCELERATION,
51 VAR_DRAG=VS::PARTICLE_RADIAL_ACCELERATION,
52 VAR_TANGENTIAL_ACCELERATION=VS::PARTICLE_TANGENTIAL_ACCELERATION,
53 VAR_DAMPING=VS::PARTICLE_DAMPING,
54 VAR_INITIAL_SIZE=VS::PARTICLE_INITIAL_SIZE,
55 VAR_FINAL_SIZE=VS::PARTICLE_FINAL_SIZE,
56 VAR_INITIAL_ANGLE=VS::PARTICLE_INITIAL_ANGLE,
57 VAR_HEIGHT=VS::PARTICLE_HEIGHT,
58 VAR_HEIGHT_SPEED_SCALE=VS::PARTICLE_HEIGHT_SPEED_SCALE,
59 VAR_MAX=VS::PARTICLE_VAR_MAX
75 float var_random[VAR_MAX];
76 bool height_from_velocity;
78 bool local_coordinates;
86 virtual bool _can_gizmo_scale()
const;
87 virtual RES _get_gizmo_geometry()
const;
89 int color_phase_count;
91 ColorPhase color_phase[4];
100 static void _bind_methods();
105 AABB get_aabb()
const;
108 void set_amount(
int p_amount);
109 int get_amount()
const;
111 void set_emitting(
bool p_emitting);
112 bool is_emitting()
const;
114 void set_visibility_aabb(
const AABB& p_aabb);
115 AABB get_visibility_aabb()
const;
117 void set_emission_half_extents(
const Vector3& p_half_extents);
118 Vector3 get_emission_half_extents()
const;
120 void set_emission_base_velocity(
const Vector3& p_base_velocity);
121 Vector3 get_emission_base_velocity()
const;
126 void set_gravity_normal(
const Vector3& p_normal);
127 Vector3 get_gravity_normal()
const;
129 void set_variable(Variable p_variable,
float p_value);
130 float get_variable(Variable p_variable)
const;
132 void set_randomness(Variable p_variable,
float p_randomness);
133 float get_randomness(Variable p_variable)
const;
135 void set_color_phases(
int p_phases);
136 int get_color_phases()
const;
138 void set_color_phase_pos(
int p_phase,
float p_pos);
139 float get_color_phase_pos(
int p_phase)
const;
141 void set_color_phase_color(
int p_phase,
const Color& p_color);
142 Color get_color_phase_color(
int p_phase)
const;
144 void set_height_from_velocity(
bool p_enable);
145 bool has_height_from_velocity()
const;
150 void set_emit_timeout(
float p_timeout);
151 float get_emit_timeout()
const;
153 void set_use_local_coordinates(
bool p_use);
154 bool is_using_local_coordinates()
const;
156 void start_emitting(
float p_time);
164 VARIANT_ENUM_CAST( Particles::Variable );
Definition: particles.h:41
Definition: visual_instance.h:84