public void InitializeCamera(ProceduralCameraStrategy strategy, PostProcessingProfile postProfile) { this.postProfile = postProfile; this.strategy = strategy; UpdateTransform(); }
protected void SampleStrategies(List <KeyValuePair <ProceduralCameraStrategy, float> > strategies, InterestPoint point, EmotionEvent e, float shotDuration) { //Debug.Log("Sampling strategies on frame " + frames); int samples = 4; for (int i = 0; i < samples; ++i) { ProceduralCameraStrategy s = BuildCameraStrategy(point, e, shotDuration); // If the strategy failed finding a proposal, ignore it if (!s.Propose(e, point, shotDuration)) { continue; } Matrix4x4 viewProj = s.GetViewProjection(); float frustumWeightAccum = 0f; List <InterestPoint> frustumPoints = GetInterestPointsOnFrustum(viewProj, out frustumWeightAccum); float weight = s.Evaluate(e, frustumPoints, frustumWeightAccum); strategies.Add(new KeyValuePair <ProceduralCameraStrategy, float>(s, weight)); } //if (strategies.Count == 0) // Debug.Log("Failed... "); }