/// <summary>Loads all interfaces this plugin supports.</summary> public void Load(Hosts.HostInterface Host, FileSystem.FileSystem FileSystem, BaseOptions Options, object RendererReference = null) { if (this.Texture != null) { this.Texture.Load(Host); } if (this.Sound != null) { this.Sound.Load(Host); } if (this.Object != null) { this.Object.Load(Host, FileSystem); this.Object.SetObjectParser(Options.CurrentXParser); this.Object.SetObjectParser(Options.CurrentObjParser); } if (this.Route != null) { //FIXME: Remove renderer reference this.Route.Load(Host, FileSystem, Options, RendererReference); } }
/// <summary>Creates a new axle</summary> public Axle(Hosts.HostInterface currentHost, AbstractTrain Train, AbstractCar Car, double CoefficientOfFriction = 0.35, double CoefficentOfRollingResistance = 0.0025, double AerodynamicDragCoefficient = 1.1) { Follower = new TrackFollower(currentHost, Train, Car); baseCar = Car; coefficientOfFriction = CoefficientOfFriction; coefficientOfRollingResistance = CoefficentOfRollingResistance; aerodynamicDragCoefficient = AerodynamicDragCoefficient; }
/// <summary>Creates a new MeshBuilder</summary> /// <param name="Host">The callback to the host application allowing for texture loading etc.</param> public MeshBuilder(Hosts.HostInterface Host) { this.currentHost = Host; this.Vertices = new VertexTemplate[] {}; this.Faces = new MeshFace[] { }; this.Materials = new Material[] { new Material() }; this.isCylinder = false; }
/// <summary>Creates a new empty object</summary> public StaticObject(Hosts.HostInterface Host) { currentHost = Host; Mesh = new Mesh { Faces = new MeshFace[] { }, Materials = new MeshMaterial[] { }, Vertices = new VertexTemplate[] { } }; }
/// <summary>Loads all interfaces this plugin supports.</summary> public void Load(Hosts.HostInterface Host, FileSystem.FileSystem FileSystem, BaseOptions Options) { if (this.Texture != null) { this.Texture.Load(Host); } if (this.Sound != null) { this.Sound.Load(Host); } if (this.Object != null) { this.Object.Load(Host, FileSystem); this.Object.SetObjectParser(Options.CurrentXParser); this.Object.SetObjectParser(Options.CurrentObjParser); } }
/// <summary>Creates a new TrackFollower</summary> public TrackFollower(Hosts.HostInterface Host, AbstractTrain train = null, AbstractCar car = null) { currentHost = Host; Train = train; Car = car; LastTrackElement = 0; TrackPosition = 0; WorldPosition = new Vector3(); WorldDirection = new Vector3(); WorldUp = new Vector3(); WorldSide = new Vector3(); Pitch = 0; CurveRadius = 0; CurveCant = 0; Odometer = 0; CantDueToInaccuracy = 0; AdhesionMultiplier = 0; TriggerType = EventTriggerType.None; TrackIndex = 0; }
/// <summary>Called when the plugin is loaded.</summary> /// <param name="host">The host that loaded the plugin.</param> /// <param name="fileSystem">The program filesystem object</param> public virtual void Load(Hosts.HostInterface host, FileSystem.FileSystem fileSystem) { }
/// <summary>Creates a new AnimatedWorldObjectStateSound</summary> public AnimatedWorldObjectStateSound(Hosts.HostInterface Host) : base(Host) { }
/// <summary>Creates a new texture.</summary> /// <param name="path">The path to the texture.</param> /// <param name="parameters">The parameters that specify how to process the texture.</param> /// <param name="currentHost">The callback function to the host application</param> public Texture(string path, TextureParameters parameters, Hosts.HostInterface currentHost) { this.Origin = new PathOrigin(path, parameters, currentHost); this.OpenGlTextures = new OpenGlTexture[] { new OpenGlTexture(), new OpenGlTexture(), new OpenGlTexture(), new OpenGlTexture() }; }
// --- constructors --- /// <summary>Creates a new path origin.</summary> /// <param name="path">The path to the texture.</param> /// <param name="parameters">The parameters that specify how to process the texture.</param> /// <param name="Host">The callback function to the host application</param> public PathOrigin(string path, TextureParameters parameters, Hosts.HostInterface Host) { this.Path = path; this.Parameters = parameters; this.currentHost = Host; }
#pragma warning restore 0649, 1591 /// <summary>Creates a new Track Following Object</summary> /// <param name="Host">The host application</param> public TrackFollowingObject(Hosts.HostInterface Host) : base(Host) { FrontAxleFollower = new TrackFollower(currentHost); RearAxleFollower = new TrackFollower(currentHost); }
/// <summary>Creates a new Animated World Object</summary> /// <param name="Host">The host application</param> public AnimatedWorldObject(Hosts.HostInterface Host) : base(Host) { }
/// <summary>Creates a new Animated World Object</summary> /// <param name="Host">The host application</param> public AnimatedWorldObject(Hosts.HostInterface Host) { currentHost = Host; }
/// <summary>Creates a new WorldSound</summary> public WorldSound(Hosts.HostInterface Host, SoundHandle buffer) { Radius = 25.0; currentHost = Host; Buffer = buffer; }
// --- constructors --- /// <summary>Creates a new path origin.</summary> /// <param name="path">The path to the sound.</param> /// <param name="Host">The callback function to the host application</param> public PathOrigin(string path, Hosts.HostInterface Host) { this.Path = path; this.currentHost = Host; }
/// <summary>Called when the plugin is loaded.</summary> /// <param name="host">The host that loaded the plugin.</param> /// <param name="fileSystem">The filesystem from the host application</param> /// <param name="Options">The options supplied by the host program</param> /// <param name="trainManagerReference">A reference to the TrainManager in the host application</param> public virtual void Load(Hosts.HostInterface host, FileSystem.FileSystem fileSystem, BaseOptions Options, object trainManagerReference) { }
/// <summary>Creates a new WorldSound</summary> public WorldSound(Hosts.HostInterface Host, SoundHandle buffer) : base(Host) { Radius = 25.0; Buffer = buffer; }
/// <summary>Called when the plugin is loaded.</summary> /// <param name="host">The host that loaded the plugin.</param> /// <param name="compatibilityFolder">The absolute on-disk path to the folder containing compatibility data</param> public virtual void Load(Hosts.HostInterface host, string compatibilityFolder) { }
/// <summary>Called when the plugin is loaded.</summary> /// <param name="host">The host that loaded the plugin.</param> public virtual void Load(Hosts.HostInterface host) { }
/// <summary>Creates a new WorldObject</summary> protected WorldObject(Hosts.HostInterface Host) { currentHost = Host; }