|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
Collision shape properties imported from Blender. More...
#include <GltfLoader.h>
Classes | |
| struct | CompoundChild |
| Child shape data for compound collision. More... | |
Public Types | |
| enum class | ShapeType { NONE , BOX , SPHERE , CAPSULE , CONVEX_HULL , TRIANGLE_MESH , COMPOUND } |
| Collision shape type imported from the engine glTF extension. More... | |
Public Member Functions | |
| CollisionProperties ()=default | |
| Creates collision settings with collision disabled. | |
| CollisionProperties (const tinygltf::Value &extension, const tinygltf::Model *model=nullptr) | |
| Parses collisionProperties from the engine extension. | |
| bool | hasCollision () const |
| Checks whether this record describes a collision shape. | |
Public Attributes | |
| ShapeType | shapeType = ShapeType::NONE |
| Shape type selected by collisionType. | |
| bool | generateConvexHull = false |
| True when runtime collision generation should build a convex hull. | |
| std::string | collisionProfile |
| Named collision response profile imported from the authoring tool. | |
| glm::vec3 | offset { 0.0f } |
| Local collision shape offset in node space. | |
| glm::vec3 | boxHalfExtents { 0.5f } |
| Half extents for box collision. | |
| float | sphereRadius = 0.5f |
| Radius for sphere collision. | |
| float | capsuleRadius = 0.5f |
| Radius for capsule collision. | |
| float | capsuleHeight = 1.0f |
| Height for capsule collision. | |
| std::vector< glm::vec3 > | vertices |
| Collision vertices for convex hull and triangle mesh shapes. | |
| std::vector< uint32_t > | indices |
| Triangle indices for triangle mesh collision. | |
| std::vector< CompoundChild > | compoundChildren |
| Compound collision children. | |
Static Private Member Functions | |
| static ShapeType | parseShapeType (const std::string &typeStr) |
Collision shape properties imported from Blender.
Supports primitive shapes, convex hulls, triangle meshes, and compound shapes from VSC_-prefixed meshes.
Definition at line 385 of file GltfLoader.h.
|
strong |
Collision shape type imported from the engine glTF extension.
Definition at line 390 of file GltfLoader.h.
|
default |
Creates collision settings with collision disabled.
|
explicit |
Parses collisionProperties from the engine extension.
| extension | JSON object containing collision shape settings. |
| model | Optional model used when compound children reference binary accessors. |
|
inlinenodiscard |
Checks whether this record describes a collision shape.
Definition at line 521 of file GltfLoader.h.
|
staticprivate |
| glm::vec3 Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::boxHalfExtents { 0.5f } |
Half extents for box collision.
Definition at line 447 of file GltfLoader.h.
| float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::capsuleHeight = 1.0f |
Height for capsule collision.
Definition at line 462 of file GltfLoader.h.
| float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::capsuleRadius = 0.5f |
Radius for capsule collision.
Definition at line 457 of file GltfLoader.h.
| std::string Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::collisionProfile |
Named collision response profile imported from the authoring tool.
Definition at line 436 of file GltfLoader.h.
| std::vector<CompoundChild> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::compoundChildren |
Compound collision children.
Definition at line 515 of file GltfLoader.h.
| bool Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::generateConvexHull = false |
True when runtime collision generation should build a convex hull.
Definition at line 431 of file GltfLoader.h.
| std::vector<uint32_t> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::indices |
Triangle indices for triangle mesh collision.
Definition at line 473 of file GltfLoader.h.
| glm::vec3 Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::offset { 0.0f } |
Local collision shape offset in node space.
Definition at line 441 of file GltfLoader.h.
| ShapeType Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::shapeType = ShapeType::NONE |
Shape type selected by collisionType.
Definition at line 426 of file GltfLoader.h.
Referenced by hasCollision().
| float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::sphereRadius = 0.5f |
Radius for sphere collision.
Definition at line 452 of file GltfLoader.h.
| std::vector<glm::vec3> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::vertices |
Collision vertices for convex hull and triangle mesh shapes.
Definition at line 468 of file GltfLoader.h.