wahn / rs_pbrt

Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code. See also https://www.rs-pbrt.org/about ...
https://www.rs-pbrt.org
Other
809 stars 59 forks source link

Implement SphericalMapping2D #119

Closed wahn closed 4 years ago

wahn commented 4 years ago

On the C++ side we have four classes being derived from TextureMapping2D:

> rg -tcpp "public TextureMapping2D"
core/texture.h
59:class UVMapping2D : public TextureMapping2D {
70:class SphericalMapping2D : public TextureMapping2D {
83:class CylindricalMapping2D : public TextureMapping2D {
100:class PlanarMapping2D : public TextureMapping2D {

So far we have only implemented two on the Rust side:

> rg -trust "impl TextureMapping2D"
src/core/texture.rs
66:impl TextureMapping2D for UVMapping2D {
96:impl TextureMapping2D for PlanarMapping2D {

One of the missing implementors (of the TextureMapping2D trait) is SphericalMapping2D.

wahn commented 4 years ago

Implemented in the master and the traits branch (cherry picking). See commits f113b186c62c07a9418db344d9f6a25e96ed19e4 and 6c4501c43118f8f2f9e9afc2d8ae3590da5ae41a ...