Single page documentation


IO Namespace

bool IO::SetClipboard(const string&in content)

Math Namespace

int Math::Abs(int i)
float Math::Abs(float f)
float Math::Acos(float f)
float Math::Angle(const vec2&in a, const vec2&in b)
float Math::Angle(const vec3&in a, const vec3&in b)
float Math::Asin(float f)
float Math::Atan(float f)
float Math::Atan2(float y, float x)
float Math::Ceil(float f)
float Math::Clamp(float x, float min, float max)
int Math::Clamp(int x, int min, int max)
float Math::Cos(float f)
float Math::Distance(const vec2&in a, const vec2&in b)
float Math::Distance(const vec3&in a, const vec3&in b)
float Math::Dot(const vec2&in a, const vec2&in b)
float Math::Dot(const vec3&in a, const vec3&in b)
float Math::Exp(float f)
float Math::Floor(float f)
bool Math::IsInf(float x)
bool Math::IsNaN(float x)
float Math::Log(float f)
float Math::Log10(float f)
float Math::Log2(float f)
float Math::Max(float x, float y)
int Math::Max(int x, int y)
float Math::Min(float x, float y)
int Math::Min(int x, int y)
float Math::Pow(float x, float y)
float Math::Rand(float min, float max)
int Math::Rand(int min, int max)
float Math::Round(float f)
float Math::Sin(float f)
float Math::Sqrt(float f)
float Math::Tan(float f)
float Math::ToDeg(float rad)
float Math::ToRad(float deg)
const double PI
const int INT_MIN
const int INT_MAX
const uint UINT_MAX
const uint64 UINT64_MAX

TM Namespace

