Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
Raycaster::Hit Struct Reference

#include <Raycaster.hpp>

Public Member Functions

 Hit ()
 
 Hit (float distance, float uu, float vv, unsigned long lid, unsigned long mid)
 

Public Attributes

bool hit
 Denote if there has been a hit.
 
float dist
 Distance from the ray origin to the hit location.
 
float u
 First barycentric coordinate.
 
float v
 Second barycentric coordinate.
 
float w
 Third barycentric coordinate.
 
unsigned long localId
 Position of the hit triangle first vertex in the mesh index buffer.
 
unsigned long meshId
 Index of the mesh hit by the ray.
 

Private Attributes

unsigned long internalId
 Index of the triangle in the raycaster internal primitive list.
 

Friends

class RaycasterVisualisation
 For debug visualisation.
 

Detailed Description

Represent a hit event between a ray and the geometry.

Constructor & Destructor Documentation

◆ Hit() [1/2]

Raycaster::Hit::Hit ( )

Default constructor ('no hit' case).

◆ Hit() [2/2]

Raycaster::Hit::Hit ( float  distance,
float  uu,
float  vv,
unsigned long  lid,
unsigned long  mid 
)

Constructore ('hit' case).

Parameters
distancethe distance from the ray origin to the hit location
uufirst barycentric coordinate
vvsecond barycentric coordinate
lidposition of the hit triangle first vertex in the mesh index buffer
midindex of the mesh hit by the ray

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