本文整理汇总了C#中PloobsEngine类的典型用法代码示例。如果您正苦于以下问题:C# PloobsEngine类的具体用法?C# PloobsEngine怎么用?C# PloobsEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PloobsEngine类属于命名空间,在下文中一共展示了PloobsEngine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:25,代码来源:MotionBlurPostEffect.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:Basic2DPhysicScreen.cs
示例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();
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:27,代码来源:TextCPUCylindricBillboardComponent.cs
示例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);
}
开发者ID:tubitos,项目名称:1,代码行数:28,代码来源:Options.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:DynEnvMaterial.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:CPUSphericalBillboardComponent.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:BakerShader.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:27,代码来源:SkinnedIObject.cs
示例9: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
mstate = Mouse.GetState();
this.engine = engine;
base.InitScreen(GraphicInfo, engine);
}
开发者ID:tubitos,项目名称:1,代码行数:7,代码来源:Menu.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:ChangingMessagesScreen.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:34,代码来源:Basic2DParticleScreen.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:PrePassShader.cs
示例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);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:StealthPostEffect.cs
示例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();
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:DynEnvMaterial.cs
示例15: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
base.InitScreen(GraphicInfo, engine);
CPUSphericalBillboardComponent = new CPUSphericalBillboardComponent();
engine.AddComponent(CPUSphericalBillboardComponent);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:Fluids28Screen.cs
示例16: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
base.InitScreen(GraphicInfo, engine);
engine.AddComponent(new DebugDraw());
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:OctreeScreen.cs
示例17: 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)
{
//mix with last frame downsampled
if (tex != null)
{
rHelper.PushRenderTarget(rtend);
rHelper.RenderTextureComplete(tex, Color.FromNonPremultiplied(255, 255, 255, 255), GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
rHelper.RenderTextureComplete(ImageToProcess, Color.FromNonPremultiplied(255, 255, 255, Amount), GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp, BlendState.AlphaBlend);
end = rHelper.PopRenderTargetAsSingleRenderTarget2D();
}
//DownSample
rHelper.PushRenderTarget(rt);
rHelper.Clear(Color.Black);
if (end == null)
{
rHelper.RenderTextureComplete(ImageToProcess, Color.White, rt.Bounds, Matrix.Identity, ImageToProcess.Bounds, true, SpriteSortMode.Deferred, SamplerState.AnisotropicClamp);
}
else
{
rHelper.RenderTextureComplete(end, Color.White, rt.Bounds, Matrix.Identity, ImageToProcess.Bounds, true, SpriteSortMode.Deferred, SamplerState.AnisotropicClamp);
}
tex = rHelper.PopRenderTargetAsSingleRenderTarget2D();
if(end!=null)
rHelper.RenderTextureComplete(end, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
else
rHelper.RenderTextureComplete(ImageToProcess, Color.White, GraphicInfo.FullScreenRectangle, Matrix.Identity, null, true, SpriteSortMode.Deferred, SamplerState.LinearClamp);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:30,代码来源:MotionBlurPostEffect.cs
示例18: PreDrawnPhase
public void PreDrawnPhase(Microsoft.Xna.Framework.GameTime gt, PloobsEngine.SceneControl.IWorld mundo, PloobsEngine.SceneControl.IObject obj, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights, PloobsEngine.SceneControl.RenderHelper render)
{
Vector3 pos = obj.PhysicObject.Position;
render.PushRasterizerState(d);
render.RenderSceneToTextureCube(RenderTargetCube,
Color.AliceBlue, mundo, ref pos, gt, true, false, new List<PloobsEngine.SceneControl.IObject>() { obj });
render.PopRasterizerState();
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:8,代码来源:DynEnvMaterial.cs
示例19: InitScreen
protected override void InitScreen(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.EngineStuff engine)
{
FPSCounter fp = new FPSCounter();
fp.CombinedFps += new FpsEvent(fp_CombinedFps);
engine.AddComponent(fp);
engine.IsFixedTimeStep = false;
base.InitScreen(GraphicInfo, engine);
}
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:8,代码来源:MultScreen.cs
示例20: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
this.ginfo = ginfo;
spriteBatch = factory.GetSpriteBatch();
basicEffect = factory.GetBasicEffect();
basicEffect.TextureEnabled = true;
base.Initialize(ginfo, factory, obj);
}
开发者ID:tpastor,项目名称:RandomPrototypes,代码行数:8,代码来源:Sprite3DShader.cs
注:本文中的PloobsEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论