1 #ifndef DALI_SCENE3D_NAVIGATION_MESH_HEADER_H
2 #define DALI_SCENE3D_NAVIGATION_MESH_HEADER_H
4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
22 namespace Dali::Scene3D::Internal::Algorithm
25 * @struct NavigationMeshHeader
27 * Base header structure contains only the version field. It will allow adding changes to the
28 * exporter while maintaining backward compatibility.
30 struct NavigationMeshHeader
32 uint32_t checksum; ///< Checksum (used to test for endianness, tested by reader )
33 uint32_t version; ///< Version of the API
37 * @struct NavigationMeshHeader_V10
39 * Extension of header for version 1.0 of NavigationMesh binary file
41 struct NavigationMeshHeader_V10 : public NavigationMeshHeader
43 uint32_t dataOffset; ///< Offset where data starts (depends on endianness)
45 uint32_t vertexCount; ///< total count of vertices
46 uint32_t vertexDataOffset; ///< offset into data array where vertices start
48 uint32_t edgeCount; ///< total count of edges
49 uint32_t edgeDataOffset; ///< offset into data array where edges are stored
51 uint32_t polyCount; ///< total number of polys
52 uint32_t polyDataOffset; ///< offset into data array where edges are stored
54 float gravityVector[3]; /// Gravity vector for the data (down vector)
58 #endif // DALI_SCENE3D_NAVIGATION_MESH_HEADER_H