Exemple #1
0
 public void AddTarget(IMetaLodTarget target)
 {
     if (!_targets.Contains(target))
     {
         _targets.Add(target);
     }
 }
Exemple #2
0
        private void _updateLiveness(IMetaLodTarget target)
        {
            UMetaLodTargetFactorInfo factorInfo = new UMetaLodTargetFactorInfo();

            factorInfo.FactorRate_Bounds         = _calculateImpact(_factorBounds, target.GetFactorBounds());
            factorInfo.FactorRate_GeomComplexity = _calculateImpact(_factorGeomComplexity, target.GetFactorGeomComplexity());
            factorInfo.FactorRate_PSysComplexity = _calculateImpact(_factorPSysComplexity, target.GetFactorPSysComplexity());
            factorInfo.FactorRate_VisualImpact   = _calculateImpact(_factorBounds, target.GetFactorBounds());
            factorInfo.FactorRate_UserFactors    = 0.0f;
            foreach (var factor in _userFactors)
            {
                factorInfo.FactorRate_UserFactors += _calculateImpact(factor, target.GetUserFactor(factor.Name));
            }

            // impact factors accumulation
            float factorRate = 1.0f - factorInfo.GetAccumulated();

            // perform liveness calculation
            float distance = target.GetDistance() * factorRate;
            float liveness = 1.0f - UMetaLodUtil.Percent(_distInnerAttenuated, _distOuterAttenuated, distance);

            if (UMetaLodConfig.EnableDebuggingOutput)
            {
                target.OutputDebugInfo(ref factorInfo);
            }

            target.SetLiveness(liveness);
        }
Exemple #3
0
 public void RemoveTarget(IMetaLodTarget target)
 {
     if (_targets.Contains(target))
     {
         _targets.Remove(target);
     }
 }
Exemple #4
0
 public void AddTarget(IMetaLodTarget target)
 {
     if (!_targets.Contains(target))
     {
         _targets.Add(target);
     }
 }
Exemple #5
0
        private void _updateLiveness(IMetaLodTarget target)
        {
            UMetaLodTargetFactorInfo factorInfo = new UMetaLodTargetFactorInfo();
            factorInfo.FactorRate_Bounds = _calculateImpact(_factorBounds, target.GetFactorBounds());
            factorInfo.FactorRate_GeomComplexity = _calculateImpact(_factorGeomComplexity, target.GetFactorGeomComplexity());
            factorInfo.FactorRate_PSysComplexity = _calculateImpact(_factorPSysComplexity, target.GetFactorPSysComplexity());
            factorInfo.FactorRate_VisualImpact = _calculateImpact(_factorBounds, target.GetFactorBounds());
            factorInfo.FactorRate_UserFactors = 0.0f;
            foreach (var factor in _userFactors)
                factorInfo.FactorRate_UserFactors += _calculateImpact(factor, target.GetUserFactor(factor.Name));

            // impact factors accumulation
            float factorRate = 1.0f - factorInfo.GetAccumulated();

            // perform liveness calculation
            float distance = target.GetDistance() * factorRate;
            float liveness = 1.0f - UMetaLodUtil.Percent(_distInnerAttenuated, _distOuterAttenuated, distance);

            if (UMetaLodConfig.EnableDebuggingOutput)
                target.OutputDebugInfo(ref factorInfo);

            target.SetLiveness(liveness);
        }
Exemple #6
0
 public void RemoveTarget(IMetaLodTarget target)
 {
     if (_targets.Contains(target))
     {
         _targets.Remove(target);
     }
 }