Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
-51
View File
@@ -74,9 +74,6 @@ public:
virtual void render(render_action& a_action) {
_mult_matrix(a_action);
set_state(a_action);
//{mat4f& _mtx = a_action.projection_matrix();
// a_action.out() << "debug : tools::sg::base_camera::render : proj :" << std::endl;
// a_action.out() << _mtx << std::endl;}
a_action.load_proj_matrix(a_action.projection_matrix());
a_action.load_model_matrix(a_action.model_matrix());
}
@@ -108,16 +105,10 @@ protected:
,ds(0.99f)
,focal(1)
{
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
add_fields();
}
public:
virtual ~base_camera(){
#ifdef TOOLS_MEM
mem::decrement(s_class().c_str());
#endif
}
protected:
base_camera(const base_camera& a_from)
@@ -131,9 +122,6 @@ protected:
,ds(a_from.ds)
,focal(a_from.focal)
{
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
add_fields();
}
base_camera& operator=(const base_camera& a_from){
@@ -158,32 +146,22 @@ protected: //operators:
//we do not test dx,da,ds.
return true;
}
//bool operator!=(const base_camera& a_from) const {
// return !operator==(a_from);
//}
public:
void direction(vec3f& a_dir) const {
orientation.value().mul_vec(vec3f(0,0,-1),a_dir);
}
void rotate_around_direction(float a_delta) {
//vec3f dir;
//orientation.value().mul_vec(vec3f(0,0,-1),dir);
//orientation.value(rotf(dir,a_delta) * orientation.value());
orientation.value(rotf(vec3f(0,0,-1),a_delta) * orientation.value());
}
void rotate_around_z(float a_delta) {
//vec3f z;
//orientation.value().mul_vec(vec3f(0,0,1),z);
//orientation.value(rotf(z,a_delta) * orientation.value());
orientation.value(rotf(vec3f(0,0,1),a_delta) * orientation.value());
}
void rotate_around_up(float a_delta){
vec3f up;
orientation.value().mul_vec(vec3f(0,1,0),up);
//orientation.value(rotf(up,a_delta) * orientation.value());
// must be the below so that rot-cam works for exlib/cbk/[astro,cfitsio] astro setup.
// (astro setup change camera orientation).
orientation.value(orientation.value() * rotf(up,a_delta));
@@ -242,17 +220,6 @@ public:
orientation.value().mul_vec(vec3f(0,0,-1),dir);
orientation.value(orientation.value()*rotf(dir,a_dir));}
/*
//check that dir is on a_dir :
{vec3f dir;
orientation.value().mul_vec(vec3f(0,0,-1),dir);
float cos_angle; //it should be 1
if(!dir.cos_angle(a_dir,cos_angle)) {
::printf("debug : can't get angle\n");
return;
}
::printf("debug : cos_angle %g\n",cos_angle);}
*/
}
void pane_to(float a_x,float a_y,float a_z){
@@ -362,20 +329,6 @@ public:
r *= rotf(vec3f::s_y(),-a_dec*fdeg2rad());
r *= rotf(vec3f::s_z(),a_ra*fdeg2rad());
orientation = r;
/*
position = a_center*0.99f;
znear = 0.1f;
zfar = 200.0f;
focal = (a_center-position).length();
*/
/*
position = vec3f(0,0,0);
znear = 1.0f;
zfar = 2000.0f; //2*sky_radius.
focal = a_center.length();
da = 0.017f/100; //1/100 of a degree
*/
}
bool update_motion(int a_move) {
@@ -530,11 +483,7 @@ protected:
_state.m_proj = a_action.projection_matrix();
}
#if defined(TOOLS_MEM) && !defined(TOOLS_MEM_ATEXIT)
static const vec4<float>& id_orientation() {static const vec4<float> s_v(0,0,0,1,false);return s_v;}
#else
static const vec4<float>& id_orientation() {static const vec4<float> s_v(0,0,0,1);return s_v;}
#endif
protected:
//OPTIMIZATION :