Exemple #1
0
        public CircleRangeBufferData ToSphereBuffer()
        {
            var CircleRangeBufferData = new CircleRangeBufferData();

            CircleRangeBufferData.CenterWorldPosition = SphereRangeObjectRenderingDataProvider.GetWorldPositionCenter();

            CircleRangeBufferData.Radius = SphereRangeObjectRenderingDataProvider.GetRadius();
            if (rangeTypeInherentConfigurationData.RangeColorProvider != null)
            {
                CircleRangeBufferData.AuraColor = rangeTypeInherentConfigurationData.RangeColorProvider.Invoke();
            }
            else
            {
                CircleRangeBufferData.AuraColor = rangeTypeInherentConfigurationData.RangeBaseColor;
            }

            if (rangeObjectRenderingDataProvider.IsTakingObstacleIntoConsideration())
            {
                CircleRangeBufferData.OccludedByFrustums = 1;
            }
            else
            {
                CircleRangeBufferData.OccludedByFrustums = 0;
            }

            return(CircleRangeBufferData);
        }
Exemple #2
0
 public CircleRangeRenderData(SphereGroundEffectManager sphereGroundEffectManager) : base()
 {
     GroundEffectManager = sphereGroundEffectManager;
     circleRangeBuffer   = new DynamicComputeBufferManager <CircleRangeBufferData>(CircleRangeBufferData.GetByteSize(), "CircleRangeBuffer", string.Empty, matPro);
 }