Ocean
Loading...
Searching...
No Matches
Mesh.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_SCENEDESCRIPTION_SDL_ASSIMP_MESH_H
9#define META_OCEAN_SCENEDESCRIPTION_SDL_ASSIMP_MESH_H
10
12
16
17#include <assimp/mesh.h>
18#include <assimp/scene.h>
19
20namespace Ocean
21{
22
23namespace SceneDescription
24{
25
26namespace SDL
27{
28
29namespace Assimp
30{
31
32/**
33 * This class implements converters for Assimp meshes.
34 * @ingroup scenedescriptionsdlassimp
35 */
36class OCEAN_SCENEDESCRIPTION_SDL_ASSIMP_EXPORT Mesh
37{
38 public:
39
40 /**
41 * Parses an Assimp mesh and converts it to an Ocean geometry object.
42 * @param engine The rendering engine for which the geometry object will be created
43 * @param attributeSets All AttributeSet objects which have been parsed/extracted from the Assimp scene in which the Assimp mesh is defined
44 * @param assimpMesh The Assimp mesh which will be converted to an Ocean geometry object
45 * @return The resulting Ocean geometry object
46 */
47 static Rendering::GeometryRef parseMesh(const Rendering::Engine& engine, const std::vector<Rendering::AttributeSetRef>& attributeSets, const aiMesh& assimpMesh);
48
49 /**
50 * Parses all Assimp meshes and converts them to Ocean geometry objects.
51 * @param engine The rendering engine for which the geometry object will be created
52 * @param attributeSets All AttributeSet objects which have been parsed/extracted from the Assimp scene in which the Assimp mesh is defined
53 * @param assimpScene The Assimp scene from which the geometry objects will be created
54 * @return The resulting Ocean geometry objects (with preserved order)
55 */
56 static std::vector<Rendering::GeometryRef> parseMeshes(const Rendering::Engine& engine, const std::vector<Rendering::AttributeSetRef>& attributeSets, const aiScene& assimpScene);
57};
58
59}
60
61}
62
63}
64
65}
66
67#endif // META_OCEAN_SCENEDESCRIPTION_SDL_ASSIMP_MESH_H
This class is the base class for all rendering engines like.
Definition Engine.h:46
This class implements converters for Assimp meshes.
Definition Mesh.h:37
static Rendering::GeometryRef parseMesh(const Rendering::Engine &engine, const std::vector< Rendering::AttributeSetRef > &attributeSets, const aiMesh &assimpMesh)
Parses an Assimp mesh and converts it to an Ocean geometry object.
static std::vector< Rendering::GeometryRef > parseMeshes(const Rendering::Engine &engine, const std::vector< Rendering::AttributeSetRef > &attributeSets, const aiScene &assimpScene)
Parses all Assimp meshes and converts them to Ocean geometry objects.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15