44 call_buffers_.field_force_buf.
clear();
45 call_buffers_.field_wind_buf.
clear();
46 call_buffers_.field_vortex_buf.
clear();
47 call_buffers_.field_curve_buf.
clear();
48 call_buffers_.field_sphere_limit_buf.
clear();
49 call_buffers_.field_tube_limit_buf.
clear();
50 call_buffers_.field_cone_limit_buf.
clear();
65 float4x4 &matrix = data.object_to_world_;
66 float &size_x = matrix[0][3];
67 float &size_y = matrix[1][3];
68 float &size_z = matrix[2][3];
74 call_buffers_.field_force_buf.
append(data, select_id);
78 call_buffers_.field_wind_buf.
append(data, select_id);
81 size_y = (pd->
f_strength < 0.0f) ? -size_y : size_y;
82 call_buffers_.field_vortex_buf.
append(data, select_id);
89 matrix.location() = ob->object_to_world().location();
91 call_buffers_.field_curve_buf.
append(data, select_id);
94 matrix.location() = ob->object_to_world().location();
96 call_buffers_.field_sphere_limit_buf.
append(data, select_id);
98 matrix.location() = ob->object_to_world().location();
108 call_buffers_.field_tube_limit_buf.
append(data, select_id);
114 call_buffers_.field_tube_limit_buf.
append(data, select_id);
121 size_x = distance *
sinf(radius);
122 size_z = distance *
cosf(radius);
124 call_buffers_.field_cone_limit_buf.
append(data, select_id);
129 size_x = distance *
sinf(radius);
130 size_z = distance *
cosf(radius);
132 call_buffers_.field_cone_limit_buf.
append(data, select_id);
137 size_x = size_y = size_z = pd->
maxdist;
138 call_buffers_.field_sphere_limit_buf.
append(data, select_id);
141 size_x = size_y = size_z = pd->
mindist;
142 call_buffers_.field_sphere_limit_buf.
append(data, select_id);
152 state.clipping_plane_count);
168 manager.
submit(ps_, view);
bool BKE_where_on_path(const struct Object *ob, float ctime, float r_vec[4], float r_dir[3], float r_quat[4], float *r_radius, float *r_weight)
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
void submit(PassSimple &pass, View &view)
void state_set(DRWState state, int clip_plane_count=0)
void bind_ubo(const char *name, GPUUniformBuf *buffer)
void shader_set(GPUShader *shader)
void draw(Framebuffer &framebuffer, Manager &manager, View &view)
ForceFields(const SelectionType selection_type)
void end_sync(Resources &res, ShapeCache &shapes, const State &state)
void object_sync(const ObjectRef &ob_ref, Resources &res, const State &state)
BatchPtr field_tube_limit
BatchPtr field_sphere_limit
BatchPtr field_cone_limit
@ DRW_STATE_DEPTH_LESS_EQUAL
MatBase< T, NumCol, NumRow > translate(const MatBase< T, NumCol, NumRow > &mat, const VectorT &translation)
ObjectRuntimeHandle * runtime
GPUUniformBuf * globals_buf
float4 object_background_blend_color(const ObjectRef &ob_ref, const State &state) const
void end_sync(PassSimple::Sub &pass, gpu::Batch *shape)
void append(const InstanceDataT &data, select::ID select_id)
void select_bind(PassSimple &pass)
const ID select_id(const ObjectRef &ob_ref, uint sub_object_id=0)