Blender V5.3
obj_import_nurbs.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BKE_curve.hh"
12
13#include "BLI_utility_mixins.hh"
14
15#include "DNA_curve_types.h"
16
17#include "obj_import_objects.hh"
18
19namespace blender {
20
21struct OBJImportParams;
22namespace bke {
23class CurvesGeometry;
24};
25
26namespace io::obj {
27
32 private:
33 const Geometry &curve_geometry_;
34 const GlobalVertices &global_vertices_;
35
36 public:
37 CurveFromGeometry(const Geometry &geometry, const GlobalVertices &global_vertices)
38 : curve_geometry_(geometry), global_vertices_(global_vertices)
39 {
40 }
41
42 Curves *create_curve(const OBJImportParams &import_params);
43
44 Object *create_curve_object(Main *bmain, const OBJImportParams &import_params);
45
46 private:
50 void create_nurbs(Curve *curve, const OBJImportParams &import_params);
51 void create_nurbs(bke::CurvesGeometry &curve, const OBJImportParams &import_params);
52
53 eNurbKnotFlag detect_knot_mode(const OBJImportParams &import_params,
54 int8_t degree,
55 Span<int> indices,
56 Span<float> knots,
57 Span<int> multiplicity);
58};
59} // namespace io::obj
60} // namespace blender
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
Curves * create_curve(const OBJImportParams &import_params)
CurveFromGeometry(const Geometry &geometry, const GlobalVertices &global_vertices)
Object * create_curve_object(Main *bmain, const OBJImportParams &import_params)
BMesh Iterators.
signed char int8_t
Definition BKE_text.h:76