Import Geant4 10.7.0 source tree

This commit is contained in:
Gabriele Cosmo
2020-12-04 12:30:43 +01:00
parent 67ba86d073
commit dab42d2018
3770 changed files with 226369 additions and 286486 deletions
+13 -8
View File
@@ -44,6 +44,8 @@ public:
,m_use_gsto(false)
,m_winding(winding_ccw)
,m_color(1,1,1,1)
,m_normal(0,0,1)
,m_light(0)
@@ -94,12 +96,13 @@ public:
,m_winding(a_from.m_winding)
,m_color(a_from.m_color)
,m_normal(a_from.m_normal)
,m_light(a_from.m_light)
,m_draw_type(a_from.m_draw_type)
,m_shade_model(a_from.m_shade_model)
,m_line_width(a_from.m_line_width)
,m_line_pattern(a_from.m_line_pattern)
,m_point_size(a_from.m_point_size)
@@ -136,6 +139,7 @@ public:
m_winding = a_from.m_winding;
m_color = a_from.m_color;
m_normal = a_from.m_normal;
m_light = a_from.m_light;
@@ -167,7 +171,7 @@ public:
a_z /= a_w;
return true;
}
void screen2ndc(int a_x,int a_y, //signed because of wall.
float& a_wcx,float& a_wcy,float& a_wcz,float& a_wcw) const {
// a proj point in near plane has (z,w) :
@@ -184,17 +188,17 @@ public:
float t = m_camera_znear;
a_wcx *= t;
a_wcy *= t;
a_wcz *= t;
a_wcz *= t;
a_wcw = t;
}
}
}
bool screen2wc(int a_x,int a_y, //signed because of wall.
float& a_wcx,float& a_wcy,float& a_wcz) const {
mat4f mtx = m_proj;
mtx.mul_mtx(m_model);
mat4f inv;
if(!mtx.invert(inv)) {a_wcx = 0;a_wcy = 0;a_wcz = 0;return false;}
if(!mtx.invert(inv)) {a_wcx = 0;a_wcy = 0;a_wcz = 0;return false;}
float w;
screen2ndc(a_x,a_y,a_wcx,a_wcy,a_wcz,w);
inv.mul_4f(a_wcx,a_wcy,a_wcz,w);
@@ -203,13 +207,13 @@ public:
a_wcy /= w;
a_wcz /= w;
return true;
}
}
bool screen2pwc(int a_x,int a_y, //signed because of wall.
float& a_wcx,float& a_wcy,float& a_wcz) const {
mat4f mtx = m_proj;
//mtx.mul_mtx(m_model);
mat4f inv;
if(!mtx.invert(inv)) {a_wcx = 0;a_wcy = 0;a_wcz = 0;return false;}
if(!mtx.invert(inv)) {a_wcx = 0;a_wcy = 0;a_wcz = 0;return false;}
float w;
screen2ndc(a_x,a_y,a_wcx,a_wcy,a_wcz,w);
inv.mul_4f(a_wcx,a_wcy,a_wcz,w);
@@ -218,7 +222,7 @@ public:
a_wcy /= w;
a_wcz /= w;
return true;
}
}
void camera_proj_only(mat4f& a_mtx) const {
float l = m_camera_lrbt[0];
float r = m_camera_lrbt[1];
@@ -253,6 +257,7 @@ public:
winding_type m_winding;
colorf m_color;
vec3f m_normal;
unsigned int m_light;