Nebula
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//------------------------------------------------------------------------------
17namespace RenderUtil
18{
20{
21public:
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
A line in 3d space.
Definition line.h:22
Helper class to compute a world-space ray from mouse coords.
Definition mouserayutil.h:20
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
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
__forceinline scalar length(const quat &q)
Definition quat.h:259
Helpers to create geometry.
Definition drawfullscreenquad.cc:10
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 2-component float vector class.
Definition vec2.h:21