FastUIDraw
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
i
j
l
m
n
o
p
r
s
t
u
v
w
+
Functions
a
b
c
d
f
g
i
l
m
n
o
p
r
s
t
u
+
Typedefs
c
d
f
i
p
r
u
v
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
a
b
c
d
f
i
l
m
n
r
s
t
u
v
+
Typedefs
b
c
d
f
i
j
n
p
r
s
t
v
+
Enumerations
a
b
c
d
e
f
g
h
i
j
m
o
p
q
r
s
t
u
v
w
z
+
Enumerator
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
z
Related Functions
+
Files
File List
+
File Members
+
All
f
o
+
Functions
f
o
Variables
+
Macros
f
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
inc
fastuidraw
util
pixel_distance_math.hpp
Go to the documentation of this file.
1
/*!
2
* \file pixel_distance_math.hpp
3
* \brief file pixel_distance_math.hpp
4
*
5
* Copyright 2016 by Intel.
6
*
7
* Contact: kevin.rogovin@gmail.com
8
*
9
* This Source Code Form is subject to the
10
* terms of the Mozilla Public License, v. 2.0.
11
* If a copy of the MPL was not distributed with
12
* this file, You can obtain one at
13
* http://mozilla.org/MPL/2.0/.
14
*
15
* \author Kevin Rogovin <kevin.rogovin@gmail.com>
16
*
17
*/
18
19
#ifndef FASTUIDRAW_PIXEL_DISTANCE_MATH_HPP
20
#define FASTUIDRAW_PIXEL_DISTANCE_MATH_HPP
21
22
#include <
fastuidraw/util/matrix.hpp
>
23
24
namespace
fastuidraw
25
{
26
/*!\addtogroup Utility
27
* @{
28
*/
29
/*!
30
* Given a direction and location in LOCAL coordinates and a
31
* distance value in pixel coordinates, return that distance
32
* value in local coordinates.
33
* \param distance distance value in pixel coordinates
34
* \param resolution resolution of viewport
35
* \param transformation_matrix transformation matrix from local
36
* coordinates to clip-coordinates
37
* \param point location in local coordinates
38
* \param direction direction in local coordinates
39
*/
40
float
41
local_distance_from_pixel_distance
(
float
distance,
42
const
vec2
&resolution,
43
const
float3x3
&transformation_matrix,
44
const
vec2
&point,
45
const
vec2
&direction);
46
47
/*! @} */
48
}
49
50
#endif
matrix.hpp
file matrix.hpp
fastuidraw
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition:
colorstop.hpp:28
fastuidraw::vec2
vecN< float, 2 > vec2
Definition:
vecN.hpp:1231
fastuidraw::local_distance_from_pixel_distance
float local_distance_from_pixel_distance(float distance, const vec2 &resolution, const float3x3 &transformation_matrix, const vec2 &point, const vec2 &direction)
fastuidraw::float3x3
matrix3x3< float > float3x3
Convenience typedef to matrix3x3<float>
Definition:
matrix.hpp:806
Generated by
1.8.13