-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement new
sdfgrid
shape (OptiX only)
- Loading branch information
Showing
17 changed files
with
3,532 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,4 @@ DEVICE bool solve_quadratic(float a, float b, float c, float& x0, float&x1) { | |
|
||
return true; | ||
} | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#pragma once | ||
|
||
#include <mitsuba/render/shape.h> | ||
#include <mitsuba/core/properties.h> | ||
|
||
NAMESPACE_BEGIN(mitsuba) | ||
|
||
template <typename Float, typename Spectrum> | ||
class MI_EXPORT_LIB SDF : public Shape<Float, Spectrum> { | ||
public: | ||
MI_IMPORT_TYPES() | ||
MI_IMPORT_BASE(Shape) | ||
|
||
using typename Base::ScalarSize; | ||
|
||
// ========================================================================= | ||
//! @{ \name Accessors (normals, hessians, normals, etc) | ||
// ========================================================================= | ||
// | ||
|
||
virtual Normal3f smooth_sh(const Point3f & /*p*/, | ||
const Float * /*u_ptr*/ = nullptr, | ||
const Float * /*u_ptr*/ = nullptr, | ||
const Float * /*w_ptr*/ = nullptr) const { | ||
return Normal3f(0.f); | ||
}; | ||
|
||
virtual Normal3f smooth(const Point3f & /*p*/) const { | ||
return Normal3f(0.f); | ||
} | ||
|
||
virtual Matrix3f smooth_hessian(const Point3f & /*p*/) const { | ||
return Matrix3f(0.f); | ||
} | ||
|
||
virtual ScalarBoundingBox3f bbox() const override { | ||
return ScalarBoundingBox3f(0.f); | ||
} | ||
|
||
/// @} | ||
// ========================================================================= | ||
|
||
void traverse(TraversalCallback *callback) override; | ||
void parameters_changed(const std::vector<std::string> &/*keys*/ = {}) override; | ||
|
||
protected: | ||
SDF(const Properties &); | ||
inline SDF() {} | ||
virtual ~SDF(); | ||
|
||
MI_DECLARE_CLASS() | ||
}; | ||
|
||
MI_EXTERN_CLASS(SDF) | ||
NAMESPACE_END(mitsuba) |
Oops, something went wrong.