Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:65cc530390ac97b31a9b0991f655e0a9132608a9
  • Code
  • Branches (2)
  • Releases (0)
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • refs/heads/milos
    No releases to show
  • f330b95
  • /
  • spectrum.h
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
content badge
swh:1:cnt:56771a376e3cbd39fbb7c5313e6e2885b8f14d24
directory badge
swh:1:dir:f330b95e429aef3c8b704e176e219296e4603842
revision badge
swh:1:rev:6cab40424e6067bad443ed0a57e51094db898800
snapshot badge
swh:1:snp:65cc530390ac97b31a9b0991f655e0a9132608a9

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 6cab40424e6067bad443ed0a57e51094db898800 authored by Milos Hasan on 14 March 2019, 18:14:50 UTC
fix linux makefile
Tip revision: 6cab404
spectrum.h
/*

Copyright 2018 Lingqi Yan

This file is part of WaveOpticsBrdf.

WaveOpticsBrdf is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

WaveOpticsBrdf is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with WaveOpticsBrdf.  If not, see <https://www.gnu.org/licenses/>.

*/

/*
    This file is part of Mitsuba, a physically based rendering system.

    Copyright (c) 2007-2014 by Wenzel Jakob and others.

    Mitsuba is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License Version 3
    as published by the Free Software Foundation.

    Mitsuba is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef SPECTRUM_H
#define SPECTRUM_H

#include <vector>
using namespace std;

const int SPECTRUM_SAMPLES = 8;
const int CIE_samples = 471;
extern const float CIE_wavelengths[CIE_samples];
extern const float CIE_X_entries[CIE_samples];
extern const float CIE_Y_entries[CIE_samples];
extern const float CIE_Z_entries[CIE_samples];
extern const float CIE_D65_entries[CIE_samples];

void SpectrumInit();

void SpectrumToXYZ(const vector<float> &s, float &x, float &y, float &z);

void XYZToRGB(float x, float y, float z, float &r, float &g, float &b);

void SpectrumToRGB(const vector<float> &s, float &r, float &g, float &b);

#endif

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API