Blender V5.0
kernel_camera_projection_test.cpp File Reference
#include <gtest/gtest.h>
#include "util/math.h"
#include "util/types.h"
#include "kernel/camera/projection.h"

Go to the source code of this file.

Classes

struct  CommonValues
 The CommonValues struct contains information about the tests which is common across the different tests. Derived classes may override functions to make tests less strict if necessary. More...
struct  Spherical
struct  Equirectangular
struct  FisheyeEquidistant
struct  FisheyeEquisolid
struct  MirrorBall
struct  EquiangularCubemapFace
class  PanoramaProjection< T >

Typedefs

using MyTypes

Functions

CCL_NAMESPACE_BEGIN TEST (KernelCamera, FisheyeLensPolynomialRoundtrip)
 Test fisheye_lens_polynomial_to_direction and its inverse direction_to_fisheye_lens_polynomial by checking if sensor position equals direction_to_fisheye_lens_polynomial(fisheye_lens_polynomial_to_direction(sensor position)) for a couple of sensor positions and a couple of different sets of parameters.
 TEST (KernelCamera, FisheyeLensPolynomialToDirectionSymmetry)
 Test symmetry properties of fisheye_lens_polynomial_to_direction.
 TEST (KernelCamera, FisheyeLensPolynomialToDirection)
 Test fisheye_lens_polynomial_to_direction with a couple of hand-crafted reference values.
 TYPED_TEST_SUITE (PanoramaProjection, MyTypes)
 TYPED_TEST (PanoramaProjection, round_trip)
 Test <projection>to_direction and its inverse direction_to<projection> by checking if sensor position equals direction_to_<projection>(<projection>_to_direction(sensor position)) for a couple of sensor positions and a couple of different sets of parameters.

Typedef Documentation

◆ MyTypes

Function Documentation

◆ TEST() [1/3]

CCL_NAMESPACE_BEGIN TEST ( KernelCamera ,
FisheyeLensPolynomialRoundtrip  )

Test fisheye_lens_polynomial_to_direction and its inverse direction_to_fisheye_lens_polynomial by checking if sensor position equals direction_to_fisheye_lens_polynomial(fisheye_lens_polynomial_to_direction(sensor position)) for a couple of sensor positions and a couple of different sets of parameters.

Definition at line 20 of file kernel_camera_projection_test.cpp.

References direction_to_fisheye_lens_polynomial(), e, fisheye_lens_polynomial_to_direction(), len, M_PI_F, make_float4, float2::x, x, float2::y, and y.

◆ TEST() [2/3]

◆ TEST() [3/3]

TEST ( KernelCamera ,
FisheyeLensPolynomialToDirectionSymmetry  )

◆ TYPED_TEST()

TYPED_TEST ( PanoramaProjection ,
round_trip  )

Test <projection>to_direction and its inverse direction_to<projection> by checking if sensor position equals direction_to_<projection>(<projection>_to_direction(sensor position)) for a couple of sensor positions and a couple of different sets of parameters.

Definition at line 365 of file kernel_camera_projection_test.cpp.

References e, len, M_PI_2_F, M_PI_4_F, M_PI_F, size(), float2::x, float3::x, float2::y, float3::y, and float3::z.

◆ TYPED_TEST_SUITE()

TYPED_TEST_SUITE ( PanoramaProjection ,
MyTypes  )