<commit_before>//
// Engines.h
// header file for Engines.cpp
//

#ifndef ENVIRO_ENGINESH
#define ENVIRO_ENGINESH

#include "vtlib/core/Engine.h"
#include "vtlib/core/NavEngines.h"

class NodeGeom;
class LinkGeom;
class vtRoute;
class vtHeightField;

enum AirportCodes {ITO, KOA, MUE, UPP};


///////////////////////////////////////////////////

class BgColorEngine : public vtEngine
{
public:
	void Eval();
};

///////////////////////////////////////////////////

class PlaneEngine : public vtEngine
{
public:
	PlaneEngine(float fSpeedExag, float fScale, AirportCodes code);
	void Eval();
	void SetHoop(int i);

	FPoint3	m_hoop_pos[10];
	float	m_hoop_speed[10];
	int		m_hoops;
	int		m_hoop;

	FPoint3	m_pos, m_dir;
	float	m_fSpeed;		// in meters/sec
	float	m_fSpeedExag;	// this many times normal speed
	float	m_fLastTime;
	float	m_fScale;
};

///////////////////////////////////////////////////

class RoadFollowEngine : public vtEngine
{
public:
	RoadFollowEngine(NodeGeom *pStartNode);
	void Eval();

	void	PickRoad(LinkGeom *last_road);

	float	fAmount;
//	RoadMap	*m_pRoadMap;
	NodeGeom	*m_pLastNode;
	LinkGeom	*m_pCurrentRoad;
	float	m_pCurrentRoadLength;
	bool	forwards;
};

//////////////////////////////////////////////////

class FollowerEngine : public vtEngine
{
public:
	FollowerEngine(vtTransform* model, vtCamera* camera);
	void Eval();

	vtTransform *m_model;
	vtCamera *m_pCamera;
};

///////////////////////////////////////////////////

class TerrainPicker : public vtLastMouse
{
public:
	TerrainPicker();
	void Eval();
	void SetHeightField(vtHeightField3d *pHeight) { m_pHeightField = pHeight; }

	bool GetCurrentPoint(FPoint3 &p);
	bool GetCurrentEarthPos(DPoint3 &p);

	void OnMouse(vtMouseEvent &event);

protected:
	void FindGroundPoint();

	FPoint3			m_GroundPoint;
	vtHeightField3d *m_pHeightField;
	DPoint3			m_EarthPos;
	bool			m_bOnTerrain;
};

///////////////////////////////////////////////////

class IcoGlobe;

class GlobePicker : public vtLastMouse
{
public:
	GlobePicker();
	void Eval();
	void SetRadius(double fRadius) { m_fRadius = fRadius; }
	void SetGlobe(IcoGlobe *pGlobe) { m_pGlobe = pGlobe; }

	bool GetCurrentPoint(FPoint3 &p);
	bool GetCurrentEarthPos(DPoint3 &p);

protected:
	FPoint3		m_GroundPoint;
	DPoint3		m_EarthPos;
	bool		m_bOnTerrain;
	double		m_fRadius;
	IcoGlobe	*m_pGlobe;
};

///////////////////////////////////////////////////

class FlatFlyer : public vtLastMouse
{
public:
	FlatFlyer();

	void Eval();
	void OnMouse(vtMouseEvent &event);

protected:
	bool m_bDrag;
	bool m_bZoom;
	FPoint3 m_start_wp;
	IPoint2 m_startpos;
};

///////////////////////////////////////////////////

class GrabFlyer : public vtTerrainFlyer
{
public:
	GrabFlyer(float fSpeed);
	void Eval();
	void OnMouse(vtMouseEvent &event);

	void SetTerrainPicker(TerrainPicker *pTP) { m_pTP = pTP; }

protected:
	bool m_bDrag;
	bool m_bPivot;
	bool m_bZoom;
	IPoint2 m_startpos;

	TerrainPicker *m_pTP;
	FPoint3 m_start_wp;
	FMatrix4 m_start_eye;

	// for dragging
	float m_fHeight;
};

#endif	// ENVIRO_ENGINESH

<commit_msg>rem unused stuff<commit_after>//
// Engines.h
// header file for Engines.cpp
//

