2001-11-27 18:50:04 -07:00
|
|
|
// command.h
|
|
|
|
//
|
|
|
|
// Copyright (C) 2001 Chris Laurel <claurel@shatters.net>
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
#ifndef _COMMAND_H_
|
|
|
|
#define _COMMAND_H_
|
|
|
|
|
2008-02-29 14:43:30 -07:00
|
|
|
#define MAX_CONSTELLATIONS 100
|
|
|
|
|
2019-10-08 14:00:19 -06:00
|
|
|
#include <array>
|
2021-03-03 13:03:41 -07:00
|
|
|
#include <iosfwd>
|
2021-12-22 10:45:22 -07:00
|
|
|
#include <string_view>
|
2009-10-04 08:12:59 -06:00
|
|
|
#include <celutil/color.h>
|
2019-10-14 09:08:53 -06:00
|
|
|
#include "execenv.h"
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
|
|
|
|
class Command
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
Command() = default;
|
|
|
|
virtual ~Command() = default;
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
virtual void process(ExecutionEnvironment&, double t, double dt) = 0;
|
|
|
|
virtual double getDuration() const = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::vector<Command*> CommandSequence;
|
|
|
|
|
|
|
|
|
|
|
|
class InstantaneousCommand : public Command
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
double getDuration() const override;
|
|
|
|
void process(ExecutionEnvironment& env, double /*t*/, double /*dt*/) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
virtual void process(ExecutionEnvironment&) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TimedCommand : public Command
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
TimedCommand(double _duration);
|
|
|
|
|
|
|
|
double getDuration() const override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double duration;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandWait : public TimedCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandWait(double _duration);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&, double t, double dt) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSelect : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSelect(std::string _target);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string target;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandGoto : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandGoto(double t,
|
|
|
|
double dist,
|
|
|
|
const Eigen::Vector3f &_up,
|
2018-07-28 12:40:23 -06:00
|
|
|
ObserverFrame::CoordinateSystem _upFrame);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double gotoTime;
|
|
|
|
double distance;
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3f up;
|
2008-02-08 14:46:02 -07:00
|
|
|
ObserverFrame::CoordinateSystem upFrame;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandGotoLongLat : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2006-07-10 00:53:11 -06:00
|
|
|
CommandGotoLongLat(double t,
|
|
|
|
double dist,
|
2021-03-03 13:03:41 -07:00
|
|
|
float _longitude,
|
|
|
|
float _latitude,
|
|
|
|
const Eigen::Vector3f &_up);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double gotoTime;
|
|
|
|
double distance;
|
|
|
|
float longitude;
|
|
|
|
float latitude;
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3f up;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-04-01 23:39:26 -07:00
|
|
|
class CommandGotoLocation : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandGotoLocation(double t,
|
2018-07-28 12:40:23 -06:00
|
|
|
const Eigen::Vector3d& translation,
|
|
|
|
const Eigen::Quaterniond& rotation);
|
|
|
|
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-04-01 23:39:26 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double gotoTime;
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3d translation;
|
|
|
|
Eigen::Quaterniond rotation;
|
2002-04-01 23:39:26 -07:00
|
|
|
};
|
|
|
|
|
Addition and overloading of cel script commands to work with cel:// urls.
New function:
** seturl
Arg: url (string)
Takes you to the location of the cel:// url.
Example:
seturl { url
"cel://Follow/Sol/2002-09-01T16:58:51.32378?x=AAAAAMCrktOdILb5/////w&y=CkxgAADEXts7E7HX/////w&z=VcpQAAAAAAAAAMIy/////w&ow=0.090610&ox=-0.494683&oy=0.860207&oz=-0.084397&select=Sol&fov=49.499992&ts=1.000000<d=0&rf=6043&lm=0"}
Overloaded functions:
** time
Arg: utc (string)
Sets the time according to the UTC date string in YYYY-MM-DDTHH:MM:SS.SSSSS
format.
Example:
time { utc "2002-09-01T16:58:51.32378" }
** setposition
Arg: x, y, z (string)
Sets the observer's position to the x, y, z coordinates encoded in Base64.
Example:
setposition {
x "AAAAAMCrktOdILb5/////w"
y "CkxgAADEXts7E7HX/////w"
z "VcpQAAAAAAAAAMIy/////w"
}
** setorientation
Arg: ow, ox, oy, oz (number)
Sets the observer's orientation to (ow, ox, oy, oz).
Example:
setorientation {
ow 0.090610
ox -0.494683
oy 0.860207
oz -0.084397
}
** gotoloc
Arg: time (number), x, y, z (string), ow, ox, oy, oz (number)
Travels to the coodinates (x, y, z) encoded in Base64 and sets the orientation
to (ow, ox, oy, oz) over time seconds.
Example:
gotoloc {
time 2
x "AAAAAMCrktOdILb5/////w"
y "CkxgAADEXts7E7HX/////w"
z "VcpQAAAAAAAAAMIy/////w"
ow 0.090610
ox -0.494683
oy 0.860207
oz -0.084397
}
2003-11-23 13:51:08 -07:00
|
|
|
class CommandSetUrl : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandSetUrl(std::string);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
Addition and overloading of cel script commands to work with cel:// urls.
New function:
** seturl
Arg: url (string)
Takes you to the location of the cel:// url.
Example:
seturl { url
"cel://Follow/Sol/2002-09-01T16:58:51.32378?x=AAAAAMCrktOdILb5/////w&y=CkxgAADEXts7E7HX/////w&z=VcpQAAAAAAAAAMIy/////w&ow=0.090610&ox=-0.494683&oy=0.860207&oz=-0.084397&select=Sol&fov=49.499992&ts=1.000000<d=0&rf=6043&lm=0"}
Overloaded functions:
** time
Arg: utc (string)
Sets the time according to the UTC date string in YYYY-MM-DDTHH:MM:SS.SSSSS
format.
Example:
time { utc "2002-09-01T16:58:51.32378" }
** setposition
Arg: x, y, z (string)
Sets the observer's position to the x, y, z coordinates encoded in Base64.
Example:
setposition {
x "AAAAAMCrktOdILb5/////w"
y "CkxgAADEXts7E7HX/////w"
z "VcpQAAAAAAAAAMIy/////w"
}
** setorientation
Arg: ow, ox, oy, oz (number)
Sets the observer's orientation to (ow, ox, oy, oz).
Example:
setorientation {
ow 0.090610
ox -0.494683
oy 0.860207
oz -0.084397
}
** gotoloc
Arg: time (number), x, y, z (string), ow, ox, oy, oz (number)
Travels to the coodinates (x, y, z) encoded in Base64 and sets the orientation
to (ow, ox, oy, oz) over time seconds.
Example:
gotoloc {
time 2
x "AAAAAMCrktOdILb5/////w"
y "CkxgAADEXts7E7HX/////w"
z "VcpQAAAAAAAAAMIy/////w"
ow 0.090610
ox -0.494683
oy 0.860207
oz -0.084397
}
2003-11-23 13:51:08 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string url;
|
|
|
|
};
|
|
|
|
|
2002-04-01 23:39:26 -07:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
class CommandCenter : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandCenter(double t);
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double centerTime;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandFollow : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSynchronous : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-03-21 10:48:40 -07:00
|
|
|
class CommandLock : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-03-21 10:48:40 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandChase : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-03-21 10:48:40 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-02-21 01:39:10 -07:00
|
|
|
class CommandTrack : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-02-21 01:39:10 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-04-01 23:39:26 -07:00
|
|
|
class CommandSetFrame : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2008-02-08 14:46:02 -07:00
|
|
|
CommandSetFrame(ObserverFrame::CoordinateSystem,
|
2018-09-22 07:13:49 -06:00
|
|
|
std::string, std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-04-01 23:39:26 -07:00
|
|
|
|
|
|
|
private:
|
2008-02-08 14:46:02 -07:00
|
|
|
ObserverFrame::CoordinateSystem coordSys;
|
2002-04-01 23:39:26 -07:00
|
|
|
std::string refObjectName;
|
|
|
|
std::string targetObjectName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-06-23 08:41:06 -06:00
|
|
|
class CommandSetSurface : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandSetSurface(std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-06-23 08:41:06 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string surfaceName;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
class CommandCancel : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-12-22 16:07:15 -07:00
|
|
|
class CommandExit : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2004-12-22 16:07:15 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
class CommandPrint : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2002-09-22 03:17:10 -06:00
|
|
|
CommandPrint(std::string, int horig, int vorig, int hoff, int voff,
|
2021-03-03 13:03:41 -07:00
|
|
|
float _duration);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string text;
|
2002-09-22 03:17:10 -06:00
|
|
|
int hOrigin;
|
|
|
|
int vOrigin;
|
|
|
|
int hOffset;
|
|
|
|
int vOffset;
|
|
|
|
double duration;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandClearScreen : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetTime : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetTime(double _jd);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double jd;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetTimeRate : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetTimeRate(double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double rate;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandChangeDistance : public TimedCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandChangeDistance(double _duration, double _rate);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&, double t, double dt) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double rate;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandOrbit : public TimedCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-07-28 12:40:23 -06:00
|
|
|
CommandOrbit(double _duration, const Eigen::Vector3f& axis, float rate);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&, double t, double dt) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3f spin;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandRotate : public TimedCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-07-28 12:40:23 -06:00
|
|
|
CommandRotate(double _duration, const Eigen::Vector3f& axis, float rate);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&, double t, double dt) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3f spin;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandMove : public TimedCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-07-28 12:40:23 -06:00
|
|
|
CommandMove(double _duration, const Eigen::Vector3d& _velocity);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&, double t, double dt) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Vector3d velocity;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetPosition : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetPosition(const UniversalCoord&);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
UniversalCoord pos;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetOrientation : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-07-28 12:40:23 -06:00
|
|
|
CommandSetOrientation(const Eigen::Quaternionf&);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
2018-07-28 12:40:23 -06:00
|
|
|
Eigen::Quaternionf orientation;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
2003-01-03 04:08:44 -07:00
|
|
|
class CommandLookBack : public InstantaneousCommand
|
2003-01-01 16:57:36 -07:00
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-01-01 16:57:36 -07:00
|
|
|
};
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
class CommandRenderFlags : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-11-13 13:31:07 -07:00
|
|
|
CommandRenderFlags(uint64_t _setFlags, uint64_t _clearFlags);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
2018-11-13 13:31:07 -07:00
|
|
|
uint64_t setFlags;
|
|
|
|
uint64_t clearFlags;
|
2001-11-27 18:50:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-02-29 14:43:30 -07:00
|
|
|
class CommandConstellations : public InstantaneousCommand
|
|
|
|
{
|
2018-09-22 07:13:49 -06:00
|
|
|
struct Flags
|
|
|
|
{
|
|
|
|
bool none:1;
|
|
|
|
bool all:1;
|
|
|
|
};
|
|
|
|
|
2008-02-29 14:43:30 -07:00
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
|
|
|
|
2021-12-22 10:45:22 -07:00
|
|
|
void setValues(std::string_view cons, bool act);
|
2018-09-22 07:13:49 -06:00
|
|
|
|
|
|
|
Flags flags { false, false };
|
|
|
|
|
|
|
|
private:
|
|
|
|
struct Cons
|
|
|
|
{
|
2021-03-03 13:03:41 -07:00
|
|
|
Cons(std::string name, bool active) :
|
|
|
|
name(std::move(name)),
|
|
|
|
active(active)
|
|
|
|
{}
|
|
|
|
std::string name;
|
|
|
|
bool active;
|
2018-09-22 07:13:49 -06:00
|
|
|
};
|
|
|
|
std::vector<Cons> constellations;
|
2008-02-29 14:43:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandConstellationColor : public InstantaneousCommand
|
|
|
|
{
|
2018-09-22 07:13:49 -06:00
|
|
|
struct Flags
|
|
|
|
{
|
|
|
|
bool none:1;
|
|
|
|
bool all:1;
|
|
|
|
bool unset:1;
|
|
|
|
};
|
|
|
|
|
2008-02-29 14:43:30 -07:00
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2021-12-22 10:45:22 -07:00
|
|
|
void setConstellations(std::string_view cons);
|
2018-03-11 07:12:58 -06:00
|
|
|
void setColor(float r, float g, float b);
|
|
|
|
void unsetColor();
|
2018-09-22 07:13:49 -06:00
|
|
|
|
|
|
|
Flags flags { false, false, false};
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<std::string> constellations;
|
2018-03-11 07:12:58 -06:00
|
|
|
Color rgb;
|
2008-02-29 14:43:30 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
class CommandLabels : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandLabels(int _setFlags, int _clearFlags);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2004-12-10 02:17:34 -07:00
|
|
|
private:
|
|
|
|
int setFlags;
|
|
|
|
int clearFlags;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandOrbitFlags : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandOrbitFlags(int _setFlags, int _clearFlags);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2004-12-10 02:17:34 -07:00
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
private:
|
|
|
|
int setFlags;
|
|
|
|
int clearFlags;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetVisibilityLimit : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetVisibilityLimit(double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2001-11-27 18:50:04 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double magnitude;
|
|
|
|
};
|
|
|
|
|
2002-12-11 13:31:08 -07:00
|
|
|
class CommandSetFaintestAutoMag45deg : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetFaintestAutoMag45deg(double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-12-11 13:31:08 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
double magnitude;
|
|
|
|
};
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2002-03-21 10:48:40 -07:00
|
|
|
class CommandSetAmbientLight : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetAmbientLight(float);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-03-21 10:48:40 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
float lightLevel;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-09-16 16:05:59 -06:00
|
|
|
class CommandSetGalaxyLightGain : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetGalaxyLightGain(float);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
float lightGain;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-04-25 21:49:59 -06:00
|
|
|
class CommandSet : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandSet(std::string, double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-04-25 21:49:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string name;
|
|
|
|
double value;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-05-02 01:57:38 -06:00
|
|
|
class CommandPreloadTextures : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandPreloadTextures(std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2002-05-02 01:57:38 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string name;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-02-04 03:40:47 -07:00
|
|
|
class CommandMark : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-05-22 01:10:05 -06:00
|
|
|
CommandMark(std::string, celestia::MarkerRepresentation, bool);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-02-04 03:40:47 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string target;
|
2021-05-22 01:10:05 -06:00
|
|
|
celestia::MarkerRepresentation rep;
|
2009-07-19 12:06:00 -06:00
|
|
|
bool occludable;
|
2003-02-04 03:40:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandUnmark : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandUnmark(std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-02-04 03:40:47 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string target;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-07-20 13:41:13 -06:00
|
|
|
class CommandUnmarkAll : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2003-07-20 13:41:13 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2004-12-22 16:07:15 -07:00
|
|
|
class CommandCapture : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandCapture(std::string, std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2004-12-22 16:07:15 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string type;
|
|
|
|
std::string filename;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-03-23 15:10:16 -06:00
|
|
|
class CommandSetTextureResolution : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetTextureResolution(unsigned int);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2009-03-23 15:10:16 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int res;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-06-18 05:20:01 -06:00
|
|
|
#ifdef USE_GLCONTEXT
|
2004-12-22 16:07:15 -07:00
|
|
|
class CommandRenderPath : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandRenderPath(GLContext::GLRenderPath);
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2004-12-22 16:07:15 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
GLContext::GLRenderPath path;
|
|
|
|
};
|
2019-06-18 05:20:01 -06:00
|
|
|
#endif
|
2004-12-22 16:07:15 -07:00
|
|
|
|
|
|
|
|
2008-09-16 16:05:59 -06:00
|
|
|
class CommandSplitView : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandSplitView(unsigned int, std::string, double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int view;
|
|
|
|
std::string splitType;
|
|
|
|
double splitPos;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandDeleteView : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandDeleteView(unsigned int);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int view;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSingleView : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetActiveView : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetActiveView(unsigned int);
|
2021-03-03 13:03:41 -07:00
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int view;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetRadius : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandSetRadius(std::string, double);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string object;
|
|
|
|
double radius;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetLineColor : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandSetLineColor(std::string, const Color&);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string item;
|
|
|
|
Color color;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CommandSetLabelColor : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandSetLabelColor(std::string, const Color&);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2008-09-16 16:05:59 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string item;
|
|
|
|
Color color;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-11-01 12:18:35 -07:00
|
|
|
class CommandSetTextColor : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandSetTextColor(const Color&);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2009-11-01 12:18:35 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
Color color;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2002-04-01 23:39:26 -07:00
|
|
|
class Execution;
|
|
|
|
|
|
|
|
class RepeatCommand : public Command
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RepeatCommand(CommandSequence* _body, int _repeatCount);
|
2021-03-03 13:03:41 -07:00
|
|
|
~RepeatCommand() override;
|
|
|
|
|
|
|
|
double getDuration() const override;
|
|
|
|
void process(ExecutionEnvironment& env, double t, double dt) override;
|
2002-04-01 23:39:26 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
CommandSequence* body;
|
2018-09-22 07:13:49 -06:00
|
|
|
double bodyDuration{ 0.0 };
|
2002-04-01 23:39:26 -07:00
|
|
|
int repeatCount;
|
2018-09-22 07:13:49 -06:00
|
|
|
Execution* execution{ nullptr };
|
2002-04-01 23:39:26 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-03-28 14:17:52 -06:00
|
|
|
class CommandScriptImage : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2021-03-03 13:03:41 -07:00
|
|
|
CommandScriptImage(float, float, float, float, const fs::path&, bool, std::array<Color, 4>&);
|
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2017-03-28 14:17:52 -06:00
|
|
|
|
|
|
|
private:
|
2021-03-03 13:03:41 -07:00
|
|
|
double duration;
|
2019-10-08 14:00:19 -06:00
|
|
|
float fadeafter;
|
2017-03-28 14:17:52 -06:00
|
|
|
float xoffset;
|
|
|
|
float yoffset;
|
2019-10-08 14:00:19 -06:00
|
|
|
fs::path filename;
|
2017-03-28 14:17:52 -06:00
|
|
|
int fitscreen;
|
2019-10-08 14:00:19 -06:00
|
|
|
std::array<Color, 4> colors;
|
2017-03-28 14:17:52 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
class CommandVerbosity : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
2018-09-22 07:13:49 -06:00
|
|
|
CommandVerbosity(int _level);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2017-03-28 14:17:52 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
int level;
|
|
|
|
};
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
|
2018-07-13 09:50:44 -06:00
|
|
|
class CommandSetWindowBordersVisible : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetWindowBordersVisible(bool _visible) : visible(_visible) {};
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2018-07-13 09:50:44 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
bool visible;
|
|
|
|
};
|
2018-11-12 12:31:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
class CommandSetRingsTexture : public InstantaneousCommand
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CommandSetRingsTexture(std::string, std::string, std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2018-11-12 12:31:22 -07:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string object, textureName, path;
|
|
|
|
};
|
|
|
|
|
2018-11-17 10:53:36 -07:00
|
|
|
|
2018-11-21 10:02:02 -07:00
|
|
|
class CommandLoadFragment : public InstantaneousCommand
|
2018-11-17 10:53:36 -07:00
|
|
|
{
|
|
|
|
public:
|
2018-11-21 10:02:02 -07:00
|
|
|
CommandLoadFragment(std::string, std::string, std::string);
|
2021-03-03 13:03:41 -07:00
|
|
|
|
|
|
|
void process(ExecutionEnvironment&) override;
|
2018-11-17 10:53:36 -07:00
|
|
|
|
|
|
|
private:
|
2018-11-21 10:02:02 -07:00
|
|
|
std::string type, fragment, dir;
|
2018-11-17 10:53:36 -07:00
|
|
|
};
|
|
|
|
|
2001-11-27 18:50:04 -07:00
|
|
|
#endif // _COMMAND_H_
|