Welcome to mirror list, hosted at ThFree Co, Russian Federation.

importer_mesh_utils.hh « importer « wavefront_obj « io « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ce47da3e8632cbf7fc5f015b196453ebe775350a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-License-Identifier: GPL-2.0-or-later */

/** \file
 * \ingroup obj
 */

#pragma once

#include "BLI_math_vec_types.hh"
#include "BLI_span.hh"
#include "BLI_vector.hh"

struct Object;
struct OBJImportParams;

namespace blender::io::obj {

/**
 * Given an invalid polygon (with holes or duplicated vertex indices),
 * turn it into possibly multiple polygons that are valid.
 *
 * \param vertex_coords: Polygon's vertex coordinate list.
 * \param face_vertex_indices: A polygon's indices that index into the given vertex coordinate
 * list.
 *
 * \return List of polygons with each element containing indices of one polygon. The indices
 * are into face_vertex_indices array.
 */
Vector<Vector<int>> fixup_invalid_polygon(Span<float3> vertex_coords,
                                          Span<int> face_vertex_indices);

/**
 * Apply axes transform to the Object, and clamp object dimensions to the specified value.
 */
void transform_object(Object *object, const OBJImportParams &import_params);

}  // namespace blender::io::obj