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,32 +13,33 @@ namespace tools {
namespace sg {
class matrix_action : public win_action,public states {
TOOLS_ACTION(matrix_action,tools::sg::matrix_action,win_action)
public:
matrix_action(std::ostream& a_out,unsigned int a_ww,unsigned int a_wh)
:win_action(a_out,a_ww,a_wh)
:parent(a_out,a_ww,a_wh)
,states(a_ww,a_wh)
,m_cur(0)
,m_landscape(true)
,m_landscape(true)
{
m_projs.resize(5);
m_models.resize(5);
m_models.resize(5);
reset();
m_identity.set_identity();
}
virtual ~matrix_action(){}
public:
matrix_action(const matrix_action& a_from)
:win_action(a_from)
:parent(a_from)
,states(a_from)
,m_projs(a_from.m_projs)
,m_models(a_from.m_models)
,m_cur(a_from.m_cur)
,m_landscape(a_from.m_landscape)
,m_landscape(a_from.m_landscape)
{
m_identity.set_identity();
}
matrix_action& operator=(const matrix_action& a_from){
win_action::operator=(a_from);
parent::operator=(a_from);
states::operator=(a_from);
m_projs = a_from.m_projs;
m_models = a_from.m_models;
@@ -50,11 +51,11 @@ public:
void push_matrices() {
if((m_cur+1)>=(int)m_projs.size()) {
m_projs.resize(m_projs.size()+5);
m_models.resize(m_models.size()+5);
m_models.resize(m_models.size()+5);
}
m_cur++;
m_projs[m_cur].set_matrix(m_projs[m_cur-1]);
m_models[m_cur].set_matrix(m_models[m_cur-1]);
m_models[m_cur].set_matrix(m_models[m_cur-1]);
//OPTIMIZATION : in fact the two lines below are not needed !
// m_state.m_proj = m_projs[m_cur];
// m_state.m_model = m_models[m_cur];
@@ -85,6 +86,12 @@ public:
return true;
}
// bool project_normal(float& a_x,float& a_y,float& a_z) {
// model_matrix().mul_dir_3f(a_x,a_y,a_z);
// projection_matrix().mul_dir_3f(a_x,a_y,a_z);
// return true;
// }
void model_point(float& a_x,float& a_y,float& a_z,float& a_w) {
a_w = 1;
model_matrix().mul_4f(a_x,a_y,a_z,a_w);