本文整理匯總了C#中TgcViewer.Utils.TgcSceneLoader.TgcMesh.render方法的典型用法代碼示例。如果您正苦於以下問題:C# TgcMesh.render方法的具體用法?C# TgcMesh.render怎麽用?C# TgcMesh.render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TgcViewer.Utils.TgcSceneLoader.TgcMesh
的用法示例。
在下文中一共展示了TgcMesh.render方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: mover
public void mover(LightData luz, TgcMesh meshLuz, float elapsedTime)
{
Matrix directionRotationMatrix = Matrix.RotationX(FastMath.QUARTER_PI * elapsedTime);
luz.direccion.TransformCoordinate(directionRotationMatrix);
Matrix trans = Matrix.Translation(meshLuz.Position);
Matrix trasp = Matrix.Invert(trans);
meshLuz.Transform = Matrix.Multiply(trasp, directionRotationMatrix) * trans * meshLuz.Transform;
meshLuz.render();
}
示例2: mover
public void mover(LightData luz, TgcMesh meshLuz, float elapsedTime)
{
meshLuz.render();
}
示例3: activar
public void activar(float elapsedTime,TgcText2d textGanaste, TgcText2d textGanaste2,TgcText2d textoContadorTiempo,TgcText2d textoMejorTiempo,TgcMesh piramid, TgcSkyBox skyBox, bool terminoJuego,TgcSprite tablero,TgcText2d textFPS)
{
Device device = GuiController.Instance.D3dDevice;
Control panel3d = GuiController.Instance.Panel3d;
float aspectRatio = (float)panel3d.Width / (float)panel3d.Height;
time += elapsedTime;
// animo la pos del avion
if (!terminoJuego)
{
g_LightPos = motorcycle.Position + 2f*(new Vector3(100, 60, 0));
g_LightDir = motorcycle.Position + (new Vector3(0, 0, 0)) - g_LightPos;
g_LightDir.Normalize();
}
// Shadow maps:
device.EndScene(); // termino el thread anterior
GuiController.Instance.RotCamera.CameraCenter = new Vector3(0, 0, 0);
GuiController.Instance.RotCamera.CameraDistance = 100;
GuiController.Instance.RotCamera.RotationSpeed = 2f;
GuiController.Instance.CurrentCamera.updateCamera();
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
//Genero el shadow map
RenderShadowMap();
device.BeginScene();
// dibujo la escena pp dicha
device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
RenderScene(false);
if (terminoJuego)
{
textGanaste.render();
textGanaste2.render();
}
GuiController.Instance.Drawer2D.beginDrawSprite();
//Dibujar sprite (si hubiese mas, deberian ir todos aquí)
tablero.render();
//Finalizar el dibujado de Sprites
GuiController.Instance.Drawer2D.endDrawSprite();
textFPS.Text = " FPS: " + HighResolutionTimer.Instance.FramesPerSecond.ToString();
textFPS.render();
textoContadorTiempo.render();
textoMejorTiempo.render();
piramid.render();
renderEscena(elapsedTime);
device.Transform.Projection =
Matrix.PerspectiveFovLH(Geometry.DegreeToRadian(45.0f),
TgcD3dDevice.aspectRatio, 1f, 20000f);
skyBox.render();
}