Files
geant4/source/externals/g4tools/include/tools/curve
T
2021-06-25 16:12:29 +02:00

64 lines
1.2 KiB
Plaintext

// Copyright (C) 2010, Guy Barrand. All rights reserved.
// See the file tools.license for terms.
#ifndef tools_curve
#define tools_curve
#include "scast"
#include "S_STRING"
#ifdef TOOLS_MEM
#include "mem"
#endif
#include "lina/vec3f"
#include "lina/mat4f"
namespace tools {
class curve {
public:
TOOLS_SCLASS(tools::curve)
virtual void* cast(const std::string& a_class) const {
if(void* p = cmp_cast<curve>(this,a_class)) {return p;}
return 0;
}
public:
virtual void copy(curve*&) const = 0;
public:
virtual bool pos_tan_nor(float a_s,
vec3f& a_pos,
vec3f& a_tan,
vec3f& a_nor) const = 0;
public:
curve(){
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
m_model.set_identity();
}
virtual ~curve(){
#ifdef TOOLS_MEM
mem::decrement(s_class().c_str());
#endif
}
public:
curve(const curve& a_from):m_model(a_from.m_model){
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
}
curve& operator=(const curve& a_from){
m_model = a_from.m_model;
return *this;
}
public:
void set_model_matrix(const mat4f& a_m) {m_model = a_m;}
protected:
mat4f m_model;
};
}
#endif