#include <surfaces/Parallelogram.h>
Inheritance diagram for Parallelogram:

Public Member Functions | |
| Parallelogram (const Vector3 &_base, const Vector3 &_u, const Vector3 &_v, SurfaceShader *_sshader) | |
| Parallelogram (const Vector3 &_base, const Vector3 &_u, const Vector3 &_v, SurfaceShader *_sshader, LightShader *_ls) | |
| Parallelogram (const Vector3 &_base, const Vector3 &_u, const Vector3 &_v, const Vector2 &_uv0, const Vector2 &_uv1, const Vector2 &_uv2, SurfaceShader *_sshader) | |
| bool | hit (Ray &r, HitRecord &rec, Context &context) const |
| bool | shadowHit (Ray &r, Context &context) const |
| BBox | boundingBox (double time0, double time1) const |
| bool | overlapsBox (const BBox &box) const |
| bool | randomPoint (Vector3 &on_light, Context &context) const |
| bool | randomDirection (const HitRecord &rec, Context &context, Vector3 &w_in, double &pdf) const |
| double | pdfDirection (const Vector3 &w_in, const HitRecord &rec, Context &context) const |
Public Attributes | |
| ONB | uvw |
| ONB of the parallelogram. | |
| Vector3 | unorm |
| normalized u offset | |
| Vector3 | vnorm |
| normalized v offset | |
| double | inverse_area |
| 1/area for pdf calculations | |
| SurfaceShader * | sshader |
| LightShader * | ls |
One vertex and offsets to neighbors. | |
| Vector3 | base |
| Vector3 | u |
| Vector3 | v |
| Vector2 | uv0 |
| Vector2 | uv1 |
| Vector2 | uv2 |
|
||||||||||||||||
|
Intersect given ray with the surface.
Implements Surface. |
|
||||||||||||
|
Intersect without visibility ordering or shading geometry.
Reimplemented from Surface. |
|
||||||||||||
|
Calculate the bounding box of the surface.
Implements Surface. |
|
|
Determine if this surface overlaps the input axis aligned box.
Implements Surface. |
|
||||||||||||
|
Randomly sample a point on the surface.
Reimplemented from Surface. |
|
||||||||||||||||||||
|
Randomly sample the solid angle subtended by the surface from rec.p.
Reimplemented from Surface. |
|
||||||||||||||||
|
We assume that a point is chosen at random on the parallelogram, so the pdf with area measure is 1/A. For a given point on the parallelogram with area dA we know Reimplemented from Surface. |
1.4.3