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); }
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); }