UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
wall.hh
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// Modified version of Voro++'s source file
3
4// Voro++, a 3D cell-based Voronoi library
5//
6// Author : Chris H. Rycroft (LBL / UC Berkeley)
7// Email : chr@alum.mit.edu
8// Date : August 30th 2011
9
13#ifndef VOROPP_WALL_HH
14#define VOROPP_WALL_HH
15
16#include "cell.hh"
17#include "container.hh"
18
19namespace voro {
20
24struct wall_sphere : public wall {
25 public:
32 wall_sphere(double xc_,double yc_,double zc_,double rc_,int w_id_=-99)
33 : w_id(w_id_), xc(xc_), yc(yc_), zc(zc_), rc(rc_) {}
34 bool point_inside(double x,double y,double z) const;
35 template<class v_cell>
36 bool cut_cell_base(v_cell &c,double x,double y,double z) const;
37 bool cut_cell(voronoicell &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
38 bool cut_cell(voronoicell_neighbor &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
39 private:
40 const int w_id;
41 const double xc,yc,zc,rc;
42};
43
47struct wall_plane : public wall {
48 public:
54 wall_plane(double xc_,double yc_,double zc_,double ac_,int w_id_=-99)
55 : w_id(w_id_), xc(xc_), yc(yc_), zc(zc_), ac(ac_) {}
56 bool point_inside(double x,double y,double z) const;
57 template<class v_cell>
58 bool cut_cell_base(v_cell &c,double x,double y,double z) const;
59 bool cut_cell(voronoicell &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
60 bool cut_cell(voronoicell_neighbor &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
61 private:
62 const int w_id;
63 const double xc,yc,zc,ac;
64};
65
69struct wall_cylinder : public wall {
70 public:
79 wall_cylinder(double xc_,double yc_,double zc_,double xa_,double ya_,double za_,double rc_,int w_id_=-99)
80 : w_id(w_id_), xc(xc_), yc(yc_), zc(zc_), xa(xa_), ya(ya_), za(za_),
81 asi(1/(xa_*xa_+ya_*ya_+za_*za_)), rc(rc_) {}
82 bool point_inside(double x,double y,double z) const;
83 template<class v_cell>
84 bool cut_cell_base(v_cell &c,double x,double y,double z) const;
85 bool cut_cell(voronoicell &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
86 bool cut_cell(voronoicell_neighbor &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
87 private:
88 const int w_id;
89 const double xc,yc,zc,xa,ya,za,asi,rc;
90};
91
92
96struct wall_cone : public wall {
97 public:
106 wall_cone(double xc_,double yc_,double zc_,double xa_,double ya_,double za_,double ang,int w_id_=-99)
107 : w_id(w_id_), xc(xc_), yc(yc_), zc(zc_), xa(xa_), ya(ya_), za(za_),
108 asi(1/(xa_*xa_+ya_*ya_+za_*za_)),
109 gra(tan(ang)), sang(sin(ang)), cang(cos(ang)) {}
110 bool point_inside(double x,double y,double z) const;
111 template<class v_cell>
112 bool cut_cell_base(v_cell &c,double x,double y,double z) const;
113 bool cut_cell(voronoicell &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
114 bool cut_cell(voronoicell_neighbor &c,double x,double y,double z) const {return cut_cell_base(c,x,y,z);}
115 private:
116 const int w_id;
117 const double xc,yc,zc,xa,ya,za,asi,gra,sang,cang;
118};
119
120}
121
122#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Header file for the voronoicell and related classes.
Extension of the voronoicell_base class to represent a Voronoi cell with neighbor information.
Definition cell.hh:327
Extension of the voronoicell_base class to represent a Voronoi cell without neighbor information.
Definition cell.hh:222
Pure virtual class from which wall objects are derived.
Definition container.hh:34
Header file for the container_base and related classes.
Definition c_loops.cc:15
A class representing a conical wall object.
Definition wall.hh:96
bool cut_cell(voronoicell &c, double x, double y, double z) const
Definition wall.hh:113
bool cut_cell(voronoicell_neighbor &c, double x, double y, double z) const
Definition wall.hh:114
wall_cone(double xc_, double yc_, double zc_, double xa_, double ya_, double za_, double ang, int w_id_=-99)
Definition wall.hh:106
bool point_inside(double x, double y, double z) const
Definition wall.cc:91
bool cut_cell_base(v_cell &c, double x, double y, double z) const
Definition wall.cc:109
A class representing a cylindrical wall object.
Definition wall.hh:69
wall_cylinder(double xc_, double yc_, double zc_, double xa_, double ya_, double za_, double rc_, int w_id_=-99)
Definition wall.hh:79
bool cut_cell_base(v_cell &c, double x, double y, double z) const
Definition wall.cc:77
bool cut_cell(voronoicell &c, double x, double y, double z) const
Definition wall.hh:85
bool point_inside(double x, double y, double z) const
Definition wall.cc:61
bool cut_cell(voronoicell_neighbor &c, double x, double y, double z) const
Definition wall.hh:86
A class representing a plane wall object.
Definition wall.hh:47
bool cut_cell(voronoicell_neighbor &c, double x, double y, double z) const
Definition wall.hh:60
bool cut_cell_base(v_cell &c, double x, double y, double z) const
Definition wall.cc:53
bool point_inside(double x, double y, double z) const
Definition wall.cc:44
wall_plane(double xc_, double yc_, double zc_, double ac_, int w_id_=-99)
Definition wall.hh:54
bool cut_cell(voronoicell &c, double x, double y, double z) const
Definition wall.hh:59
A class representing a spherical wall object.
Definition wall.hh:24
bool cut_cell(voronoicell &c, double x, double y, double z) const
Definition wall.hh:37
bool point_inside(double x, double y, double z) const
Definition wall.cc:20
bool cut_cell(voronoicell_neighbor &c, double x, double y, double z) const
Definition wall.hh:38
wall_sphere(double xc_, double yc_, double zc_, double rc_, int w_id_=-99)
Definition wall.hh:32
bool cut_cell_base(v_cell &c, double x, double y, double z) const
Definition wall.cc:32