class TM::HmsStateDyna {
// Properties quat Quat; iso4 Location; vec3 LinearSpeed; vec3 AddLinearSpeed; vec3 AngularSpeed; vec3 Force; vec3 Torque; vec3 InverseInertiaTensor; vec3 NotTweakedLinearSpeed; }
class TM::GameCtnChallenge {
// Methods string get_Name(); string get_Uid(); string get_Author(); }
class TM::PlayerCheckpoint {
// Behaviors ~TM::PlayerCheckpoint(); TM::PlayerCheckpoint(); // Methods TM::PlayerCheckpoint& opAssign(const TM::PlayerCheckpoint&in other); // Properties int Time; uint Score; }
class TM::PlayerInfo {
// Methods array<int>@ get_CheckpointStates(); array<TM::PlayerCheckpoint>@ get_Checkpoints(); // Properties uint Team; iso4 VehicleRespawnLoc; iso4 VehicleSpawnLoc; uint PrevRaceTime; int RaceTime; uint RaceStartTime; uint RaceBestTime; uint LapStartTime; uint LapTime; uint LapBestTime; uint MinRespawns; uint NbCompleted; uint MaxCompleted; uint StuntsScore; uint BestStuntsScore; uint CurCheckpoint; float AverageRank; uint CurrentRaceRank; uint CurrentRoundRank; uint CurrentTime; uint ReadyEnum; uint TMRoundNum; float OffsetFromBestAtCurrentCP; uint CurLapCheckpointCount; uint CurCheckpointCount; uint CurLap; bool RaceFinished; uint DisplaySpeed; bool FinishNotPassed; uint CountdownTime; }
class TM::SceneVehicleCar {
// Properties bool IsUpdateAsync; float InputGas; float InputBrake; float InputSteer; bool IsLightTrailsSet; bool IsNetworked; int Quality; float MaxLinearSpeed; int GearboxState; TM::SceneVehicleCar::VehicleCarState PrevSyncVehicleState; TM::SceneVehicleCar::VehicleCarState SyncVehicleState; TM::SceneVehicleCar::VehicleCarState AsyncVehicleState; TM::SceneVehicleCar::VehicleCarState PrevAsyncVehicleState; TM::SceneVehicleCar::Engine CarEngine; bool HasAnyLateralContact; uint LastHasAnyLateralContactTime; bool WaterForcesApplied; float TurningRate; float TurboBoostFactor; uint LastTurboTypeChangeTime; uint LastTurboTime; TM::SceneVehicleCar::TurboType Turbo; float RouletteValue01; bool IsFreeWheeling; bool IsSliding; uint WheelContactAbsorbCounter; TM::SceneVehicleCar::BurnoutState Burnout; vec3 CurrentLocalSpeed; vec3 TotalCentralForceAdded; bool IsRubberBall; iso4 SavedState; }
class TM::HmsDyna {
// Properties bool HasAngularVelictyLimit; float AngularVelocityLimit; TM::HmsStateDyna PreviousState; TM::HmsStateDyna CurrentState; TM::HmsStateDyna TempState; TM::HmsStateDyna@ RefStatePrevious; TM::HmsStateDyna@ RefStateCurrent; bool HasReplacement; int DynamicType; }
class TM::InputEventValue {
// Behaviors ~TM::InputEventValue(); TM::InputEventValue(); // Methods TM::InputEventValue& opAssign(const TM::InputEventValue&in other); bool get_Binary(); void set_Binary(bool value); int get_Analog(); void set_Analog(int value); // Properties int8 EventIndex; }
class TM::InputEvent {
// Behaviors ~TM::InputEvent(); TM::InputEvent(); // Methods TM::InputEvent& opAssign(const TM::InputEvent&in other); // Properties uint Time; TM::InputEventValue Value; }
class TM::InputEventBuffer {
// Methods void Add(const TM::InputEvent&in event); void Clear(); void RemoveAt(uint index, uint count = 1); uint get_Length(); TM::InputEvent& opIndex(uint index); const TM::InputEvent& opIndex(uint index); array<uint>@ Find(int inputTime = - 1, InputType type = InputType :: None, int value = Math :: INT_MAX); void Add(int time, InputType type, int value); EventIndices get_EventIndices(); string ToCommandsText(InputFormatFlags flags = InputFormatFlags :: Default); }
class TM::GameCamera {
// Methods string get_NameId(); vec3 get_Speed(); // Properties iso4 Location; float Fov; }
enum TM::PlugSurfaceMaterialId {
Concrete = 0,
Pavement = 1,
Grass = 2,
Ice = 3,
Metal = 4,
Sand = 5,
Dirt = 6,
Turbo = 7,
DirtRoad = 8,
Rubber = 9,
SlidingRubber = 10,
Test = 11,
Rock = 12,
Water = 13,
Wood = 14,
Danger = 15,
Asphalt = 16,
WetDirtRoad = 17,
WetAsphalt = 18,
WetPavement = 19,
WetGrass = 20,
Snow = 21,
ResonantMetal = 22,
GolfBall = 23,
GolfWall = 24,
GolfGround = 25,
Turbo2 = 26,
Bumper = 27,
NotCollidable = 28,
FreeWheeling = 29,
TurboRoulette = 30
}

TM::SceneVehicleCar Namespace

class TM::SceneVehicleCar::Engine {
// Properties float MaxRPM; float BrakingFactor; float ClampedRPM; float ActualRPM; float SlideFactor; int RearGear; int Gear; }
class TM::SceneVehicleCar::SurfaceHandler {
// Properties iso4 Location; }
class TM::SceneVehicleCar::SimulationWheel {
// Properties bool Steerable; TM::SceneVehicleCar::SurfaceHandler SurfaceHandler; vec3 OffsetFromVehicle; TM::SceneVehicleCar::SimulationWheel::RealTimeState RTState; vec3 ContactRelativeLocalDistance; TM::SceneVehicleCar::SimulationWheel::State PrevSyncWheelState; TM::SceneVehicleCar::SimulationWheel::State SyncWheelState; TM::SceneVehicleCar::SimulationWheel::State AsyncWheelState; }
class TM::SceneVehicleCar::VehicleCarState {
// Properties float RPM; int GearboxState; }
enum TM::SceneVehicleCar::BurnoutState {
None = 0,
Burnout = 1,
Donut = 2,
AfterBurnout = 3
}
enum TM::SceneVehicleCar::TurboType {
None = 0,
Normal = 1,
Roulette = 2
}

TM::SceneVehicleCar::SimulationWheel Namespace

class TM::SceneVehicleCar::SimulationWheel::State {
}
class TM::SceneVehicleCar::SimulationWheel::RealTimeState {
// Properties float DamperAbsorbVal; bool HasGroundContact; TM::PlugSurfaceMaterialId ContactMaterialId; bool IsSliding; vec3 RelativeRotZAxis; int NbGroundContacts; }

Text Namespace

string Text::FormatFloat(double val, const string&in options = "", uint width = 0, uint precision = 0)
string Text::FormatInt(int64 val, const string&in options = "", uint width = 0)
string Text::FormatUInt(uint64 val, const string&in options = "", uint width = 0)
string Text::Join(const array<string>&in, const string&in)
double Text::ParseFloat(const string&in, uint&out byteCount = 0)
int64 Text::ParseInt(const string&in, uint base = 10, uint&out byteCount = 0)
uint64 Text::ParseUInt(const string&in, uint base = 10, uint&out byteCount = 0)

Time Namespace

string Time::Format(int raceTimeMs)
string Time::FormatPrecise(double raceTimeSeconds)
uint64 Time::get_Now()
int Time::Parse(const string&in raceTime)

UI Namespace

bool UI::Begin(const string&in title, bool&inout open)
bool UI::Begin(const string&in title)
bool UI::BeginCombo(const string&in label, const string&in current)
bool UI::BeginDisabled(bool disabled = true)
bool UI::BeginTabBar(const string&in label)
bool UI::BeginTabItem(const string&in label)
bool UI::BeginTabItem(const string&in label, bool&out open)
bool UI::BeginTable(const string&in label, int columns)
bool UI::Button(const string&in label, const vec2&in size = vec2 ( ))
bool UI::Checkbox(const string&in label, bool active)
bool UI::CheckboxVar(const string&in label, const string&in variableName)
bool UI::CollapsingHeader(const string&in label)
bool UI::DragFloat3(const string&in label, vec3&inout value, float speed = 1.0f, float min = 0.0f, float max = 0.0f, const string&inout format = "%.3f")
bool UI::DragFloat3Var(const string&in label, const string&in variableName, float speed = 1.0f, float min = 0.0f, float max = 0.0f, const string&inout format = "%.3f")
void UI::Dummy(const vec2&in size)
bool UI::End()
float UI::InputFloat(const string&in label, float num, float step = 1.0f)
float UI::InputFloatVar(const string&in label, const string&in vairableName, float step = 1.0f)
int UI::InputInt(const string&in label, int num, int step = 1)
int UI::InputIntVar(const string&in label, const string&in variableName, int step = 1)
string UI::InputText(const string&in label, string str)
bool UI::InputTextMultiline(const string&in label, string&inout text, const vec2&in size = vec2 ( 0 , 0 ))
string UI::InputTextVar(const string&in label, const string&in variableName)
int UI::InputTime(const string&in label, int currentTime, int step = 100, int defaultTime = 0)
int UI::InputTimeVar(const string&in label, const string&in variableName, int step = 100, int defaultTime = 0)
void UI::PopID()
void UI::PushID(const string&in str)
void UI::PushItemWidth(float width)
bool UI::Selectable(const string&in label, bool selected)
void UI::SetNextWindowPos(const vec2&in size)
void UI::SetNextWindowSize(const vec2&in size)
float UI::SliderFloat(const string&in label, float num, float min, float max, const string&in format = "%.3f")
float UI::SliderFloatVar(const string&in label, const string&in variableName, float min, float max, const string&in format = "%.3f")
int UI::SliderInt(const string&in label, int num, int min, int max, const string&in format = "%d")
int UI::SliderIntVar(const string&in label, const string&in variableName, int min, int max, const string&in format = "%d")
void UI::TableHeader(const string&in label)
bool UI::TableSetColumnIndex(int column)
void UI::TableSetupColumn(const string&in label)
void UI::TableSetupScrollFreeze(int cols, int rows)
bool UI::Text(const string&in text)
bool UI::TextDimmed(const string&in text)
bool UI::TextWrapped(const string&in text)

global Namespace

class array<T> {
// Behaviors array<T>(); array<T>(uint size); ~array<T>(); // Methods array<T>& opAssign(const array<T>&in value); void Add(const T&in value); void InsertAt(uint index, const T&in value); uint get_Length(); const T& opIndex(uint index); T& opIndex(uint index); bool IsEmpty(); void RemoveAt(uint index, uint count = 1); void Clear(); void Resize(uint length); void SortAsc(); void SortDesc(); int Find(const T&in value); int Find(uint startAt, const T&in value); }
class string {
// Behaviors ~string(); string(); string(const string&in); // Methods string& opAssign(const string&in); string& opAddAssign(const string&in); bool opEquals(const string&in); int opCmp(const string&in); string opAdd(const string&in); void Resize(uint); uint get_Length(); void set_Length(uint); bool IsEmpty(); uint8& opIndex(uint); const uint8& opIndex(uint); string& opAssign(double); string& opAddAssign(double); string opAdd(double); string opAdd_r(double); string& opAssign(float); string& opAddAssign(float); string opAdd(float); string opAdd_r(float); string& opAssign(int64); string& opAddAssign(int64); string opAdd(int64); string opAdd_r(int64); string& opAssign(uint64); string& opAddAssign(uint64); string opAdd(uint64); string opAdd_r(uint64); string& opAssign(bool); string& opAddAssign(bool); string opAdd(bool); string opAdd_r(bool); string Substr(uint start = 0, int count = - 1); int FindFirst(const string&in, uint start = 0); int FindFirstOf(const string&in, uint start = 0); int FindFirstNotOf(const string&in, uint start = 0); int FindLast(const string&in, int start = - 1); int FindLastOf(const string&in, int start = - 1); int FindLastNotOf(const string&in, int start = - 1); void Insert(uint pos, const string&in other); void Erase(uint pos, int count = - 1); array<string>@ Split(const string&in); }
class dictionaryValue {
// Behaviors ~dictionaryValue(); dictionaryValue(); // Methods dictionaryValue& opAssign(const dictionaryValue&in); dictionaryValue& opHndlAssign(const ?&in); dictionaryValue& opHndlAssign(const dictionaryValue&in); dictionaryValue& opAssign(const ?&in); dictionaryValue& opAssign(double); dictionaryValue& opAssign(int64); void opCast(?&out); void opConv(?&out); int64 opConv(); double opConv(); }
class dictionary {
// Behaviors dictionary(); ~dictionary(); // Methods dictionary& opAssign(const dictionary&in); void Set(const string&in, const ?&in); bool Get(const string&in, ?&out); void Set(const string&in, const int64&in); bool Get(const string&in, int64&out); void Set(const string&in, const double&in); bool Get(const string&in, double&out); bool Exists(const string&in); bool IsEmpty(); uint GetSize(); bool Delete(const string&in); void DeleteAll(); array<string>@ GetKeys(); dictionaryValue& opIndex(const string&in); const dictionaryValue& opIndex(const string&in); }
class PluginInfo {
// Behaviors PluginInfo(); ~PluginInfo(); // Properties string Author; string Name; string Description; string Version; }
class vec2 {
// Behaviors ~vec2(); vec2(); vec2(float init); vec2(float x, float y); // Methods float Length(); float LengthSquared(); vec2 Normalized(); string ToString(); vec2 opAdd(const vec2&in); vec2 opAdd(const float&in); vec2& opAddAssign(const vec2&in); vec2& opAddAssign(const float&in); vec2 opSub(const vec2&in); vec2 opSub(const float&in); vec2& opSubAssign(const vec2&in); vec2& opSubAssign(const float&in); vec2 opDiv(const vec2&in); vec2 opDiv(const float&in); vec2& opDivAssign(const vec2&in); vec2& opDivAssign(const float&in); vec2 opMul(const vec2&in); vec2 opMul(const float&in); vec2& opMulAssign(const vec2&in); vec2& opMulAssign(const float&in); bool opEquals(const vec2&in other); vec2& opAssign(const vec2&in v); float& opIndex(uint index); // Properties float x; float y; }
class vec3 {
// Behaviors ~vec3(); vec3(); vec3(float init); vec3(float x, float y, float z); // Methods vec3& opAssign(const vec3&in v); float& opIndex(uint index); float Length(); float LengthSquared(); vec3 Normalized(); string ToString(); vec3 opAdd(const vec3&in); vec3 opAdd(const float&in); vec3& opAddAssign(const vec3&in); vec3& opAddAssign(const float&in); vec3 opSub(const vec3&in); vec3 opSub(const float&in); vec3& opSubAssign(const vec3&in); vec3& opSubAssign(const float&in); vec3 opDiv(const vec3&in); vec3 opDiv(const float&in); vec3& opDivAssign(const vec3&in); vec3& opDivAssign(const float&in); vec3 opMul(const vec3&in); vec3 opMul(const float&in); vec3& opMulAssign(const vec3&in); vec3& opMulAssign(const float&in); bool opEquals(const vec3&in other); // Properties float x; float y; float z; }
class mat2 {
// Behaviors ~mat2(); mat2(); // Methods mat2& opAssign(const mat2&in m); void SetIdentity(); void Transpose(); // Properties vec2 x; vec2 y; }
class mat3 {
// Behaviors ~mat3(); mat3(); // Methods mat3& opAssign(const mat3&in m); void GetYawPitchRoll(float&out yaw, float&out pitch, float&out roll); void SetIdentity(); void Transpose(); // Properties vec3 x; vec3 y; vec3 z; }
class quat {
// Behaviors ~quat(); quat(); quat(float x, float y, float z, float w); quat(const mat3&in m); // Methods quat& opAssign(const quat&in q); void GetYawPitchRoll(float&out yaw, float&out pitch, float&out roll); void SetYawPitchRoll(float yaw, float pitch, float roll); void SetIdentity(); void SetInverse(quat&in q); string ToString(); // Properties float w; float x; float y; float z; }
class iso4 {
// Behaviors ~iso4(); iso4(); // Methods iso4& opAssign(const iso4&in iso); // Properties mat3 Rotation; vec3 Position; }
class BFEvaluationInfo {
// Behaviors ~BFEvaluationInfo(); BFEvaluationInfo(); // Methods BFEvaluationInfo& opAssign(const BFEvaluationInfo&in other); // Properties BFPhase Phase; bool Rewinded; uint Iterations; }
class BFEvaluationResponse {
// Behaviors BFEvaluationResponse(); ~BFEvaluationResponse(); // Methods BFEvaluationResponse& opAssign(const BFEvaluationResponse&in other); // Properties BFEvaluationDecision Decision; int RewindTime; string ResultFileStartContent; }
class InputState {
// Behaviors ~InputState(); InputState(); // Methods InputState& opAssign(const InputState&in other); // Properties bool Left; bool Right; bool Up; bool Down; int Gas; int Steer; }
class EventIndices {
// Behaviors ~EventIndices(); EventIndices(); // Methods EventIndices& opAssign(const EventIndices&in other); // Properties int RaceRunningId; int FinishLineId; int AccelerateId; int BrakeId; int SteerLeftId; int SteerRightId; int SteerId; int GasId; int RespawnId; int HornId; }
class SimulationWheels {
// Methods TM::SceneVehicleCar::SimulationWheel@ opIndex(uint index); TM::SceneVehicleCar::SimulationWheel@ get_FrontLeft(); TM::SceneVehicleCar::SimulationWheel@ get_FrontRight(); TM::SceneVehicleCar::SimulationWheel@ get_BackRight(); TM::SceneVehicleCar::SimulationWheel@ get_BackLeft(); }
class SimulationState {
// Behaviors SimulationState(); ~SimulationState(); // Methods SimulationState& opAssign(const SimulationState&in other); TM::PlayerInfo@ get_PlayerInfo(); SimulationWheels@ get_Wheels(); TM::HmsDyna@ get_Dyna(); TM::SceneVehicleCar@ get_SceneVehicleCar(); // Properties ContextMode Mode; }
class SimulationManager {
// Methods void ForceFinish(); void SetInputState(InputType state, int value); InputState GetInputState(); void SetSpeed(float speed); void GiveUp(); void Respawn(); void Horn(); void RemoveStateValidation(); void PreventSimulationFinish(); SimulationState@ SaveState(); void RewindToState(SimulationState@ state, bool resetCamera = true); void SetSimulationTimeLimit(int timeMs); bool get_Running(); void set_Running(bool running); TM::PlayerInfo@ get_PlayerInfo(); SimulationWheels@ get_Wheels(); TM::HmsDyna@ get_Dyna(); TM::SceneVehicleCar@ get_SceneVehicleCar(); TM::InputEventBuffer@ get_InputEvents(); int get_RaceTime(); int get_TickTime(); uint get_EventsDuration(); bool get_InRace(); void RewindToState(SimulationStateFile@ file, bool resetCamera = true); }
class SimulationStateFile {
// Behaviors SimulationStateFile(); ~SimulationStateFile(); // Methods SimulationStateFile& opAssign(const SimulationStateFile&in other); bool Load(const string&in stateRelativePath, string&out error); bool Save(const string&in stateRelativePath, string&out error); bool CaptureCurrentState(SimulationManager@ simManager, bool withStatesAndInputs); string get_ChallengeName(); SimulationState@ ToState(); // Properties const string ChallengeUID; const string ChallengeEnvironment; }
class TimedCommand {
// Behaviors ~TimedCommand(); TimedCommand(); // Methods TimedCommand& opAssign(const TimedCommand&in other); // Properties string Content; int Timestamp; }
class InputCommand {
// Behaviors ~InputCommand(); InputCommand(); // Methods InputCommand& opAssign(const InputCommand&in other); string ToScript(bool useDecimalTime = true); string ToString(bool useDecimalTime = true); // Properties InputType Type; int Timestamp; int State; }
class CommandList {
// Behaviors CommandList(); CommandList(const string&in scriptRelativePath); ~CommandList(); // Methods CommandList& opAssign(const CommandList&in other); void Process(CommandListProcessOption option = CommandListProcessOption :: QueueAndExecute); bool get_IsFullyProcessed(); string get_Filename(); string get_Content(); void set_Content(const string&in content); bool Save(const string&in scriptRelativePath); array<TimedCommand>@ get_TimedCommands(); array<InputCommand>@ get_InputCommands(); }
class Trigger3D {
// Behaviors ~Trigger3D(); Trigger3D(); Trigger3D(const vec3&in position, const vec3&in size); // Methods Trigger3D& opAssign(const Trigger3D&in other); bool opImplConv(); bool opEquals(const Trigger3D&in other); bool ContainsPoint(const vec3&in p); float Distance(const vec3&in p); // Properties vec3 Position; vec3 Size; }
enum Severity {
Info = 0,
Success = 1,
Warning = 2,
Error = 3
}
enum ContextMode {
Simulation = 0,
Run = 1
}
enum InputType {
None = -1,
Down = 0,
Up = 1,
Left = 2,
Right = 3,
Steer = 4,
Gas = 5,
Respawn = 6,
GiveUp = 7,
Horn = 8,
FakeFinish = 9
}
enum SimulationResult {
Valid = 1,
Invalid = 0,
WrongSimulation = 2
}
enum BFPhase {
Initial = 0,
Search = 1
}
enum BFEvaluationDecision {
DoNothing = 1,
Accept = 2,
Reject = 3,
Stop = 4
}
enum InputFormatFlags {
None = 0,
DecimalTime = 1,
SeperateRelease = 2,
Default = 4
}
enum CommandListProcessOption {
OnlyParse = 0,
QueueAndExecute = 1,
ExecuteImmediately = 2
}
void clear()
void ExecuteCommand(const string&in input)
bool GetVariable(const string&in name, double&out val)
bool GetVariable(const string&in name, bool&out val)
bool GetVariable(const string&in name, string&out val)
bool GetVariableBool(const string&in name)
double GetVariableDouble(const string&in name)
void log(const string&in str, Severity severity = Severity :: Info)
void print(const string&in str, Severity severity = Severity :: Info)
void RegisterBruteforceEvaluation(const string&in identifier, const string&in title, OnBruteforceEvaluate@ callback, RenderBruteforceEvaluationSettings@ renderCallback = null)
void RegisterCustomCommand(const string&in name, const string&in description, OnCustomCommand@ callback)
void RegisterValidationHandler(const string&in identifier, const string&in title, RenderValidationHandlerSettings@ renderCallback = null)
bool RegisterVariable(const string&in name, double defaultVal)
bool RegisterVariable(const string&in name, bool defaultVal)
bool RegisterVariable(const string&in name, const string&in defaultVal)
bool RemoveTrigger(int id)
int SetTrigger(const Trigger3D&in trigger, int id = - 1)
bool SetVariable(const string&in name, const string&in val)
bool SetVariable(const string&in name, bool val)
bool SetVariable(const string&in name, double val)
funcdef void OnCustomCommand(int fromTime, int toTime, const string&in commandLine, const array<string>&in args);