Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ovmm] Merge main and add magnum plugins #2106

Merged
merged 29 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bc34a85
skip unsupported 3D primitives (#2054)
eundersander Apr 1, 2023
e6e3cfd
bugfix for setArticulatedObjectModelFilename causing garbage log outp…
eundersander Apr 1, 2023
8cf3cd3
Gfx-replay polish: workaround for material-overrides; new keyframe ge…
eundersander Apr 3, 2023
bdb2c89
--Have pre-commit use node version compatible with Ubuntu 18.04 (#2058)
jturner65 Apr 3, 2023
6b33685
Fix viewer.py framebuffer size mismatch. (#2055)
0mdc Apr 3, 2023
1d6ff65
Replay renderer: add line-rendering and unproject() (#2057)
eundersander Apr 5, 2023
7844cae
bugfix: cylinder proimitive collsion shape did not use halflength (#2…
aclegg3 Apr 5, 2023
c1930a1
--have disabled renderer test only execute 1 time (#2065)
jturner65 Apr 10, 2023
e446ab2
--(Bugfix) Fix normal transformation calc and address backface cullin…
jturner65 Apr 12, 2023
f2c5c56
Update Magnum submodules to latest. (#2066)
mosra Apr 12, 2023
100dc8f
Update magnum submodules. (#2073)
mosra Apr 14, 2023
0268c1c
Add runtime perf stats for troubleshooting perf problems (#2070)
eundersander Apr 20, 2023
405397a
--Refactor Semantic Mesh loading/flattening to remove deprecated func…
jturner65 Apr 21, 2023
8282d14
Articulated object skinning (#2076)
0mdc Apr 24, 2023
8673358
--Add access to Scene Instance-level user defined attributes. (#2081)
jturner65 Apr 24, 2023
60c3e09
--Don't make needless copy of scene instance attributes when retrievi…
jturner65 Apr 25, 2023
65f449d
gfx-replay: fix to remove reflection when converting node transform m…
eundersander Apr 26, 2023
13f149a
Articulated object semantics (#2086)
0mdc Apr 27, 2023
7d04cd5
--Convert materials to use magnum materials. (#2083)
jturner65 Apr 28, 2023
0766bcb
--address inappropriate bitflag check; add vertexID flag to PBR shade…
jturner65 May 1, 2023
ded645b
enable frustum-culling for classic replay renderer (#2096)
eundersander May 4, 2023
4ca07c8
enable recompute_navmesh when creating sim with create_renderer==fals…
eundersander May 4, 2023
fe6c933
--[BUGFIX] Reverse directional lights before sending to uniform; (#2094)
jturner65 May 4, 2023
7ee3ba6
Update Magnum submodules. (#2100)
mosra May 10, 2023
f9ff540
--[BUGFIX] Single channel texture support (#2102)
jturner65 May 11, 2023
b0d72b8
add intertiaFromURDF option to URDF loading API (#2098)
aclegg3 May 15, 2023
eb2308e
Merge branch 'main' of https://github.com/facebookresearch/habitat-si…
yvsriram May 16, 2023
39a3a48
add additional magnum importer plugins to python build dependencies
aclegg3 May 15, 2023
2545420
refactor to reduce redundancy
aclegg3 May 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ repos:
hooks:
- id: eslint
args: [--fix, --ext .html,.js]
language_version: 14.21.3
additional_dependencies:
- eslint@6.4.0
- eslint-config-prettier@6.3.0
Expand Down
Binary file added data/test_assets/objects/skinned_prism.glb
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions data/test_assets/urdf/skinned_prism.ao_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"render_asset": "../objects/skinned_prism.glb",
"semantic_id": 100,
"debug_render_primitives": false
}
107 changes: 107 additions & 0 deletions data/test_assets/urdf/skinned_prism.urdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" ?>
<robot name="skinned_prism">
<material name="mat">
<color rgba="1.0 1.0 1.0 1.0"/>
</material>

<link name="A">
<visual>
<material name="mat"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>
</link>

<link name="B">
<visual>
<material name="mat"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>
</link>

<link name="C">
<visual>
<material name="mat"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>
</link>

<link name="D">
<visual>
<material name="mat"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>
</link>

<link name="E">
<visual>
<material name="mat"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>
</link>

<joint name="B" type="spherical">
<parent link="A"/>
<child link="B"/>
<origin xyz="0 0 1.5" rpy="0 0 0"/>
</joint>
<joint name="C" type="spherical">
<parent link="B"/>
<child link="C"/>
<origin xyz="0 0 3" rpy="0 0 0"/>
</joint>
<joint name="D" type="spherical">
<parent link="C"/>
<child link="D"/>
<origin xyz="0 0 4.5" rpy="0 0 0"/>
</joint>
<joint name="E" type="spherical">
<parent link="D"/>
<child link="E"/>
<origin xyz="0 0 6" rpy="0 0 0"/>
</joint>
</robot>
4 changes: 2 additions & 2 deletions examples/tutorials/lighting_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def main(show_imgs=True, save_imgs=False):

# create a custom light setup
my_default_lighting = [
LightInfo(vector=[2.0, 2.0, 1.0, 0.0], model=LightPositionModel.Camera)
LightInfo(vector=[-2.0, -2.0, -1.0, 0.0], model=LightPositionModel.Camera)
]
# overwrite the default DEFAULT_LIGHTING_KEY light setup
sim.set_light_setup(my_default_lighting)
Expand Down Expand Up @@ -208,7 +208,7 @@ def main(show_imgs=True, save_imgs=False):
# create a new setup with an additional light
new_light_setup = existing_light_setup + [
LightInfo(
vector=[0.0, 0.0, 1.0, 0.0],
vector=[0.0, 0.0, -1.0, 0.0],
color=[1.6, 1.6, 1.4],
model=LightPositionModel.Camera,
)
Expand Down
48 changes: 34 additions & 14 deletions examples/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,25 @@ def __init__(self, sim_settings: Dict[str, Any]) -> None:
)

# Compute environment camera resolution based on the number of environments to render in the window.
surface_size: tuple(int, int) = (
window_size: mn.Vector2 = (
self.sim_settings["window_width"],
self.sim_settings["window_height"],
)
grid_size: tuple(int, int) = ReplayRenderer.environment_grid_size(self.num_env)
camera_resolution: tuple(int, int) = (
surface_size[0] / grid_size[0],
surface_size[1] / grid_size[1],
)
self.sim_settings["width"] = camera_resolution[0]
self.sim_settings["height"] = camera_resolution[1]

configuration = self.Configuration()
configuration.title = "Habitat Sim Interactive Viewer"
configuration.size = surface_size
configuration.size = window_size
Application.__init__(self, configuration)
self.fps: float = 60.0

# Compute environment camera resolution based on the number of environments to render in the window.
grid_size: mn.Vector2i = ReplayRenderer.environment_grid_size(self.num_env)
camera_resolution: mn.Vector2 = mn.Vector2(self.framebuffer_size) / mn.Vector2(
grid_size
)
self.sim_settings["width"] = camera_resolution[0]
self.sim_settings["height"] = camera_resolution[1]

# draw Bullet debug line visualizations (e.g. collision meshes)
self.debug_bullet_draw = False
# draw active contact point debug line visualizations
Expand Down Expand Up @@ -138,11 +139,12 @@ def __init__(self, sim_settings: Dict[str, Any]) -> None:
# text object transform in window space is Projection matrix times Translation Matrix
# put text in top left of window
self.window_text_transform = mn.Matrix3.projection(
mn.Vector2(surface_size)
self.framebuffer_size
) @ mn.Matrix3.translation(
mn.Vector2(
surface_size[0] * -HabitatSimInteractiveViewer.TEXT_DELTA_FROM_CENTER,
surface_size[1] * HabitatSimInteractiveViewer.TEXT_DELTA_FROM_CENTER,
mn.Vector2(self.framebuffer_size)
* mn.Vector2(
-HabitatSimInteractiveViewer.TEXT_DELTA_FROM_CENTER,
HabitatSimInteractiveViewer.TEXT_DELTA_FROM_CENTER,
)
)
self.shader = shaders.VectorGL2D()
Expand Down Expand Up @@ -558,13 +560,31 @@ def key_press_event(self, event: Application.KeyEvent) -> None:
self.cached_urdf = urdf_file_path
aom = self.sim.get_articulated_object_manager()
ao = aom.add_articulated_object_from_urdf(
urdf_file_path, fixed_base, 1.0, 1.0, True
urdf_file_path,
fixed_base,
1.0,
1.0,
True,
maintain_link_order=False,
intertia_from_urdf=False,
)
ao.translation = (
self.default_agent.scene_node.transformation.transform_point(
[0.0, 1.0, -1.5]
)
)
# check removal and auto-creation
joint_motor_settings = habitat_sim.physics.JointMotorSettings(
position_target=0.0,
position_gain=1.0,
velocity_target=0.0,
velocity_gain=1.0,
max_impulse=1000.0,
)
existing_motor_ids = ao.existing_joint_motor_ids
for motor_id in existing_motor_ids:
ao.remove_joint_motor(motor_id)
ao.create_all_motors(joint_motor_settings)
else:
logger.warn("Load URDF: input file not found. Aborting.")

Expand Down
4 changes: 2 additions & 2 deletions src/cmake/FindMagnum.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
#
# Features of found Magnum library are exposed in these variables:
#
# MAGNUM_BUILD_DEPRECATED - Defined if compiled with deprecated APIs
# MAGNUM_BUILD_DEPRECATED - Defined if compiled with deprecated features
# included
# MAGNUM_BUILD_STATIC - Defined if compiled as static libraries
# MAGNUM_BUILD_STATIC_UNIQUE_GLOBALS - Defined if static libraries keep the
Expand Down Expand Up @@ -910,7 +910,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS})

# SceneTools library
elseif(_component STREQUAL SceneTools)
set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES FlattenMeshHierarchy.h)
set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES FlattenTransformationHierarchy.h)

# ShaderTools library
elseif(_component STREQUAL ShaderTools)
Expand Down
15 changes: 11 additions & 4 deletions src/cmake/FindMagnumPlugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# PngImporter - PNG importer
# PrimitiveImporter - Primitive importer
# SpirvToolsShaderConverter - SPIR-V Tools shader converter
# SpngImporter - PNG importer using libspng
# StanfordImporter - Stanford PLY importer
# StanfordSceneConverter - Stanford PLY converter
# StbDxtImageConverter - BC1/BC3 image compressor using stb_dxt
Expand Down Expand Up @@ -168,10 +169,10 @@ set(_MAGNUMPLUGINS_PLUGIN_COMPONENTS
JpegImporter KtxImageConverter KtxImporter MeshOptimizerSceneConverter
MiniExrImageConverter OpenExrImageConverter OpenExrImporter
OpenGexImporter PngImageConverter PngImporter PrimitiveImporter
SpirvToolsShaderConverter StanfordImporter StanfordSceneConverter
StbDxtImageConverter StbImageConverter StbImageImporter
StbResizeImageConverter StbTrueTypeFont StbVorbisAudioImporter StlImporter
UfbxImporter WebPImporter)
SpirvToolsShaderConverter SpngImporter StanfordImporter
StanfordSceneConverter StbDxtImageConverter StbImageConverter
StbImageImporter StbResizeImageConverter StbTrueTypeFont
StbVorbisAudioImporter StlImporter UfbxImporter WebPImporter)
# Nothing is enabled by default right now
set(_MAGNUMPLUGINS_IMPLICITLY_ENABLED_COMPONENTS )

Expand Down Expand Up @@ -471,6 +472,12 @@ foreach(_component ${MagnumPlugins_FIND_COMPONENTS})
set_property(TARGET MagnumPlugins::${_component} APPEND PROPERTY
INTERFACE_LINK_LIBRARIES SpirvTools::SpirvTools SpirvTools::Opt)

# SpngImporter plugin dependencies
elseif(_component STREQUAL SpngImporter)
find_package(Spng REQUIRED)
set_property(TARGET MagnumPlugins::${_component} APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Spng::Spng)

# StanfordImporter has no dependencies
# StanfordSceneConverter has no dependencies
# StbDxtImageConverter has no dependencies
Expand Down
27 changes: 19 additions & 8 deletions src/cmake/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ if(NOT USE_SYSTEM_MAGNUM)

# These are enabled by default but we don't need them for anything yet
set(MAGNUM_WITH_SHADERTOOLS OFF CACHE BOOL "" FORCE)
set(MAGNUM_WITH_MATERIALTOOLS OFF CACHE BOOL "" FORCE)
# These used to be disabled here but now aren't, explicitly enable them to
# update options in existing builds
set(MAGNUM_WITH_MATERIALTOOLS ON CACHE BOOL "" FORCE)

# These are enabled by default but we don't need them if not building GUI
# viewers -- disabling for slightly faster builds. If you need any of these
Expand Down Expand Up @@ -347,16 +349,25 @@ if(NOT USE_SYSTEM_MAGNUM)
# Make Magnum text rendering plugins (used by the native viewer) available
# for Python as well; and reset that back to strange build procedures that
# turn some features off again later can still work.
set(
common_plugins
Magnum::AnyImageConverter
Magnum::AnyImageImporter
Magnum::AnySceneImporter
MagnumPlugins::AssimpImporter
MagnumPlugins::BasisImporter
MagnumPlugins::GltfImporter
MagnumPlugins::StanfordImporter
MagnumPlugins::StbImageConverter
MagnumPlugins::StbImageImporter
)
if(BUILD_GUI_VIEWERS)
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS
MagnumPlugins::StbTrueTypeFont Magnum::AnySceneImporter
MagnumPlugins::AssimpImporter CACHE STRING "" FORCE
)
else()
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS Magnum::AnySceneImporter
MagnumPlugins::AssimpImporter
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS ${common_plugins}
MagnumPlugins::StbTrueTypeFont
CACHE STRING "" FORCE
)
else()
set(MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS ${common_plugins} CACHE STRING "" FORCE)
endif()
add_subdirectory("${DEPS_DIR}/magnum-bindings")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/deps/corrade
Submodule corrade updated 35 files
+17 −3 doc/corrade-changelog.dox
+11 −1 package/ci/appveyor-desktop-mingw.bat
+4 −3 package/ci/appveyor.yml
+48 −8 package/ci/circleci.yml
+4 −0 src/Corrade/Containers/ArrayView.h
+9 −2 src/Corrade/Containers/EnumSet.h
+13 −0 src/Corrade/Containers/Iterable.h
+39 −11 src/Corrade/Containers/StridedArrayView.h
+129 −17 src/Corrade/Containers/StridedBitArrayView.h
+14 −0 src/Corrade/Containers/Test/EnumSetTest.cpp
+23 −0 src/Corrade/Containers/Test/IterableTest.cpp
+24 −14 src/Corrade/Containers/Test/StridedArrayViewTest.cpp
+145 −28 src/Corrade/Containers/Test/StridedBitArrayViewTest.cpp
+19 −1 src/Corrade/TestSuite/Test/TesterTest.cpp
+18 −10 src/Corrade/TestSuite/Tester.h
+2 −2 src/Corrade/Utility/Algorithms.cpp
+18 −27 src/Corrade/Utility/Algorithms.h
+20 −7 src/Corrade/Utility/Arguments.cpp
+5 −1 src/Corrade/Utility/Arguments.h
+18 −13 src/Corrade/Utility/Assert.h
+72 −0 src/Corrade/Utility/BitAlgorithms.cpp
+103 −0 src/Corrade/Utility/BitAlgorithms.h
+2 −0 src/Corrade/Utility/CMakeLists.txt
+2 −0 src/Corrade/Utility/DebugAssert.h
+6 −0 src/Corrade/Utility/Json.cpp
+2 −1 src/Corrade/Utility/Json.h
+15 −1 src/Corrade/Utility/Math.h
+15 −4 src/Corrade/Utility/Memory.h
+7 −1 src/Corrade/Utility/StlForwardArray.h
+7 −1 src/Corrade/Utility/StlForwardTuple.h
+6 −0 src/Corrade/Utility/Test/AssertGracefulTest.cpp
+285 −0 src/Corrade/Utility/Test/BitAlgorithmsTest.cpp
+2 −0 src/Corrade/Utility/Test/CMakeLists.txt
+13 −1 src/Corrade/Utility/Test/MathTest.cpp
+24 −10 src/Corrade/Utility/Test/MemoryTest.cpp
2 changes: 1 addition & 1 deletion src/deps/magnum
Submodule magnum updated 231 files
2 changes: 1 addition & 1 deletion src/deps/magnum-bindings
Submodule magnum-bindings updated 58 files
+4 −1 doc/python/conf.py
+224 −4 doc/python/corrade.containers.rst
+3 −0 doc/python/corrade.utility.rst
+82 −0 doc/python/magnum.meshtools.rst
+44 −4 doc/python/magnum.rst
+40 −0 doc/python/magnum.scenetools.rst
+86 −4 doc/python/magnum.trade.rst
+20 −1 doc/python/pages/changelog.rst
+2 −2 doc/python/pages/developers.rst
+13 −5 modules/FindCorrade.cmake
+14 −3 modules/FindMagnum.cmake
+4 −0 modules/FindOpenGLES3.cmake
+4 −4 modules/FindSDL2.cmake
+3 −1 package/ci/appveyor-desktop-gles.bat
+3 −1 package/ci/appveyor-desktop.bat
+6 −2 package/ci/appveyor.yml
+38 −3 package/ci/circleci.yml
+3 −1 package/ci/unix-desktop-gles.sh
+3 −1 package/ci/unix-desktop.sh
+2 −2 src/Corrade/CMakeLists.txt
+3 −1 src/Corrade/Containers/StridedArrayViewPythonBindings.h
+4 −0 src/Magnum/CMakeLists.txt
+6 −1 src/Magnum/StridedArrayViewPythonBindings.h
+29 −0 src/Magnum/Trade/CMakeLists.txt
+73 −0 src/Magnum/Trade/PythonBindings.h
+1 −0 src/python/CMakeLists.txt
+16 −0 src/python/corrade/__init__.py
+465 −205 src/python/corrade/containers.cpp
+1,237 −2 src/python/corrade/test/test_containers.py
+3 −0 src/python/corrade/test/test_utility.py
+29 −0 src/python/corrade/utility.cpp
+23 −1 src/python/magnum/CMakeLists.txt
+5 −1 src/python/magnum/__init__.py
+194 −0 src/python/magnum/acessorsForPixelFormat.h
+1 −0 src/python/magnum/bootstrap.h
+25 −4 src/python/magnum/magnum.cpp
+241 −6 src/python/magnum/meshtools.cpp
+3 −0 src/python/magnum/platform/application.h
+18 −0 src/python/magnum/platform/glfw.cpp
+15 −0 src/python/magnum/platform/sdl2.cpp
+138 −0 src/python/magnum/scenetools.cpp
+1 −0 src/python/magnum/staticconfigure.h.cmake
+11 −0 src/python/magnum/test/.gitattributes
+ src/python/magnum/test/dxt10-depth32f-stencil8ui.dds
+0 −15 src/python/magnum/test/image.gltf
+ src/python/magnum/test/mesh-packed.bin
+9 −0 src/python/magnum/test/mesh-packed.bin.in
+104 −0 src/python/magnum/test/mesh-packed.gltf
+ src/python/magnum/test/mesh.bin
+6 −2 src/python/magnum/test/scene.gltf
+282 −33 src/python/magnum/test/test.py
+7 −6 src/python/magnum/test/test_gl_gl.py
+323 −0 src/python/magnum/test/test_meshtools.py
+150 −0 src/python/magnum/test/test_scenetools.py
+273 −92 src/python/magnum/test/test_trade.py
+36 −0 src/python/magnum/test/texture.gltf
+120 −23 src/python/magnum/trade.cpp
+1 −0 src/python/setup.py.cmake
2 changes: 1 addition & 1 deletion src/deps/magnum-plugins
Submodule magnum-plugins updated 154 files
3 changes: 2 additions & 1 deletion src/esp/assets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ find_package(
AnyImageImporter
AnySceneImporter
GL
MaterialTools
MeshTools
SceneGraph
SceneTools
Expand Down Expand Up @@ -82,7 +83,7 @@ target_link_libraries(
MagnumPlugins::StanfordImporter
MagnumPlugins::StbImageImporter
MagnumPlugins::StbImageConverter
PRIVATE geo io
PRIVATE geo io Magnum::MaterialTools
)

if(BUILD_WITH_VHACD)
Expand Down
20 changes: 20 additions & 0 deletions src/esp/assets/MeshMetaData.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ struct MeshTransformNode {

/** @brief Default constructor. */
MeshTransformNode() = default;

/** @brief Node name in the original file. */
std::string name{};
};

/**
Expand Down Expand Up @@ -74,6 +77,10 @@ struct MeshMetaData {
std::pair<start, end> textureIndex =
std::make_pair(ID_UNDEFINED, ID_UNDEFINED);

/** @brief Index range (inclusive) of skin data for the asset in the global
* asset datastructure. */
std::pair<start, end> skinIndex = std::make_pair(ID_UNDEFINED, ID_UNDEFINED);

/** @brief The root of the mesh component transformation hierarchy tree which
* stores the relationship between components of the asset.*/
MeshTransformNode root;
Expand Down Expand Up @@ -116,6 +123,19 @@ struct MeshMetaData {
textureIndex.second = textureEnd;
}

/**
* @brief Sets the skin indices for the asset. See @ref
* ResourceManager::skins_.
* @param skinStart First index for asset skin data in the global
* skin datastructure.
* @param skinEnd Final index for asset skin data in the global skin
* datastructure.
*/
void setSkinIndices(int skinStart, int skinEnd) {
skinIndex.first = skinStart;
skinIndex.second = skinEnd;
}

/**
* @brief Set the root frame orientation based on passed frame
* @param frame target frame in world space
Expand Down
Loading