|
Blender V4.3
|
#include <cassert>#include <Eigen/Core>#include <Eigen/Geometry>#include "GHOST_Types.h"#include "GHOST_XrException.hh"#include "GHOST_Xr_intern.hh"#include "GHOST_XrControllerModel.hh"#include "tiny_gltf.h"Go to the source code of this file.
Classes | |
| struct | GHOST_XrControllerModelNode |
| struct | GHOST_XrPrimitive |
Macros | |
| #define | TINYGLTF_IMPLEMENTATION |
| #define | TINYGLTF_NO_STB_IMAGE |
| #define | TINYGLTF_NO_STB_IMAGE_WRITE |
| #define | STBIWDEF static inline |
Functions | |
glTF Utilities | |
Adapted from Microsoft OpenXR-Mixed Reality Samples (MIT License): https://github.com/microsoft/OpenXR-MixedReality | |
| static void | validate_accessor (const tinygltf::Accessor &accessor, const tinygltf::BufferView &buffer_view, const tinygltf::Buffer &buffer, size_t byte_stride, size_t element_size) |
| template<float(GHOST_XrControllerModelVertex::*) field> | |
| static void | read_vertices (const tinygltf::Accessor &accessor, const tinygltf::BufferView &buffer_view, const tinygltf::Buffer &buffer, GHOST_XrPrimitive &primitive) |
| static void | load_attribute_accessor (const tinygltf::Model &gltf_model, const std::string &attribute_name, int accessor_id, GHOST_XrPrimitive &primitive) |
| template<typename TSrcIndex > | |
| static void | read_indices (const tinygltf::Accessor &accessor, const tinygltf::BufferView &buffer_view, const tinygltf::Buffer &buffer, GHOST_XrPrimitive &primitive) |
| static void | load_index_accessor (const tinygltf::Model &gltf_model, const tinygltf::Accessor &accessor, GHOST_XrPrimitive &primitive) |
| static GHOST_XrPrimitive | read_primitive (const tinygltf::Model &gltf_model, const tinygltf::Primitive &gltf_primitive) |
| static void | calc_node_transforms (const tinygltf::Node &gltf_node, const float parent_transform[4][4], float r_local_transform[4][4], float r_world_transform[4][4]) |
| static void | load_node (const tinygltf::Model &gltf_model, int gltf_node_id, int32_t parent_idx, const float parent_transform[4][4], const std::string &parent_name, const std::vector< XrControllerModelNodePropertiesMSFT > &node_properties, std::vector< GHOST_XrControllerModelVertex > &vertices, std::vector< uint32_t > &indices, std::vector< GHOST_XrControllerModelComponent > &components, std::vector< GHOST_XrControllerModelNode > &nodes, std::vector< int32_t > &node_state_indices) |
OpenXR Extension Functions | |
| static PFN_xrGetControllerModelKeyMSFT | g_xrGetControllerModelKeyMSFT = nullptr |
| static PFN_xrLoadControllerModelMSFT | g_xrLoadControllerModelMSFT = nullptr |
| static PFN_xrGetControllerModelPropertiesMSFT | g_xrGetControllerModelPropertiesMSFT = nullptr |
| static PFN_xrGetControllerModelStateMSFT | g_xrGetControllerModelStateMSFT = nullptr |
| static XrInstance | g_instance = XR_NULL_HANDLE |
| static void | init_controller_model_extension_functions (XrInstance instance) |
| #define STBIWDEF static inline |
Definition at line 23 of file GHOST_XrControllerModel.cc.
| #define TINYGLTF_IMPLEMENTATION |
Definition at line 20 of file GHOST_XrControllerModel.cc.
| #define TINYGLTF_NO_STB_IMAGE |
Definition at line 21 of file GHOST_XrControllerModel.cc.
| #define TINYGLTF_NO_STB_IMAGE_WRITE |
Definition at line 22 of file GHOST_XrControllerModel.cc.
|
static |
Calculate node local and world transforms.
Definition at line 226 of file GHOST_XrControllerModel.cc.
References float.
Referenced by load_node().
|
static |
Definition at line 378 of file GHOST_XrControllerModel.cc.
References g_instance, g_xrGetControllerModelKeyMSFT, g_xrGetControllerModelPropertiesMSFT, g_xrGetControllerModelStateMSFT, g_xrLoadControllerModelMSFT, INIT_EXTENSION_FUNCTION, and instance.
Referenced by GHOST_XrControllerModel::GHOST_XrControllerModel().
|
static |
Definition at line 100 of file GHOST_XrControllerModel.cc.
References read_vertices().
Referenced by read_primitive().
|
static |
Reads index data from a glTF primitive into a GHOST_XrPrimitive.
Definition at line 170 of file GHOST_XrControllerModel.cc.
References read_indices().
Referenced by read_primitive().
|
static |
Definition at line 285 of file GHOST_XrControllerModel.cc.
References calc_node_transforms(), count, GHOST_XrPrimitive::indices, load_node(), read_primitive(), and GHOST_XrPrimitive::vertices.
Referenced by load_node().
|
static |
Reads index data from a glTF primitive into a GHOST_XrPrimitive. glTF indices may be 8bit, 16bit or 32bit integers. This will coalesce indices from the source type(s) into a 32bit integer.
Definition at line 134 of file GHOST_XrControllerModel.cc.
References GHOST_XrPrimitive::indices, and validate_accessor().
Referenced by load_index_accessor().
|
static |
Definition at line 199 of file GHOST_XrControllerModel.cc.
References load_attribute_accessor(), and load_index_accessor().
Referenced by load_node().
|
static |
Definition at line 68 of file GHOST_XrControllerModel.cc.
References float, validate_accessor(), and GHOST_XrPrimitive::vertices.
Referenced by load_attribute_accessor().
|
static |
Validate that an accessor does not go out of bounds of the buffer view that it references and that the buffer view does not exceed the bounds of the buffer that it references
Definition at line 48 of file GHOST_XrControllerModel.cc.
Referenced by read_indices(), and read_vertices().
|
static |
Definition at line 376 of file GHOST_XrControllerModel.cc.
Referenced by init_controller_model_extension_functions().
|
static |
Definition at line 372 of file GHOST_XrControllerModel.cc.
Referenced by init_controller_model_extension_functions(), and GHOST_XrControllerModel::load().
|
static |
Definition at line 374 of file GHOST_XrControllerModel.cc.
Referenced by init_controller_model_extension_functions().
|
static |
Definition at line 375 of file GHOST_XrControllerModel.cc.
Referenced by init_controller_model_extension_functions(), and GHOST_XrControllerModel::updateComponents().
|
static |
Definition at line 373 of file GHOST_XrControllerModel.cc.
Referenced by init_controller_model_extension_functions().