Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/displist.cc
| Show First 20 Lines • Show All 1,534 Lines • ▼ Show 20 Lines | else { | ||||
| } | } | ||||
| ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); | ob->runtime.geometry_set_eval = new GeometrySet(std::move(geometry)); | ||||
| } | } | ||||
| boundbox_displist_object(ob); | boundbox_displist_object(ob); | ||||
| } | } | ||||
| void BKE_displist_make_curveTypes_forRender( | |||||
| Depsgraph *depsgraph, const Scene *scene, Object *ob, ListBase *r_dispbase, Mesh **r_final) | |||||
| { | |||||
| if (ob->runtime.curve_cache == nullptr) { | |||||
| ob->runtime.curve_cache = (CurveCache *)MEM_callocN(sizeof(CurveCache), __func__); | |||||
| } | |||||
| if (ob->type == OB_SURF) { | |||||
| evaluate_surface_object(depsgraph, scene, ob, true, r_dispbase, r_final); | |||||
| } | |||||
| else { | |||||
| GeometrySet geometry_set = evaluate_curve_type_object(depsgraph, scene, ob, true, r_dispbase); | |||||
| MeshComponent &mesh_component = geometry_set.get_component_for_write<MeshComponent>(); | |||||
| *r_final = mesh_component.release(); | |||||
| } | |||||
| } | |||||
| void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3]) | void BKE_displist_minmax(const ListBase *dispbase, float min[3], float max[3]) | ||||
| { | { | ||||
| bool doit = false; | bool doit = false; | ||||
| LISTBASE_FOREACH (const DispList *, dl, dispbase) { | LISTBASE_FOREACH (const DispList *, dl, dispbase) { | ||||
| const int tot = (dl->type == DL_INDEX3) ? dl->nr : dl->nr * dl->parts; | const int tot = (dl->type == DL_INDEX3) ? dl->nr : dl->nr * dl->parts; | ||||
| for (const int i : IndexRange(tot)) { | for (const int i : IndexRange(tot)) { | ||||
| minmax_v3v3_v3(min, max, &dl->verts[i * 3]); | minmax_v3v3_v3(min, max, &dl->verts[i * 3]); | ||||
| Show All 39 Lines | |||||