Exemplo n.º 1
0
        /// <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);
            }
        }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
 /// <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[] { }
     };
 }
Exemplo n.º 5
0
        /// <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);
            }
        }
Exemplo n.º 6
0
 /// <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;
 }
Exemplo n.º 7
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)
 {
 }
Exemplo n.º 9
0
 /// <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() };
 }
Exemplo n.º 10
0
 // --- 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;
 }
Exemplo n.º 11
0
#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);
        }
Exemplo n.º 12
0
 /// <summary>Creates a new Animated World Object</summary>
 /// <param name="Host">The host application</param>
 public AnimatedWorldObject(Hosts.HostInterface Host) : base(Host)
 {
 }
Exemplo n.º 13
0
 /// <summary>Creates a new Animated World Object</summary>
 /// <param name="Host">The host application</param>
 public AnimatedWorldObject(Hosts.HostInterface Host)
 {
     currentHost = Host;
 }
Exemplo n.º 14
0
 /// <summary>Creates a new WorldSound</summary>
 public WorldSound(Hosts.HostInterface Host, SoundHandle buffer)
 {
     Radius      = 25.0;
     currentHost = Host;
     Buffer      = buffer;
 }
Exemplo n.º 15
0
 // --- 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;
 }
Exemplo n.º 16
0
 /// <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)
 {
 }
Exemplo n.º 17
0
 /// <summary>Creates a new WorldSound</summary>
 public WorldSound(Hosts.HostInterface Host, SoundHandle buffer) : base(Host)
 {
     Radius = 25.0;
     Buffer = buffer;
 }
Exemplo n.º 18
0
 /// <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)
 {
 }
Exemplo n.º 19
0
 /// <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)
 {
 }
Exemplo n.º 20
0
 /// <summary>Creates a new WorldObject</summary>
 protected WorldObject(Hosts.HostInterface Host)
 {
     currentHost = Host;
 }