Add a LocalCoord::rotate method as suggested by @pshriwise

This commit is contained in:
Paul Romano 2019-05-29 15:09:12 -05:00
parent 1bdb92ff10
commit 11eb891e21
3 changed files with 18 additions and 10 deletions

View file

@ -9,6 +9,7 @@
#include <memory> // for unique_ptr
#include <sstream>
#include <string>
#include <vector>
#include "openmc/constants.h"
#include "openmc/position.h"
@ -38,7 +39,13 @@ constexpr double CACHE_INVALID {-1.0};
// Class declarations
//==============================================================================
struct LocalCoord {
class LocalCoord {
public:
void rotate(const std::vector<double>& rotation);
//! clear data from a single coordinate level
void reset();
Position r; //!< particle position
Direction u; //!< particle direction
int cell {-1};
@ -48,9 +55,6 @@ struct LocalCoord {
int lattice_y {-1};
int lattice_z {-1};
bool rotated {false}; //!< Is the level rotated?
//! clear data from a single coordinate level
void reset();
};
//==============================================================================