7#include <Common/assertion.h>
Detailed information regarding a ray-primitive intersection.
Definition HitDetail.h:26
Lightweight ray intersection testing and reporting object. If an intersection is found,...
Definition HitProbe.h:27
A single triangle. This triangle type is for constructing simple shapes such as a quad or box....
Definition PTriangle.h:17
void setUVWb(const math::Vector3R &uvwB)
Definition PTriangle.h:117
const math::Vector3R & getNb() const
Definition PTriangle.h:132
const math::Vector3R & getUVWb() const
Definition PTriangle.h:147
void setUVWa(const math::Vector3R &uvwA)
Set vertex parametric coordinates. Surface parametric coordinates are set to 0 by default.
Definition PTriangle.h:112
void genPosSample(PrimitivePosSampleQuery &query, SampleFlow &sampleFlow, HitProbe &probe) const override
Generates a sample point on the surface of this primitive.
Definition PTriangle.cpp:269
const math::Vector3R & getUVWa() const
Definition PTriangle.h:142
void setNa(const math::Vector3R &nA)
Set vertex normals. Vertex normals are set to face normal by default.
Definition PTriangle.h:88
const math::Vector3R & getNc() const
Definition PTriangle.h:137
void setNb(const math::Vector3R &nB)
Definition PTriangle.h:96
bool reintersect(const Ray &ray, HitProbe &probe, const Ray &srcRay, HitProbe &srcProbe) const override
Intersect the intersected object again with a different ray.
Definition PTriangle.cpp:51
void setNc(const math::Vector3R &nC)
Definition PTriangle.h:104
const math::Vector3R & getUVWc() const
Definition PTriangle.h:152
void setUVWc(const math::Vector3R &uvwC)
Definition PTriangle.h:122
PTriangle(const math::Vector3R &vA, const math::Vector3R &vB, const math::Vector3R &vC)
Definition PTriangle.cpp:19
math::AABB3D calcAABB() const override
Calculates Axis-Aligned Bounding Box (AABB) of itself.
Definition PTriangle.cpp:137
const math::Vector3R & getNa() const
Definition PTriangle.h:127
real calcExtendedArea() const override
Calculates the area extended by this primitive. The term "extended" implies single-sided,...
Definition PTriangle.cpp:300
bool isIntersecting(const Ray &ray, HitProbe &probe) const override
Determine whether a given ray hits the object.
Definition PTriangle.cpp:37
void calcHitDetail(const Ray &ray, HitProbe &probe, HitDetail *out_detail) const override
Calculates properties of a hit, such as coordinates and normal.
Definition PTriangle.cpp:66
void calcPosPdf(PrimitivePosPdfQuery &query) const override
Given a point on the surface of this primitive, calculates the PDF of sampling this point.
Definition PTriangle.cpp:295
bool mayOverlapVolume(const math::AABB3D &volume) const override
Conservatively checks whether this object overlaps a volume.
Definition PTriangle.cpp:145
A physical shape in the scene.
Definition Primitive.h:23
Information for the probability of generating a specific sample point on a primitive.
Definition PrimitivePosPdfQuery.h:91
Information for generating a sample point on a primitive.
Definition PrimitivePosSampleQuery.h:132
Represents a ray in space.
Definition Ray.h:21
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
std::string toString() const
Definition TArithmeticArrayBase.ipp:825
bool isFinite() const
Definition TArithmeticArrayBase.ipp:585
T lengthSquared() const
Definition TVectorNBase.ipp:44
The root for all renderer implementations.
Definition EEngineProject.h:6