Autor Wątek:  Zwrotnica 750mm  (Przeczytany 2064 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

Offline eu07_304

  • Wiadomości: 496
  • Rattus norvegicus
    • Zobacz profil
  • Otrzymane polubienia: 0
Zwrotnica 750mm
« dnia: 19 Marca 2006, 10:24:48 »
Witam!

Otóż pisząc sobie trasę wąskotorową zrobiłem sobie taki pliczek zwrp34r300w750mm.inc:
//---------------elementy dla zwrotnicy prawej W=0.75m L=34m R=300m -----------------------------
//param: nazwa, x, y, z, kat, tekstura podsypki, np. zwrot34r300pods.tex zwrot34r300pods-new.tex

origin (p2) (p3) (p4)
rotate 0 (p5) 0

//---model latarni zwrotnika wraz z podstawa
//node -1 0 (p1)_Wz model (p2) (p3) (p4) (p5) WzPL.t3d none endmodel
node -1 0 (p1)_Wz model 1.9 0.16 0.4 180 WzA.t3d WzP endmodel

//---animacja latarni zwrotnika
event (p1)_Wz1 animation 0.5 (p1)_Wz rotate Wz 0 0 0 100 endevent
event (p1)_Wz2 animation 0.5 (p1)_Wz rotate Wz 0 0 -90 100 endevent

//---przelaczanie zwrotnicy o nazwie (p1)
event (p1)_0 switch 0.0 (p1) 0 endevent
event (p1)_1 switch 0.0 (p1) 1 endevent

//---ustawianie ograniczenia predkosci
event (p1)_Vmax trackvel 0.0 (p1) -1 endevent
event (p1)_V40 trackvel 0.0 (p1) 40.0 endevent


//---globalne (zewnetrzne) procedury sterujace:
event (p1)- multiple 0 none (p1)_Wz1 (p1)_0 (p1)_Vmax endevent
event (p1)+ multiple 0 none (p1)_Wz2 (p1)_1 (p1)_V40 endevent
// czyli podanie nazwazwrotnicy+ ustawia zwrotnice w prawo wywolujac 3 zdarzenia _Wz2, _1 i _V40


//---------------------------------------------------------------------------------
// tekstura podkladow zwrotnicy
//---------------------------------------------------------------------------------

node -1 0 none triangle_strip material ambient: 150.0 150.0 150.0 diffuse: 220.0 220.0 220.0 specular: 154.0 154.0 154.0  endmaterial zwrot34R300pods.tex
-0.35 0.0 34.0 0.0 0.0 -1.0  0.0 1.0 end
-0.35 0.0 -0.1 0.0 0.0 -1.0  0.0 1.0 end
2.188 0.0 34.0 0.0 0.0 -1.0  1.0 1.0 end
2.188 0.0 -0.1 0.0 0.0 -1.0  1.0 1.0
endtri


rotate 0 0 0
endorigin



i on wywołuje Abnormal Program Termination

Wpis w scenerii:
include zwrp34r300w750mm.inc -467.06 0.0 0.0 90 end

log:
Starting MaSzyna rail vehicle simulator.
Compilation 140904v13 - UNOFFICIAL <wersja niepubliczna>
Online documentation and additional files on http://www.eu07.pl
Authors: Marcin_EU, McZapkie, ABu, Winger, Tolaris, nbmx_EU, OLO_EU, Bart, Quark-t and others
Renderer:
GDI Generic
Vendor:
Microsoft Corporation
OpenGl Version::
1.1.0
Supported Extensions:
GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture
glClearColor (FogColor[0], FogColor[1], FogColor[2], 0.0);
glFogfv(GL_FOG_COLOR, FogColor);
glClearDepth(1.0f);  
glEnable(GL_TEXTURE_2D);
glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER,0.5);
glDepthFunc(GL_LEQUAL);
glDisable(GL_BLEND);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glPolygonMode(GL_FRONT, GL_FILL);
glFrontFace(GL_CCW);
glEnable(GL_CULL_FACE);
glLineWidth(1.0f);
glPointSize(2.0f);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambientLight);
glLightfv(GL_LIGHT0,GL_DIFFUSE,diffuseLight);
glLightfv(GL_LIGHT0,GL_SPECULAR,specularLight);
glLightfv(GL_LIGHT0,GL_POSITION,lightPos);
glEnable(GL_LIGHT0);
glEnable(GL_COLOR_MATERIAL);
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, whiteLight );
glEnable(GL_LIGHTING);
glFogi(GL_FOG_MODE, GL_LINEAR);
glFogfv(GL_FOG_COLOR, FogColor);
glFogf(GL_FOG_START, 1000.0f);
glFogf(GL_FOG_END, 2000.0f);
glEnable(GL_FOG);
Font init
Font init OK
Sound Init
Loading - texture: textures\logo.bmp
OK
Sound Init OK
Textures init
Textures init OK
Models init
Models init OK
Ground init
Scenery atmo definition
Scenery light definition
Loading - texture: textures\rail_screw_used1.bmp
OK
Loading - texture: textures\tpd-old1.tex
OK
Loading - texture: textures\rail_screw_unused2.bmp
OK
Loading - texture: textures\grassgreen1.tga
OK
Loading - texture: textures\rail_screw_rused1.bmp
OK
Loading - texture: textures\rail_screw_unused1.bmp
OK
Loading - texture: textures\chodnik_torowy.bmp
OK
Loading - texture: textures\forest01.tga
OK
Loading - texture: textures\las2.tga
OK
Loading - texture: textures\roof/roofthatch-old1.bmp
OK
Loading - text model: models\bud/dombale01.t3d
Loading - texture: textures\bud/dombale01a.tga
OK
Loading - texture: textures\bud/dombale01b.tga
OK
Loading - texture: textures\wood/woodredbrown2_agedplanks.bmp
OK
Loading - texture: textures\roof/roof-redtiles-aged1.bmp
OK
Loading - text model: models\bud/domtynk02.t3d
Loading - texture: textures\bud/domtynk02a.tga
OK
Loading - texture: textures\bud/domtynk02b.tga
OK
Loading - texture: textures\wood/woodredbrown1_planks.bmp
OK
Loading - texture: textures\wall/wallbrickdark_dirty1.bmp
OK
Loading - texture: textures\roof/roof-asphaltstrip-new1.bmp
OK
Loading - text model: models\bud/domtynk03.t3d
Loading - texture: textures\bud/domtynk03a.tga
OK
Loading - texture: textures\bud/domtynk03b.tga
OK
Loading - text model: models\bud/r-zarytestacja.t3d
Loading - texture: textures\bud/r-zaryte.tga
OK
Loading - texture: textures\wall/wallbricksbrown_a.tga
OK
Loading - texture: textures\wood/woodlightbrown2_planks.bmp
OK
Loading - texture: textures\bud/tel2i-dachowy.tga
OK
Loading - texture: textures\sign/cb-zawiadowca.tga
OK
Loading - texture: textures\sign/cb-poczekalnia.tga
OK
Loading - texture: textures\plants/#lipa1.tga
OK
Loading - texture: textures\plants/#morwa1.tga
OK
Loading - texture: textures\plants/#swierk1.tga
OK
Loading - texture: textures\plants/#swierksrebrny1.tga
OK


Co robię źle?

D|-8---6-5-
A|-8---4-3-
E|-6---4-3-