本文整理汇总了C#中Scene.FindManagers方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.FindManagers方法的具体用法?C# Scene.FindManagers怎么用?C# Scene.FindManagers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scene
的用法示例。
在下文中一共展示了Scene.FindManagers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupScene
internal static void SetupScene(Scene scene, out IReadOnlyList<IDirectLight> directLights, out IReadOnlyList<IIndirectLight> indirectLights)
{
// define deferred light managers
// - This is slightly odd, why do we need to define these here when we could just put [DefaultManager(DeferredAmbientLightManager)] on AmbientLight
// - This is so that AmientLights (a generic light class) have no connection to *deferred rendering*.
scene.GetManager<DeferredAmbientLightManager>();
scene.GetManager<DeferredPointLightManager>();
scene.GetManager<DeferredSkyboxManager>();
scene.GetManager<DeferredSpotLightManager>();
scene.GetManager<DeferredSunLightManager>();
// get lights
directLights = scene.FindManagers<IDirectLight>();
indirectLights = scene.FindManagers<IIndirectLight>();
}
示例2: Initialise
public override void Initialise(Scene scene)
{
_scene = scene;
_views = from manager in scene.FindManagers<View.Manager>()
from view in manager.Views
select view;
base.Initialise(scene);
}
示例3: PhysicsEngine
public PhysicsEngine(Scene scene)
{
forceProviders = scene.FindManagers<IForceProvider>();
integrators = scene.FindManagers<IIntegrator>();
activityManagers = scene.FindManagers<IActivityManager>();
collisionResolvers = scene.FindManagers<ICollisionResolver>();
forceAppliers = scene.FindManagers<IForceApplier>();
allowedPenetration = new Box<float>();
biasFactor = new Box<float>();
iterations = new Box<int>();
linearVelocitySleepThreshold = new Box<float>();
angularVelocitySleepThreshold = new Box<float>();
AllowedPenetration = 1;
BiasFactor = 0.2f;
Iterations = 10;
LinearVelocitySleepThreshold = 0.5f;
AngularVelocitySleepThreshold = MathHelper.TwoPi * 0.025f;
}
示例4: Initialise
public override void Initialise(Scene scene)
{
base.Initialise(scene);
_forceProviders = scene.FindManagers<IForceProvider>();
_integrators = scene.FindManagers<IIntegrator>();
_activityManagers = scene.FindManagers<IActivityManager>();
_collisionResolvers = scene.FindManagers<ICollisionResolver>();
_forceAppliers = scene.FindManagers<IForceApplier>();
_allowedPenetration = new Box<float>();
_biasFactor = new Box<float>();
_iterations = new Box<int>();
_linearVelocitySleepThreshold = new Box<float>();
_angularVelocitySleepThreshold = new Box<float>();
AllowedPenetration = 1;
BiasFactor = 0.2f;
Iterations = 10;
LinearVelocitySleepThreshold = 0.5f;
AngularVelocitySleepThreshold = MathHelper.TwoPi * 0.025f;
}