コード例 #1
0
            VoxelAttributeEmissionOpacity GetTraceAttr()
            {
                var lightVoxel = ((LightVoxel)Light.Type);

                if (lightVoxel.Volume == null)
                {
                    return(null);
                }
                RenderVoxelVolumeData data = Voxels.VoxelRenderer.GetDataForComponent(lightVoxel.Volume);

                if (data == null)
                {
                    return(null);
                }

                VoxelAttributeEmissionOpacity traceAttr = null;

                foreach (var attr in data.Attributes)
                {
                    if (attr.GetType() == typeof(VoxelAttributeEmissionOpacity))
                    {
                        traceAttr = (VoxelAttributeEmissionOpacity)attr;
                    }
                }
                return(traceAttr);
            }
コード例 #2
0
        VoxelAttributeEmissionOpacity GetTraceAttr(RenderVoxelVolumeData data)
        {
            if (data == null)
            {
                return(null);
            }

            VoxelAttributeEmissionOpacity traceAttr = null;

            foreach (var attr in data.Attributes)
            {
                if (attr.GetType() == typeof(VoxelAttributeEmissionOpacity))
                {
                    traceAttr = (VoxelAttributeEmissionOpacity)attr;
                }
            }
            return(traceAttr);
        }