| 573 | } |
| 574 | |
| 575 | extern "C" OPENPGL_DLLEXPORT pgl_vec3f pglSurfaceSamplingDistributionSample(PGLSurfaceSamplingDistribution surfaceSamplingDistribution, pgl_point2f sample) |
| 576 | { |
| 577 | ISurfaceSamplingDistribution *gSurfaceSamplingDistribution = (ISurfaceSamplingDistribution *)surfaceSamplingDistribution; |
| 578 | openpgl::Point2 opglSample(sample.x, sample.y); |
| 579 | openpgl::Vector3 opglDirection = gSurfaceSamplingDistribution->sample(opglSample); |
| 580 | pgl_vec3f pglDirection; |
| 581 | pglVec3f(pglDirection, opglDirection.x, opglDirection.y, opglDirection.z); |
| 582 | return pglDirection; |
| 583 | } |
| 584 | |
| 585 | extern "C" OPENPGL_DLLEXPORT float pglSurfaceSamplingDistributionPDF(PGLSurfaceSamplingDistribution surfaceSamplingDistribution, pgl_vec3f direction) |
| 586 | { |