Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
Loading...
Searching...
No Matches
RaycastResult Struct Reference

#include <definitions.hpp>

Public Member Functions

 RaycastResult ()
 

Public Attributes

PhysicsBodyphysicsBody
 
Vector2 normal = {0.0f, 0.0f}
 
Vector2 point = {0.0f, 0.0f}
 
float fraction = 0.0f
 
bool hit = false
 

Detailed Description

RaycastResult

RaycastResult defines the result of a Raycast.

It has properties such as physicsBody which dictates the PhysicsBody the raycast hit, point which dictates the point of the intersection and hit which dictates if the raycast actually hit anything.

Constructor & Destructor Documentation

◆ RaycastResult()

RaycastResult::RaycastResult ( )
inline

Member Data Documentation

◆ fraction

float RaycastResult::fraction = 0.0f

◆ hit

bool RaycastResult::hit = false

◆ normal

Vector2 RaycastResult::normal = {0.0f, 0.0f}

◆ physicsBody

PhysicsBody* RaycastResult::physicsBody

◆ point

Vector2 RaycastResult::point = {0.0f, 0.0f}

The documentation for this struct was generated from the following file: