Alien-FreeImage
view release on metacpan or search on metacpan
src/Source/OpenEXR/IlmImf/ImfEnvmap.h view on Meta::CPAN
// /
// dataWindow.max
//
// The size of the data window should be N by 6*N pixels
// (width by height), where N can be any integer greater
// than 0.
//
//--------------------------------------------------------------
//------------------------------------
// Names for the six faces of the cube
//------------------------------------
enum CubeMapFace
{
CUBEFACE_POS_X, // +X face
CUBEFACE_NEG_X, // -X face
CUBEFACE_POS_Y, // +Y face
CUBEFACE_NEG_Y, // -Y face
CUBEFACE_POS_Z, // +Z face
CUBEFACE_NEG_Z // -Z face
};
namespace CubeMap
{
//---------------------------------------------
// Width and height of a cube's face, in pixels
//---------------------------------------------
IMF_EXPORT
int sizeOfFace (const IMATH_NAMESPACE::Box2i &dataWindow);
//------------------------------------------
// Compute the region in the environment map
// that is covered by the specified face.
//------------------------------------------
IMF_EXPORT
IMATH_NAMESPACE::Box2i dataWindowForFace (CubeMapFace face,
const IMATH_NAMESPACE::Box2i &dataWindow);
//----------------------------------------------------
// Convert the coordinates of a pixel within a face
// [in the range from (0,0) to (s-1,s-1), where
// s == sizeOfFace(dataWindow)] to pixel coordinates
// in the environment map.
//----------------------------------------------------
IMF_EXPORT
IMATH_NAMESPACE::V2f pixelPosition (CubeMapFace face,
const IMATH_NAMESPACE::Box2i &dataWindow,
IMATH_NAMESPACE::V2f positionInFace);
//--------------------------------------------------------------
// Convert a 3D direction into a cube face, and a pixel position
// within that face.
//
// If you have a 3D direction, dir, the following code fragment
// finds the position, pos, of the corresponding pixel in an
// environment map with data window dw:
//
// CubeMapFace f;
// V2f pif, pos;
//
// faceAndPixelPosition (dir, dw, f, pif);
// pos = pixelPosition (f, dw, pif);
//
//--------------------------------------------------------------
IMF_EXPORT
void faceAndPixelPosition (const IMATH_NAMESPACE::V3f &direction,
const IMATH_NAMESPACE::Box2i &dataWindow,
CubeMapFace &face,
IMATH_NAMESPACE::V2f &positionInFace);
// --------------------------------------------------------
// Given a cube face and a pixel position within that face,
// compute the corresponding 3D direction.
// --------------------------------------------------------
IMF_EXPORT
IMATH_NAMESPACE::V3f direction (CubeMapFace face,
const IMATH_NAMESPACE::Box2i &dataWindow,
const IMATH_NAMESPACE::V2f &positionInFace);
}
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#endif
( run in 0.763 second using v1.01-cache-2.11-cpan-b16cb0d3907 )