Blender V4.5
obj_export_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
12#include "BLI_utility_mixins.hh"
13
14#include "DNA_curve_types.h"
15
16#include "IO_orientation.hh"
17
18struct OBJExportParams;
19
20namespace blender::io::obj {
21
29 private:
30 const Object *export_object_eval_;
31 const Curve *export_curve_;
32 float world_axes_transform_[4][4];
33
34 public:
35 OBJCurve(const Depsgraph *depsgraph, const OBJExportParams &export_params, Object *curve_object);
36
37 const char *get_curve_name() const;
38 int total_splines() const;
39 const Nurb *get_spline(int spline_index) const;
44 int total_spline_vertices(int spline_index) const;
48 float3 vertex_coordinates(int spline_index, int vertex_index, float global_scale) const;
52 int num_control_points_u(int spline_index) const;
56 int num_control_points_v(int spline_index) const;
60 int get_nurbs_degree_u(int spline_index) const;
64 int get_nurbs_degree_v(int spline_index) const;
68 short get_nurbs_flagu(int spline_index) const;
72 Span<float> get_knots_u(int spline_index, Vector<float> &buffer) const;
73
74 private:
78 void set_world_axes_transform(eIOAxis forward, eIOAxis up);
79};
80
81} // namespace blender::io::obj
eIOAxis
BPy_StructRNA * depsgraph
NonCopyable(const NonCopyable &other)=delete
int total_spline_vertices(int spline_index) const
const Nurb * get_spline(int spline_index) const
short get_nurbs_flagu(int spline_index) const
float3 vertex_coordinates(int spline_index, int vertex_index, float global_scale) const
int get_nurbs_degree_u(int spline_index) const
int num_control_points_u(int spline_index) const
const char * get_curve_name() const
int get_nurbs_degree_v(int spline_index) const
Span< float > get_knots_u(int spline_index, Vector< float > &buffer) const
int num_control_points_v(int spline_index) const
OBJCurve(const Depsgraph *depsgraph, const OBJExportParams &export_params, Object *curve_object)
VecBase< float, 3 > float3