Skylicht Engine
Loading...
Searching...
No Matches
CPhysicsRaycast.h
1/*
2!@
3MIT License
4
5Copyright (c) 2024 Skylicht Technology CO., LTD
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
8(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
9merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
10subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
17WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19
20This file is part of the "Skylicht Engine".
21https://github.com/skylicht-lab/skylicht-engine
22!#
23*/
24
25#pragma once
26
27#include "Collider/CCollider.h"
28#include "RigidBody/CRigidbody.h"
29
30namespace Skylicht
31{
32 namespace Physics
33 {
50
67 }
68}
Base class for all collision shapes.
Definition CCollider.h:47
Represents a physical rigid body in the physics simulation.
Definition CRigidbody.h:77
Self reallocating template array (like stl vector) with additional features.
Definition irrArray.h:23
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
Result structure for a raycast that returns all hits.
Definition CPhysicsRaycast.h:39
core::vector3df RayToWorld
Ray end position in world space.
Definition CPhysicsRaycast.h:44
core::array< CCollider * > Colliders
Array of colliders hit by the ray.
Definition CPhysicsRaycast.h:40
core::array< float > HitFractions
Hit fractions (0 to 1) along the ray.
Definition CPhysicsRaycast.h:48
core::array< CRigidbody * > Bodies
Array of rigid bodies hit by the ray.
Definition CPhysicsRaycast.h:41
core::array< core::vector3df > HitPointWorld
Hit positions in world space.
Definition CPhysicsRaycast.h:47
core::vector3df RayFromWorld
Ray start position in world space.
Definition CPhysicsRaycast.h:43
core::array< core::vector3df > HitNormalWorld
Normals at hit points in world space.
Definition CPhysicsRaycast.h:46
Result structure for a raycast that returns only the closest hit.
Definition CPhysicsRaycast.h:56
CRigidbody * Body
Closest rigid body hit by the ray.
Definition CPhysicsRaycast.h:58
core::vector3df HitNormalWorld
Normal at the hit point in world space.
Definition CPhysicsRaycast.h:64
core::vector3df RayFromWorld
Ray start position in world space.
Definition CPhysicsRaycast.h:62
float ClosestHitFraction
Closest hit fraction (0 to 1) along the ray.
Definition CPhysicsRaycast.h:60
core::vector3df HitPointWorld
Hit position in world space.
Definition CPhysicsRaycast.h:65
core::vector3df RayToWorld
Ray end position in world space.
Definition CPhysicsRaycast.h:63
CCollider * Collider
Closest collider hit by the ray.
Definition CPhysicsRaycast.h:57