37 const std::array<
TVector2<T>, 3>& parameterizations,
A 3-D Axis-Aligned Bounding Box (AABB).
Definition TAABB3D.h:32
Basic 3-D triangle functionalities.
Definition TBasicTriangle.h:21
TVector3< T > getCentroid() const
Definition TBasicTriangle.ipp:124
T getAspectRatio() const
Calculate aspect ratio of this triangle. For a triangle, its aspect ratio is defined to be the ratio ...
Definition TBasicTriangle.ipp:166
T uniformSurfaceSamplePdfA() const
Definition TBasicTriangle.ipp:262
TVector3< T > getFaceNormal() const
Definition TBasicTriangle.ipp:108
static TVector3< T > interpolate(const std::array< TVector3< T >, 3 > &attributes, const TVector3< T > &barycentricCoords)
Definition TBasicTriangle.ipp:16
static bool calcSurfaceParamDerivatives(const std::array< TVector3< T >, 3 > &attributes, const std::array< TVector2< T >, 3 > ¶meterizations, TVector3< T > *out_dXdU, TVector3< T > *out_dXdV)
Definition TBasicTriangle.ipp:41
TVector3< T > getVb() const
Definition TBasicTriangle.ipp:284
bool isDegenerate() const
Definition TBasicTriangle.ipp:268
TVector3< T > sampleToBarycentricOsada(const std::array< T, 2 > &sample) const
Map the 2D sample to a position on the surface of the triangle. A common mapping on triangles which i...
Definition TBasicTriangle.ipp:236
TVector3< T > surfaceToBarycentric(const TVector3< T > &position) const
Definition TBasicTriangle.ipp:194
TVector3< T > safeGetFaceNormal(const TVector3< T > &failSafe={0, 1, 0}) const
Calculate face normal with a fail-safe value. The vertices may form a degenerate triangle (zero cross...
Definition TBasicTriangle.ipp:116
TVector3< T > getVa() const
Definition TBasicTriangle.ipp:278
TVector3< T > getVc() const
Definition TBasicTriangle.ipp:290
TAABB3D< T > getAABB() const
Definition TBasicTriangle.ipp:138
T getArea() const
Definition TBasicTriangle.ipp:100
TVector3< T > barycentricToSurface(const TVector3< T > &barycentricCoords) const
Definition TBasicTriangle.ipp:227
PH_DEFINE_INLINE_RULE_OF_5_MEMBERS(TBasicTriangle)
std::pair< TVector3< T >, TVector3< T > > getEdgeVectors() const
Definition TBasicTriangle.ipp:185
TBasicTriangle(TVector3< T > vA, TVector3< T > vB, TVector3< T > vC)
Definition TBasicTriangle.ipp:81
Represents a 2-D vector.
Definition TVector2.h:19
Represents a 3-D vector.
Definition TVector3.h:17
Math functions and utilities.
Definition TransformInfo.h:10