#ifndef ENVIRO_ENGINESH
#define ENVIRO_ENGINESH

#include "vtlib/core/Engine.h"
#include "vtlib/core/NavEngines.h"

class NodeGeom;
class LinkGeom;
class vtRoute;
class vtHeightField;

///////////////////////////////////////////////////

enum AirportCodes {ITO, KOA, MUE, UPP};

class PlaneEngine : public vtEngine
{
public:
	PlaneEngine(float fSpeedExag, float fScale, AirportCodes code);
	void Eval();
	void SetHoop(int i);

	FPoint3	m_hoop_pos[10];
	float	m_hoop_speed[10];
	int		m_hoops;
	int		m_hoop;

	FPoint3	m_pos, m_dir;
	float	m_fSpeed;		// in meters/sec
	float	m_fSpeedExag;	// this many times normal speed
	float	m_fLastTime;
	float	m_fScale;
};

///////////////////////////////////////////////////

class RoadFollowEngine : public vtEngine
{
public:
	RoadFollowEngine(NodeGeom *pStartNode);
	void Eval();

	void	PickRoad(LinkGeom *last_road);

	float	fAmount;
//	RoadMap	*m_pRoadMap;
	NodeGeom	*m_pLastNode;
	LinkGeom	*m_pCurrentRoad;
	float	m_pCurrentRoadLength;
	bool	forwards;
};

//////////////////////////////////////////////////

class FollowerEngine : public vtEngine
{
public:
	FollowerEngine(vtTransform* model, vtCamera* camera);
	void Eval();

	vtTransform *m_model;
	vtCamera *m_pCamera;
};

///////////////////////////////////////////////////

class TerrainPicker : public vtLastMouse
{
public:
	TerrainPicker();
	void Eval();
	void SetHeightField(vtHeightField3d *pHeight) { m_pHeightField = pHeight; }

	bool GetCurrentPoint(FPoint3 &p);
	bool GetCurrentEarthPos(DPoint3 &p);

	void OnMouse(vtMouseEvent &event);

protected:
	void FindGroundPoint();

	FPoint3			m_GroundPoint;
	vtHeightField3d *m_pHeightField;
	DPoint3			m_EarthPos;
	bool			m_bOnTerrain;
};

///////////////////////////////////////////////////

class IcoGlobe;

class GlobePicker : public vtLastMouse
{
public:
	GlobePicker();
	void Eval();
	void SetRadius(double fRadius) { m_fRadius = fRadius; }
	void SetGlobe(IcoGlobe *pGlobe) { m_pGlobe = pGlobe; }

	bool GetCurrentPoint(FPoint3 &p);
	bool GetCurrentEarthPos(DPoint3 &p);

protected:
	FPoint3		m_GroundPoint;
	DPoint3		m_EarthPos;
	bool		m_bOnTerrain;
	double		m_fRadius;
	IcoGlobe	*m_pGlobe;
};

///////////////////////////////////////////////////

class FlatFlyer : public vtLastMouse
{
public:
	FlatFlyer();

	void Eval();
	void OnMouse(vtMouseEvent &event);

protected:
	bool m_bDrag;
	bool m_bZoom;
	FPoint3 m_start_wp;
	IPoint2 m_startpos;
};

///////////////////////////////////////////////////

class GrabFlyer : public vtTerrainFlyer
{
public:
	GrabFlyer(float fSpeed);
	void Eval();
	void OnMouse(vtMouseEvent &event);

	void SetTerrainPicker(TerrainPicker *pTP) { m_pTP = pTP; }

protected:
	bool m_bDrag;
	bool m_bPivot;
	bool m_bZoom;
	IPoint2 m_startpos;

	TerrainPicker *m_pTP;
	FPoint3 m_start_wp;
	FMatrix4 m_start_eye;

	// for dragging
	float m_fHeight;
};

#endif	// ENVIRO_ENGINESH


{'fraction_non_alphanumeric': 0.21315306292772493, 'fraction_numerical': 0.007010515773660491, 'mean_word_length': 2.655887736424649, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4093596', 'n_tokens_mistral': 2289, 'n_tokens_neox': 2194, 'n_words': 483}