Blender V5.0
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
19struct OBJImportParams;
20
21namespace blender::io::obj {
22
27 private:
28 const Geometry &curve_geometry_;
29 const GlobalVertices &global_vertices_;
30
31 public:
32 CurveFromGeometry(const Geometry &geometry, const GlobalVertices &global_vertices)
33 : curve_geometry_(geometry), global_vertices_(global_vertices)
34 {
35 }
36
37 Curves *create_curve(const OBJImportParams &import_params);
38
39 Object *create_curve_object(Main *bmain, const OBJImportParams &import_params);
40
41 private:
45 void create_nurbs(Curve *curve, const OBJImportParams &import_params);
46 void create_nurbs(bke::CurvesGeometry &curve, const OBJImportParams &import_params);
47
48 short detect_knot_mode(const OBJImportParams &import_params,
49 int8_t degree,
51 Span<float> knots,
52 Span<int> multiplicity);
53};
54} // namespace blender::io::obj
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
CurveFromGeometry(const Geometry &geometry, const GlobalVertices &global_vertices)
Object * create_curve_object(Main *bmain, const OBJImportParams &import_params)
Curves * create_curve(const OBJImportParams &import_params)
static ushort indices[]