59 lines
1.5 KiB
Rust
59 lines
1.5 KiB
Rust
use anyhow::Result;
|
|
use shared::{
|
|
core::texture::SpectrumType,
|
|
textures::{FloatCheckerboardTexture, SpectrumCheckerboardTexture},
|
|
utils::Transform,
|
|
};
|
|
|
|
use crate::{
|
|
core::texture::{
|
|
CreateSpectrumTexture, FloatTexture, FloatTextureTrait, SpectrumTexture,
|
|
SpectrumTextureTrait,
|
|
},
|
|
utils::{FileLoc, TextureParameterDictionary},
|
|
};
|
|
|
|
pub trait CreateFloatCheckerboardTexture {
|
|
fn create(
|
|
render_from_texture: Transform,
|
|
parameters: TextureParameterDictionary,
|
|
loc: FileLoc,
|
|
) -> Result<FloatTexture>;
|
|
}
|
|
|
|
impl CreateFloatCheckerboardTexture for FloatCheckerboardTexture {
|
|
fn create(
|
|
_render_from_texture: Transform,
|
|
_parameters: TextureParameterDictionary,
|
|
_loc: FileLoc,
|
|
) -> Result<FloatTexture> {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl FloatTextureTrait for FloatCheckerboardTexture {
|
|
fn evaluate(&self, _ctx: &shared::core::texture::TextureEvalContext) -> shared::Float {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl CreateSpectrumTexture for SpectrumCheckerboardTexture {
|
|
fn create(
|
|
_render_from_texture: Transform,
|
|
_parameters: TextureParameterDictionary,
|
|
_spectrum_type: SpectrumType,
|
|
_loc: FileLoc,
|
|
) -> Result<SpectrumTexture> {
|
|
todo!()
|
|
}
|
|
}
|
|
|
|
impl SpectrumTextureTrait for SpectrumCheckerboardTexture {
|
|
fn evaluate(
|
|
&self,
|
|
_ctx: &shared::core::texture::TextureEvalContext,
|
|
_lambda: &shared::spectra::SampledWavelengths,
|
|
) -> shared::spectra::SampledSpectrum {
|
|
todo!()
|
|
}
|
|
}
|