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
811 stars 59 forks source link

Implement CylindricalMapping2D #120

Closed wahn closed 5 years ago

wahn commented 5 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 CylindricalMapping2D.

wahn commented 5 years ago

Implemented in the master and the traits branch (cherry picking). See commits f103416a7c33d872cff736ca33c6f3bef904781d and 1a2fddc006e285638e5d5518442cd57d02ebb62e ...