本文整理汇总了C#中Scene.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.Initialize方法的具体用法?C# Scene.Initialize怎么用?C# Scene.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scene
的用法示例。
在下文中一共展示了Scene.Initialize方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public void Run(Scene scene, SceneOptions options)
{
var window = new GraphicsWindow(scene);
var view = new ElementView(options);
scene.Initialize(view);
window.Content = view;
window.ShowDialog();
}
示例2: SetScene
public static void SetScene(Scene newScene)
{
if (currentScene != null)
currentScene.Unload();
currentScene = newScene;
newScene.Initialize();
newScene.LoadContent(StaticContent);
}
示例3: MainPage
public MainPage()
{
InitializeComponent();
var sceneOptions = new SceneOptions("/Images/800x600", 50, 42);
_scene = new Scene(sceneOptions);
var view = new ElementView(sceneOptions);
_scene.Initialize(view);
LayoutRoot.Children.Add(view);
CompositionTarget.Rendering += new System.EventHandler(CompositionTarget_Rendering);
}
示例4: Run
public void Run(Scene scene, SceneOptions options)
{
using (var form = new GraphicsForm(scene))
{
var view = new PictureBoxView(options);
scene.Initialize(view);
form.SetView(view);
form.ShowDialog();
}
}
示例5: Form1
public Form1()
{
scene = new Scene();
scene.redraw += new EventHandler(scene_redraw);
InitializeComponent();
simpleOpenglControl1.InitializeContexts();
scene.Initialize();
Otros.LoadTexture();
scene.element=new Lugar();//new Base111(new Point3D(0,-2.6,-20),7,new float[]{1.0f,0.4f,0.2f,1.0f});
rc=new RC(this);
rc.Show();
}
示例6: Opciones
public Opciones(string quien,float[] col)
{
color=col;
for(int i=0;i<4;i++)
{
if(color[i]<0 || color[i]>1)throw new Exception("Color Invalido");
}
scene = new Scene();
scene.redraw += new EventHandler(scene_redraw);
InitializeComponent();
simpleOpenGlControl1.InitializeContexts();
scene.Initialize();
scene.Reshape(simpleOpenGlControl1.Width, simpleOpenGlControl1.Height);
scene.element=new ColorDibujable(new Point3d(0,0,-10),color);/*new Ortoedro(new Point3D(-2,1.5,-10),4,3,2,new float[3]{0.3f,0.7f,0.9f});*/
this.trackBar1.Value=(int)(color[0]*100);
this.trackBar2.Value=(int)(color[1]*100);
this.trackBar3.Value=(int)(color[2]*100);
this.trackBar4.Value=(int)(color[3]*100);
label5.Text="Color del Elemento "+quien;
}
示例7: AddScene
public void AddScene(Scene scene)
{
bool already_exist = false;
foreach(Scene s in scenes)
{
if (s.scene_id == scene.scene_id)
{
already_exist = true;
break;
}
}
if (already_exist)
throw new InvalidOperationException("The scene already exist in scenemanager");
scene.scene_id = sceneid++;
if (is_initialized)
scene.Initialize();
scenes.Add(scene);
}
示例8: AddScene
public void AddScene(Scene scene)
{
scene.GraphicsContext = _graphicsContext;
scene.Initialize();
_scenes.Add(scene);
}
示例9: WinForms
public WinForms()
{
modified=false;
scene = new Scene();
scene.redraw += new EventHandler(scene_redraw);
InitializeComponent();
if(Screen.PrimaryScreen.Bounds.Width==800 &&Screen.PrimaryScreen.Bounds.Height==600)
{
this.WindowState=FormWindowState.Maximized;
}
this.uiStatusBar1.Panels[0].Width=this.uiTab1.Location.X+uiTab1.Width;
simpleOpenGlControl1.InitializeContexts();
scene.Initialize();
scene.Reshape(simpleOpenGlControl1.Width, simpleOpenGlControl1.Height);
config=new RSAConfiguration();
reader=new XmlParticulaReader((string)config.Valores["particulaXml"]);
ParametroInfo pInfo=reader.GetInfoParametros((string)config.Valores["particulaInicial"]);
// varPar=(object[])config.Valores["parametros"];
// for(int i=0;i<pInfo.Cantidad;i++)
// {
// varPar[i]=0;
// }
scene.element=new RSADibujable(config, reader.GetInfoParticulas((string)config.Valores["particulaInicial"]),this);
textBox1.Text=((RSADibujable)scene.element).AnsysObj.Ruta;
textBox2.Text=((RSADibujable)scene.element).AnsysObj.NombreArchivo;
Init();
// this.progressBar1.Location=this.uiStatusBar1.Location;
// this.progressBar1.Left=this.uiTab1.Location.X+uiTab1.Width;
// this.progressBar1.Top-=this.progressBar1.Height;
}