Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
typed-geometry
Commits
e76242f6
Commit
e76242f6
authored
Jan 21, 2021
by
Philip Trettner
Browse files
Merge branch 'agrabowy' into 'develop'
Fixes from visual testing See merge request
!101
parents
a6c6371f
3f362346
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/typed-geometry/functions/objects/aabb.hh
View file @
e76242f6
...
...
@@ -25,7 +25,7 @@ template <int D, class ScalarT>
template
<
int
D
,
class
ScalarT
,
class
TraitsT
>
[[
nodiscard
]]
constexpr
aabb
<
D
,
ScalarT
>
aabb_of
(
aabb
<
D
,
ScalarT
,
TraitsT
>
const
&
b
)
{
return
b
;
return
aabb
<
D
,
ScalarT
>
(
b
)
;
}
template
<
int
D
,
class
ScalarT
,
class
TraitsT
>
...
...
src/typed-geometry/functions/objects/normal.hh
View file @
e76242f6
...
...
@@ -34,8 +34,8 @@ template <int D, class ScalarT>
return
h
.
normal
;
}
template
<
class
ScalarT
>
[[
nodiscard
]]
constexpr
dir
<
3
,
ScalarT
>
normal_of
(
sphere
<
2
,
ScalarT
,
3
>
const
&
d
)
template
<
class
ScalarT
,
class
TraitsT
>
[[
nodiscard
]]
constexpr
dir
<
3
,
ScalarT
>
normal_of
(
sphere
<
2
,
ScalarT
,
3
,
TraitsT
>
const
&
d
)
{
return
d
.
normal
;
}
...
...
src/typed-geometry/functions/random/uniform.hh
View file @
e76242f6
...
...
@@ -701,8 +701,9 @@ template <class ScalarT, class Rng>
template
<
class
BaseT
,
class
Rng
>
[[
nodiscard
]]
constexpr
pos
<
3
,
typename
BaseT
::
scalar_t
>
uniform
(
Rng
&
rng
,
pyramid
<
BaseT
>
const
&
p
)
{
using
ScalarT
=
typename
BaseT
::
scalar_t
;
const
auto
n
=
normal_of
(
p
.
base
);
const
auto
h
=
pow2
(
detail
::
uniform01
<
typename
BaseT
::
s
calar
_t
>
(
rng
));
const
auto
h
=
ScalarT
(
1
)
-
cbrt
(
detail
::
uniform01
<
S
calar
T
>
(
rng
));
const
auto
pBase
=
uniform
(
rng
,
p
.
base
);
return
mix
(
pBase
,
centroid_of
(
p
.
base
),
h
)
+
h
*
p
.
height
*
n
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment