Lagrange
Loading...
Searching...
No Matches
binding.h
1/*
2 * Copyright 2025 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14// Avoids potential ODR violations by grouping all nanobind includes in a single file.
15// https://nanobind.readthedocs.io/en/latest/faq.html#compilation-fails-with-a-static-assertion-mentioning-nb-make-opaque
16
17// clang-format off
18#include <lagrange/utils/warnoff.h>
19#include <nanobind/nanobind.h>
20#include <nanobind/eigen/dense.h>
21#include <nanobind/eval.h>
22#include <nanobind/ndarray.h>
23#include <nanobind/stl/array.h>
24#include <nanobind/stl/bind_map.h>
25#include <nanobind/stl/bind_vector.h>
26#include <nanobind/stl/detail/nb_list.h>
27#include <nanobind/stl/filesystem.h>
28#include <nanobind/stl/function.h>
29#include <nanobind/stl/map.h>
30#include <nanobind/stl/optional.h>
31#include <nanobind/stl/pair.h>
32#include <nanobind/stl/shared_ptr.h>
33#include <nanobind/stl/string_view.h>
34#include <nanobind/stl/string.h>
35#include <nanobind/stl/tuple.h>
36#include <nanobind/stl/unique_ptr.h>
37#include <nanobind/stl/unordered_map.h>
38#include <nanobind/stl/unordered_set.h>
39#include <nanobind/stl/variant.h>
40#include <nanobind/stl/vector.h>
41#include <nanobind/trampoline.h>
42#include <lagrange/utils/warnon.h>
43// clang-format on
44
45#include <lagrange/python/utils/bind_safe_vector.h>
46
47#include <lagrange/scene/Scene.h>
48
49NB_MAKE_OPAQUE(lagrange::SafeVector<size_t>);
50NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Node>);
51NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::SceneMeshInstance>);
52NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::SurfaceMesh<double, uint32_t>>);
53NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::ImageExperimental>);
54NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Texture>);
55NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::MaterialExperimental>);
56NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Light>);
57NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Camera>);
58NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Skeleton>);
59NB_MAKE_OPAQUE(lagrange::SafeVector<lagrange::scene::Animation>);
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66