本文整理汇总了C#中PloobsEngine类的典型用法代码示例。如果您正苦于以下问题:C# PloobsEngine类的具体用法?C# PloobsEngine怎么用?C# PloobsEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PloobsEngine类属于命名空间,在下文中一共展示了PloobsEngine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
{
if (firstTime)
{
oldViewProjection = world.CameraManager.ActiveCamera.ViewProjection;
firstTime = false;
}
effect.Parameters["attenuation"].SetValue(Attenuation);
effect.Parameters["halfPixel"].SetValue(GraphicInfo.HalfPixel);
effect.Parameters["InvertViewProjection"].SetValue(Matrix.Invert(world.CameraManager.ActiveCamera.ViewProjection));
effect.Parameters["oldViewProjection"].SetValue(oldViewProjection);
effect.Parameters["numSamples"].SetValue(NumSamples);
effect.Parameters["depth"].SetValue(rHelper[PrincipalConstants.DephRT]);
effect.Parameters["extra"].SetValue(rHelper[PrincipalConstants.extra1RT]);
effect.Parameters["cena"].SetValue(ImageToProcess);
oldViewProjection = world.CameraManager.ActiveCamera.ViewProjection;
if (useFloatBuffer)
rHelper.RenderFullScreenQuadVertexPixel(effect, SamplerState.PointClamp);
else
rHelper.RenderFullScreenQuadVertexPixel(effect, GraphicInfo.SamplerState);
}
示例2: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
engine.IsMouseVisible = true;
Primitive2DDraw = new PloobsEngine.Features.DebugDraw.Primitive2DDraw();
engine.AddComponent(Primitive2DDraw);
base.InitScreen(GraphicInfo, engine);
}
示例3: PosWithDepthDraw
protected override void PosWithDepthDraw(PloobsEngine.SceneControl.RenderHelper render, Microsoft.Xna.Framework.GameTime gt, ref Microsoft.Xna.Framework.Matrix activeView, ref Microsoft.Xna.Framework.Matrix activeProjection)
{
Matrix viewIT = Matrix.Invert(Matrix.Transpose(activeView));
Vector3 position = new Vector3(viewIT.M14, viewIT.M24, viewIT.M34);
foreach (var item in Billboards)
{
if (item.Enabled)
{
SpriteFont font = item.SpriteFont == null ? SpriteFont : item.SpriteFont;
basicEffect.World = Matrix.CreateConstrainedBillboard(item.Position, position, Vector3.Down, null, null);
basicEffect.View = activeView;
basicEffect.Projection = activeProjection;
spriteBatch.Begin(0, null, null, DepthStencilState.DepthRead, RasterizerState.CullNone, basicEffect);
Vector2 textOrigin = font.MeasureString(item.Message) / 2;
spriteBatch.DrawString(font, item.Message, Vector2.Zero, item.Color, 0, textOrigin, item.Scale, 0, 0);
spriteBatch.End();
}
}
render.ResyncStates();
}
示例4: LoadContent
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IContentManager contentManager)
{
base.LoadContent(GraphicInfo, factory, contentManager);
ngui = Gui as NeoforceGui;
manager = ngui.Manager;
Window window = new Window(manager);
window.Init();
window.Text = "Options";
window.Width = 480;
window.Height = 200;
window.Center();
window.Visible = true;
Button button = new Button(manager);
button.Init();
button.Text = "OK";
button.Width = 72;
button.Height = 24;
button.Left = (window.ClientWidth / 2) - (button.Width / 2);
button.Top = window.ClientHeight - button.Height - 8;
button.Anchor = Anchors.Bottom;
button.Parent = window;
button.Click += new TomShane.Neoforce.Controls.EventHandler(button_Click);
manager.Add(window);
}
示例5: Initialization
public void Initialization(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
RenderTargetCube = factory.CreateRenderTargetCube(512,SurfaceFormat.Color,false,DepthFormat.Depth24Stencil8,0,RenderTargetUsage.PreserveContents);
ForwardEnvironmentShader = new ForwardEnvironmentShader(RenderTargetCube,1,true);
ForwardEnvironmentShader.Initialize(ginfo, factory, obj);
}
示例6: LoadContent
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory)
{
basicEffect = factory.GetBasicEffect();
basicEffect.TextureEnabled = true;
spriteBatch = factory.GetSpriteBatch();
base.LoadContent(GraphicInfo, factory);
}
示例7: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, IObject obj)
{
Effect = factory.GetEffect("Effects/baker");
base.Initialize(ginfo, factory, obj);
Effect.Parameters["halfPixel"].SetValue(ginfo.HalfPixel);
rt = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
示例8: UpdateObject
protected override void UpdateObject(Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Cameras.ICamera cam, IWorld world)
{
// Tell the animation player to compute the latest bone transform matrices.
SkinnedModel.AnimationPlayer.UpdateBoneTransforms(gt.ElapsedGameTime, true);
Matrix[] boneTransforms = new Matrix[SkinnedModel.SkinningData.BindPose.Count];
// Copy the transforms into our own array, so we can safely modify the values.
SkinnedModel.AnimationPlayer.GetBoneTransforms().CopyTo(boneTransforms, 0);
// Modify the transform matrices for the head and upper-left arm bones.
int headIndex = SkinnedModel.SkinningData.BoneIndices["Head"];
///some bone manipulation
headRotation += step;
if (headRotation > 0.7f || headRotation < -0.7f)
step *= -1;
Matrix headTransform = Matrix.CreateRotationX(headRotation);
boneTransforms[headIndex] = headTransform * boneTransforms[headIndex];
// Tell the animation player to recompute the world and skin matrices.
SkinnedModel.AnimationPlayer.UpdateWorldTransforms(Matrix.Identity, boneTransforms);
SkinnedModel.AnimationPlayer.UpdateSkinTransforms();
ForwardSkinnedShader.SetBones(SkinnedModel.AnimationPlayer.GetSkinTransforms());
base.UpdateObject(gt, cam, world);
}
示例9: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
mstate = Mouse.GetState();
this.engine = engine;
base.InitScreen(GraphicInfo, engine);
}
示例10: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
base.InitScreen(GraphicInfo, engine);
MessageDeliver md = new MessageDeliver();
engine.AddComponent(md);
}
示例11: LoadContent
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IContentManager contentManager)
{
tile = factory.GetTexture2D("Textures/tile");
FarseerWorld fworld = this.World.PhysicWorld as FarseerWorld;
///border
border = new Border(fworld, factory, GraphicInfo, factory.CreateTexture2DColor(1, 1, Color.Red));
///from texture
{
Texture2D tex = factory.GetTexture2D("Textures//goo");
tex = factory.GetScaledTexture(tex, new Vector2(4));
IModelo2D model = new SpriteFarseer(tex);
Basic2DTextureMaterial mat = new Basic2DTextureMaterial();
FarseerObject fs = new FarseerObject(fworld, model);
I2DObject o = new I2DObject(fs, mat, model);
o.OnHasMoved += new PloobsEngine.SceneControl._2DScene.OnHasMoved(o_OnHasMoved);
this.World.AddObject(o);
}
///camera
this.World.Camera2D = new Camera2D(GraphicInfo);
///Create the Particle System
DPFSParticleSystem ps = new DPFSParticleSystem("TESTE", new SpriteParticleSystem(null));
this.World.ParticleManager.AddAndInitializeParticleSystem(ps);
///updateable
JointUpdateable ju = new JointUpdateable(this, fworld, this.World.Camera2D);
base.LoadContent(GraphicInfo, factory, contentManager);
}
示例12: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
_shader2 = factory.GetEffect("PrePass2/ShaderPass");
_shader = factory.GetEffect("PrePass2/renderobj");
base.Initialize(ginfo, factory, obj);
}
示例13: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("effects/TransparentOnBorder");
effectdistorcion = factory.GetEffect("effects/effect2");
target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
SetBlurEffectParameters(1f / (float)ginfo.BackBufferWidth, 1f / (float)ginfo.BackBufferHeight);
}
示例14: Initialization
public void Initialization(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
RenderTargetCube = factory.CreateRenderTargetCube(128, SurfaceFormat.Color, false, DepthFormat.Depth24Stencil8, 0, RenderTargetUsage.DiscardContents);
ForwardEnvironmentShader = new ForwardEnvironmentShader(RenderTargetCube, 0.5f, false);
ForwardEnvironmentShader.Initialize(ginfo, factory, obj);
//ForwardEnvironmentShader.EnvironmentMapEffect.EnableDefaultLighting();
}
示例15: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
base.InitScreen(GraphicInfo, engine);
CPUSphericalBillboardComponent = new CPUSphericalBillboardComponent();
engine.AddComponent(CPUSphericalBillboardComponent);
}