36 : relations_buf_(selection_type,
"relations_buf_"),
37 points_buf_(selection_type,
"points_buf_")
48 relations_buf_.clear();
61 if (is_from_dupli_or_set(ob_ref)) {
65 Object *ob = ob_ref.object;
66 const float4 &relation_color = res.theme.colors.wire;
68 const float4 &constraint_color = res.theme.colors.grid_axis_z;
73 relations_buf_.append(ob->object_to_world().location(), parent_pos, relation_color);
82 relations_buf_.append(hmd->
object->object_to_world().location(), center, relation_color);
84 points_buf_.append(center, relation_color);
95 relations_buf_.append(hmd->
object->object_to_world().location(), center, relation_color);
97 points_buf_.append(center, relation_color);
106 relations_buf_.append(rbc_ob1->object_to_world().location(),
107 ob->object_to_world().location(),
111 relations_buf_.append(rbc_ob2->object_to_world().location(),
112 ob->object_to_world().location(),
141 relations_buf_.append(camob->object_to_world().location(),
142 ob->object_to_world().location(),
148 ListBaseT<bConstraintTarget> targets = {
nullptr,
nullptr};
150 if ((constraint->ui_expand_flag & (1 << 0)) &&
158 bool has_target =
false;
171 target_pos = target->matrix[3];
178 relations_buf_.append(
179 target_pos, ob->object_to_world().location(), constraint_color);
202 res.select_bind(ps_);
207 state.clipping_plane_count);
208 sub_pass.
shader_set(res.shaders->extra_wire.get());
209 relations_buf_.end_sync(sub_pass);
215 state.clipping_plane_count);
216 sub_pass.
shader_set(res.shaders->extra_loose_points.get());
217 points_buf_.end_sync(sub_pass);
228 manager.submit(ps_, view);
Types and defines for representing Rigid Body entities.
void shader_set(gpu::Shader *shader)
void state_set(DRWState state, int clip_plane_count=0)
detail::PassBase< command::DrawCommandBuf > Sub
void begin_sync(Resources &res, const State &state) final
void draw_line(Framebuffer &framebuffer, Manager &manager, View &view) final
void object_sync(Manager &, const ObjectRef &ob_ref, Resources &res, const State &state) final
Relations(SelectionType selection_type)
void end_sync(Resources &res, const State &state) final
#define DRW_CLIPPING_UBO_SLOT
#define OVERLAY_GLOBALS_SLOT
select::SelectionType SelectionType
detail::Pass< command::DrawCommandBuf > PassSimple
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
@ CONSTRAINT_TAR_CUSTOM_SPACE
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
@ eGpencilModifierType_Hook
void BKE_constraint_targets_flush(struct bConstraint *con, ListBaseT< bConstraintTarget > *targets, bool no_copy)
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
struct bConstraintOb * BKE_constraints_make_evalob(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, void *subdata, short datatype)
int DRW_object_visibility_in_active_context(const Object *ob)
const bConstraintTypeInfo * BKE_constraint_typeinfo_get(struct bConstraint *con)
void BKE_constraint_custom_object_space_init(struct bConstraintOb *cob, struct bConstraint *con)
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
BMesh const char void * data
int BKE_constraint_targets_get(struct bConstraint *con, ListBaseT< bConstraintTarget > *r_targets)
@ DRW_STATE_DEPTH_LESS_EQUAL
@ CONSTRAINT_OBTYPE_OBJECT
float DEG_get_ctime(const Depsgraph *graph)
ListBaseT< ModifierData > modifiers
bke::ObjectRuntime * runtime
ListBaseT< GpencilModifierData > greasepencil_modifiers
ListBaseT< bConstraint > constraints
struct RigidBodyCon * rigidbody_constraint
float space_obj_world_matrix[4][4]
bool(*) get_target_matrix(struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime)
float3 parent_display_origin