shapeworks::ShapeworksUtils
Public Functions
Name | |
---|---|
time_point | now() get the current time |
double | elapsed(time_point start, time_point end, bool print_elapsed =true) return elapsed time in seconds, optionally printing to console |
unsigned | rngSeed() returns random seed |
void | setRngSeed(const unsigned seed) sets random seed |
unsigned | generateNumber() generates random number |
bool | is_directory(const std::string & pathname) returns true if pathname is a directory |
bool | exists(const std::string & filename) returns true if filename exists |
Matrix33 | getMatrix(const vtkSmartPointer< vtkMatrix4x4 > & mat) converts a vtkMatrix4x4 to a Matrix33 and corresponding translationVector |
Vector3 | getOffset(const vtkSmartPointer< vtkMatrix4x4 > & mat) |
Public Functions Documentation
function now
static inline time_point now()
get the current time
function elapsed
static double elapsed(
time_point start,
time_point end,
bool print_elapsed =true
)
return elapsed time in seconds, optionally printing to console
function rngSeed
static inline unsigned rngSeed()
returns random seed
function setRngSeed
static void setRngSeed(
const unsigned seed
)
sets random seed
function generateNumber
static inline unsigned generateNumber()
generates random number
function is_directory
static bool is_directory(
const std::string & pathname
)
returns true if pathname is a directory
function exists
static bool exists(
const std::string & filename
)
returns true if filename exists
function getMatrix
static Matrix33 getMatrix(
const vtkSmartPointer< vtkMatrix4x4 > & mat
)
converts a vtkMatrix4x4 to a Matrix33 and corresponding translationVector
function getOffset
static Vector3 getOffset(
const vtkSmartPointer< vtkMatrix4x4 > & mat
)
Updated on 2022-07-23 at 16:40:06 -0600