Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
mouserayutil.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
math/vec2.h
"
13
#include "
math/mat4.h
"
14
#include "
math/line.h
"
15
16
//------------------------------------------------------------------------------
17
namespace
RenderUtil
18
{
19
class
MouseRayUtil
20
{
21
public
:
23
static
Math::line
ComputeWorldMouseRay
(
const
Math::vec2
& mousePos,
float
length
,
const
Math::mat4
& invViewMatrix,
const
Math::mat4
& invProjMatrix,
float
nearPlane);
25
static
Math::line
ComputeWorldMouseRayOrtho
(
const
Math::vec2
& mousePos,
float
length
,
const
Math::mat4
& invViewMatrix,
const
Math::mat4
& invProjMatrix,
float
nearPlane);
26
};
27
28
}
// namespace RenderUtil
29
//------------------------------------------------------------------------------
30
Math::line
A line in 3d space.
Definition
line.h:22
RenderUtil::MouseRayUtil
Helper class to compute a world-space ray from mouse coords.
Definition
mouserayutil.h:20
RenderUtil::MouseRayUtil::ComputeWorldMouseRay
static Math::line ComputeWorldMouseRay(const Math::vec2 &mousePos, float length, const Math::mat4 &invViewMatrix, const Math::mat4 &invProjMatrix, float nearPlane)
compute world-space ray from mouse position (mouse position is expected in the range 0....
Definition
mouserayutil.cc:20
RenderUtil::MouseRayUtil::ComputeWorldMouseRayOrtho
static Math::line ComputeWorldMouseRayOrtho(const Math::vec2 &mousePos, float length, const Math::mat4 &invViewMatrix, const Math::mat4 &invProjMatrix, float nearPlane)
compute world-space ray from mouse position (mouse position is expected in the range 0....
Definition
mouserayutil.cc:44
line.h
mat4.h
Math::length
__forceinline scalar length(const quat &q)
Definition
quat.h:260
RenderUtil
Helpers to create geometry.
Definition
drawfullscreenquad.cc:10
Math::mat4
A 4x4 single point precision float matrix.
Definition
mat4.h:49
Math::vec2
A 2-component float vector class.
Definition
vec2.h:21
vec2.h
code
render
renderutil
mouserayutil.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.