/// <summary> /// Initializes a new instance of the <see cref="StrategyPositionMessageAdapter"/>. /// </summary> /// <param name="innerAdapter">The adapter, to which messages will be directed.</param> /// <param name="byOrders">To calculate the position on realized volume for orders (<see langword="true" />) or by trades (<see langword="false" />).</param> /// <param name="buffer">Storage buffer.</param> public StrategyPositionMessageAdapter(IMessageAdapter innerAdapter, bool byOrders, StorageBuffer buffer) : base(innerAdapter) { _positionManager = new StrategyPositionManager(byOrders) { Parent = this }; _buffer = buffer; }
public LightManager(int pointLightCapacity, int spotLightCapacity, int direcLightCapacity) { maxPointLights = pointLightCapacity; maxSpotLights = spotLightCapacity; maxDirecLights = direcLightCapacity; pointLights = new List <PointLight>(pointLightCapacity); spotLights = new List <SpotLight>(spotLightCapacity); direcLights = new List <DirectionalLight>(direcLightCapacity); pointLights_buffer = new StorageBuffer(PointLight.Size * pointLightCapacity, false); spotLights_buffer = new StorageBuffer(SpotLight.Size * spotLightCapacity, false); direcLights_buffer = new StorageBuffer(DirectionalLight.Size * direcLightCapacity, false); }
public VoxelDictionary() { voxelData = new StorageBuffer(ChunkConstants.DictionaryLen * 32, false); set = new voxel_tex[ChunkConstants.DictionaryLen]; }