GameApi
28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
mesh_cleanup.h
Go to the documentation of this file.
1
// Copyright 2016 The Draco Authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
//
15
#ifndef DRACO_MESH_MESH_CLEANUP_H_
16
#define DRACO_MESH_MESH_CLEANUP_H_
17
18
#include "
draco/core/status.h
"
19
#include "
draco/draco_features.h
"
20
#include "
draco/mesh/mesh.h
"
21
22
namespace
draco
{
23
24
// Options used by the MeshCleanup class.
25
struct
MeshCleanupOptions
{
26
// If true, the cleanup tool removes any face where two or more vertices
27
// share the same position index.
28
bool
remove_degenerated_faces
=
true
;
29
30
// If true, the cleanup tool removes all duplicate faces. A pair of faces is
31
// duplicate if both faces share the same position indices on all vertices
32
// (that is, position values have to be duduplicated). Note that all
33
// non-position properties are currently ignored.
34
bool
remove_duplicate_faces
=
true
;
35
36
// If true, the cleanup tool removes any unused attribute value or unused
37
// point id. For example, it can be used to remove isolated vertices.
38
bool
remove_unused_attributes
=
true
;
39
40
// If true, the cleanup tool splits vertices along non-manifold edges and
41
// vertices. This ensures that the connectivity defined by position indices
42
// is manifold.
43
bool
make_geometry_manifold
=
false
;
44
};
45
46
// Tool that can be used for removing bad or unused data from draco::Meshes.
47
class
MeshCleanup
{
48
public
:
49
// Performs in-place cleanup of the input mesh according to the input options.
50
static
Status
Cleanup
(
Mesh
*mesh,
const
MeshCleanupOptions
&
options
);
51
52
private
:
53
static
void
RemoveDegeneratedFaces(
Mesh
*mesh);
54
static
void
RemoveDuplicateFaces(
Mesh
*mesh);
55
static
void
RemoveUnusedAttributes(
Mesh
*mesh);
56
static
Status
MakeGeometryManifold(
Mesh
*mesh);
57
};
58
59
}
// namespace draco
60
61
#endif
// DRACO_MESH_MESH_CLEANUP_H_
draco::MeshCleanup
Definition
mesh_cleanup.h:47
draco::MeshCleanup::Cleanup
static Status Cleanup(Mesh *mesh, const MeshCleanupOptions &options)
Definition
mesh_cleanup.cc:27
draco::Mesh
Definition
mesh.h:52
draco::Status
Definition
status.h:25
draco_features.h
mesh.h
options
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition
meshpage.php:1181
draco
Definition
attribute_octahedron_transform.cc:21
status.h
draco::MeshCleanupOptions
Definition
mesh_cleanup.h:25
draco::MeshCleanupOptions::make_geometry_manifold
bool make_geometry_manifold
Definition
mesh_cleanup.h:43
draco::MeshCleanupOptions::remove_unused_attributes
bool remove_unused_attributes
Definition
mesh_cleanup.h:38
draco::MeshCleanupOptions::remove_degenerated_faces
bool remove_degenerated_faces
Definition
mesh_cleanup.h:28
draco::MeshCleanupOptions::remove_duplicate_faces
bool remove_duplicate_faces
Definition
mesh_cleanup.h:34
draco
mesh
mesh_cleanup.h
Generated by
1.15.0