Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties Struct Reference

Stores collision shape properties imported from Blender. More...

#include <GltfLoader.h>

Collaboration diagram for Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties:

Classes

struct  CompoundChild

Public Types

enum class  ShapeType {
  NONE ,
  BOX ,
  SPHERE ,
  CAPSULE ,
  CONVEX_HULL ,
  TRIANGLE_MESH ,
  COMPOUND
}

Public Member Functions

 CollisionProperties ()=default
 CollisionProperties (const tinygltf::Value &extension, const tinygltf::Model *model=nullptr)
bool hasCollision () const

Public Attributes

ShapeType shapeType = ShapeType::NONE
bool generateConvexHull = false
bool isTrigger = false
glm::vec3 offset {0.0f}
glm::vec3 boxHalfExtents {0.5f}
float sphereRadius = 0.5f
float capsuleRadius = 0.5f
float capsuleHeight = 1.0f
std::vector< glm::vec3 > vertices
std::vector< uint32_t > indices
std::vector< CompoundChildcompoundChildren

Static Private Member Functions

static ShapeType parseShapeType (const std::string &typeStr)

Detailed Description

Stores collision shape properties imported from Blender.

Supports primitive shapes (box, sphere, capsule), convex hulls, triangle meshes, and compound shapes from VSC_ prefixed meshes.

Definition at line 160 of file GltfLoader.h.

Member Enumeration Documentation

◆ ShapeType

Enumerator
NONE 
BOX 
SPHERE 
CAPSULE 
CONVEX_HULL 
TRIANGLE_MESH 
COMPOUND 

Definition at line 161 of file GltfLoader.h.

Constructor & Destructor Documentation

◆ CollisionProperties() [1/2]

Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::CollisionProperties ( )
default

◆ CollisionProperties() [2/2]

Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::CollisionProperties ( const tinygltf::Value & extension,
const tinygltf::Model * model = nullptr )
explicit

Member Function Documentation

◆ hasCollision()

bool Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::hasCollision ( ) const
inlinenodiscard

Definition at line 193 of file GltfLoader.h.

References NONE, and shapeType.

◆ parseShapeType()

ShapeType Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::parseShapeType ( const std::string & typeStr)
staticprivate

Member Data Documentation

◆ boxHalfExtents

glm::vec3 Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::boxHalfExtents {0.5f}

Definition at line 173 of file GltfLoader.h.

◆ capsuleHeight

float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::capsuleHeight = 1.0f

Definition at line 176 of file GltfLoader.h.

◆ capsuleRadius

float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::capsuleRadius = 0.5f

Definition at line 175 of file GltfLoader.h.

◆ compoundChildren

std::vector<CompoundChild> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::compoundChildren

Definition at line 191 of file GltfLoader.h.

◆ generateConvexHull

bool Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::generateConvexHull = false

Definition at line 168 of file GltfLoader.h.

◆ indices

std::vector<uint32_t> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::indices

Definition at line 180 of file GltfLoader.h.

◆ isTrigger

bool Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::isTrigger = false

Definition at line 169 of file GltfLoader.h.

◆ offset

glm::vec3 Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::offset {0.0f}

Definition at line 170 of file GltfLoader.h.

◆ shapeType

ShapeType Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::shapeType = ShapeType::NONE

Definition at line 167 of file GltfLoader.h.

Referenced by hasCollision().

◆ sphereRadius

float Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::sphereRadius = 0.5f

Definition at line 174 of file GltfLoader.h.

◆ vertices

std::vector<glm::vec3> Engine::Assets::Loaders::GltfLoader::VulkanSchneeExtension::CollisionProperties::vertices

Definition at line 179 of file GltfLoader.h.


The documentation for this struct was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Mesh/GltfLoader.h