SimpleFastOpenAtomicVisualiser
|
Extract command line arguments. More...
#include <commandLine.h>
Public Member Functions | |
CommandLine ()=default | |
CommandLine (uint8_t count, char **commandLine) | |
Extract values from argv. | |
int | lua_setOption (lua_State *lua) |
Set an option from Lua. | |
int | lua_getOption (lua_State *lua) |
Get an option value in Lua. | |
void | checkSpecial (std::string arg) |
Determine if help or licenses should be printed. | |
void | welcome () const |
void | help () const |
Print the help message and std::exit(EXIT_SUCCESS);. | |
void | licenses () |
void | gpl () |
Public Attributes | |
Argument< std::filesystem::path > | structure = {"atoms", "Structure path.", "", {}} |
Argument< std::filesystem::path > | script = {"script", "Path to Lua script", "Called each frame.", {}} |
Argument< uint8_t > | levelOfDetail = {"levelOfDetail", "Level of detail of meshes.", "", 0} |
Argument< uint8_t > | msaa = {"msaa", "MSAA level [0-32].", "", 0} |
Argument< uint8_t > | speed = {"speed", "Play speed between 1 and 60.", "", 60} |
Argument< BASE_MESH > | mesh = {"mesh", "Procedural mesh type.", "", BASE_MESH::ANY} |
Argument< float > | bondCutoff = {"bondCutOff","Cutoff to create a bond.", "", 0.0f} |
Argument< float > | bondSize = {"bondSize", "Size of bonds.", "", 1.0f} |
Argument< float > | atomSize = {"atomSize", "Global atom size scaling factor.", "", 1.0f} |
Argument< float > | globalAtomAlpha = {"globalAtomAlpha", "Alpha colour multiplier for atoms", "", 1.0f} |
Argument< float > | globalBondAlpha = {"globalBondAlpha", "Alpha colour multiplier for bonds", "", 1.0f} |
Argument< float > | deemphasisAlpha = {"deemphasisAlpha", "Alpha colour for deemphasised atoms.", "", 0.25f} |
Argument< float > | atomClipCorrection = {"atomClipCorrection", "Correction for atom impostors.", "Increase if atoms clipped.", 1.5f} |
Argument< float > | bondClipCorrection = {"bondClipCorrection", "Correction for bond impostors.", "Increase if atoms clipped.", 5.0f} |
Argument< std::filesystem::path > | colourmap = {"colourmap", "The colourmap path.", "", {}} |
Argument< std::filesystem::path > | atomColours = {"atomColours", "Path for per-atom colour overrides.", "", {}} |
Argument< vec< 2 > > | resolution = {"resolution", "Window resolution in pixels.", "", {512, 512}} |
Argument< uint64_t > | bondFocus = {"bondFocus", "Only draw bonds for this atom.", "", NULL_INDEX} |
Argument< uint64_t > | focus = {"focus", "Centre on a particular atom.", "", NULL_INDEX} |
Argument< bool > | meshes = {"meshes", "Use meshes for atoms.", "Toggleable at runtime.", false} |
Argument< bool > | hideAtoms = {"hideAtoms", "Hide atoms.", "Toggleable at runtime.", false} |
Argument< bool > | showAxes = {"showAxes", "Show the coordinate axes.", "Toggleable at runtime.", false} |
Argument< bool > | showCell = {"showCell", "Show the simulation cell.", "Toggleable at runtime.", false} |
Argument< bool > | hideInfoText = {"hideInfoText", "Hide information and statistics text.", "Toggleable at runtime.", false} |
Argument< bool > | play = {"play", "Play trajectory.", "Toggleable at runtime.", false} |
Argument< bool > | noCentering = {"noCentering", "Do not centre the atoms", "Toggleable at runtime.", false} |
Argument< bool > | darkTheme = {"darkTheme", "Use dark theme", "Toggleable at runtime.", false} |
Argument< bool > | noTransparencySorting = {"noTransparencySorting", "Disable transparency sorting.", "Toggleable at runtime.", false} |
Argument< bool > | sizeByMass = {"sizeByMass", "Size elements by mass.", "Toggleable at runtime.", false} |
const char * | banner |
The text banner. | |
const char * | ossLicenses |
The OSS licenses. | |
const char * | GPL |
GPL v2 license text. | |
Extract command line arguments.
|
default |
Extract values from argv.
count | the size of commandLine. |
commandLine | the value of argv. |
|
inline |
Determine if help or licenses should be printed.
arg | the argument to check. |
|
inline |
|
inline |
Print the help message and std::exit(EXIT_SUCCESS);.
|
inline |
Get an option value in Lua.
lua | the Lua context. |
Set an option from Lua.
lua | the Lua context. |
|
inline |
Argument<float> CommandLine::atomClipCorrection = {"atomClipCorrection", "Correction for atom impostors.", "Increase if atoms clipped.", 1.5f} |
Argument<std::filesystem::path> CommandLine::atomColours = {"atomColours", "Path for per-atom colour overrides.", "", {}} |
The text banner.
Argument<float> CommandLine::bondClipCorrection = {"bondClipCorrection", "Correction for bond impostors.", "Increase if atoms clipped.", 5.0f} |
Argument<uint64_t> CommandLine::bondFocus = {"bondFocus", "Only draw bonds for this atom.", "", NULL_INDEX} |
Argument<std::filesystem::path> CommandLine::colourmap = {"colourmap", "The colourmap path.", "", {}} |
Argument<bool> CommandLine::darkTheme = {"darkTheme", "Use dark theme", "Toggleable at runtime.", false} |
Argument<float> CommandLine::deemphasisAlpha = {"deemphasisAlpha", "Alpha colour for deemphasised atoms.", "", 0.25f} |
Argument<uint64_t> CommandLine::focus = {"focus", "Centre on a particular atom.", "", NULL_INDEX} |
Argument<float> CommandLine::globalAtomAlpha = {"globalAtomAlpha", "Alpha colour multiplier for atoms", "", 1.0f} |
Argument<float> CommandLine::globalBondAlpha = {"globalBondAlpha", "Alpha colour multiplier for bonds", "", 1.0f} |
Argument<bool> CommandLine::hideAtoms = {"hideAtoms", "Hide atoms.", "Toggleable at runtime.", false} |
Argument<bool> CommandLine::hideInfoText = {"hideInfoText", "Hide information and statistics text.", "Toggleable at runtime.", false} |
Argument<uint8_t> CommandLine::levelOfDetail = {"levelOfDetail", "Level of detail of meshes.", "", 0} |
Argument<BASE_MESH> CommandLine::mesh = {"mesh", "Procedural mesh type.", "", BASE_MESH::ANY} |
Argument<bool> CommandLine::meshes = {"meshes", "Use meshes for atoms.", "Toggleable at runtime.", false} |
Argument<bool> CommandLine::noCentering = {"noCentering", "Do not centre the atoms", "Toggleable at runtime.", false} |
Argument<bool> CommandLine::noTransparencySorting = {"noTransparencySorting", "Disable transparency sorting.", "Toggleable at runtime.", false} |
Argument<vec<2> > CommandLine::resolution = {"resolution", "Window resolution in pixels.", "", {512, 512}} |
Argument<std::filesystem::path> CommandLine::script = {"script", "Path to Lua script", "Called each frame.", {}} |
Argument<bool> CommandLine::showAxes = {"showAxes", "Show the coordinate axes.", "Toggleable at runtime.", false} |
Argument<bool> CommandLine::showCell = {"showCell", "Show the simulation cell.", "Toggleable at runtime.", false} |
Argument<bool> CommandLine::sizeByMass = {"sizeByMass", "Size elements by mass.", "Toggleable at runtime.", false} |
Argument<std::filesystem::path> CommandLine::structure = {"atoms", "Structure path.", "", {}} |