Unravel Engine C++ Reference
Loading...
Searching...
No Matches
spherical_cone_mesh.cpp
Go to the documentation of this file.
1
#include "
spherical_cone_mesh.hpp
"
2
3
using namespace
generator
;
4
5
namespace
6
{
7
8
double
calcSize(
double
radius,
double
size
)
9
{
10
return
0.5 * std::sqrt(std::pow(2.0 *
size
, 2.0) - radius * radius);
11
}
12
}
// namespace
13
14
spherical_cone_mesh_t::spherical_cone_mesh_t
(
double
radius,
15
double
size
,
16
int
slices,
17
int
segments
,
18
int
rings,
19
double
start
,
20
double
sweep)
21
: translate_mesh_{{{radius, calcSize(radius,
size
), slices,
segments
,
start
, sweep},
22
{{{2.0 *
size
, slices, rings,
start
, sweep, 0.0, std::asin(radius / (2.0 *
size
))},
23
{0.0, 0.0, -calcSize(radius,
size
)}},
24
false
,
25
false
,
26
true
}},
27
{0.0, 0.0,
size
- calcSize(radius,
size
)}}
28
{
29
}
generator::spherical_cone_mesh_t::spherical_cone_mesh_t
spherical_cone_mesh_t(double radius=1.0, double size=1.0, int slices=32, int segments=8, int rings=4, double start=0.0, double sweep=gml::radians(360.0))
Definition
spherical_cone_mesh.cpp:14
generator
Definition
any_generator.hpp:7
start
std::vector< math::vec3 > start
Definition
particle_system_soa.cpp:366
segments
const segment_list * segments
Definition
text_component.cpp:442
spherical_cone_mesh.hpp
size
Definition
basetypes.hpp:43
size
float size
Definition
volume_resolver.cpp:31
engine
engine
rendering
generator
spherical_cone_mesh.cpp
Generated by
1.12.0