Support Forum       G3D Web Page     
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
G3D::CubeMap Class Reference

A CPU seamless cube map. More...

Inherits G3D::ReferenceCountedObject.

Public Member Functions

Color3 bilinear (const Vector3 &v) const
 
const class ImageFormatformat () const
 
Color3 nearest (const Vector3 &v) const
 
int size () const
 The size of one face, in pixels, based on the input (not counting padding used for seamless cube mapping. More...
 

Static Public Member Functions

static shared_ptr< CubeMapcreate (const Array< shared_ptr< Image3 >> &face, const Color3 &readMultiplyFirst=Color3::one(), const Color3 &readAddSecond=Color3::zero())
 

Protected Member Functions

 CubeMap (const Array< shared_ptr< Image3 >> &face, const Color3 &readMultiplyFirst, const Color3 &readAddSecond)
 
Vector2 pixelCoord (const Vector3 &vec, CubeFace &face) const
 Returns a pixel coordinate in m_faceArray[face]. More...
 

Static Protected Member Functions

template<class T , class ... ArgTypes>
static shared_ptr< T > createShared (ArgTypes &&... args)
 Like std::make_shared, but works for protected constructors. More...
 

Protected Attributes

Image3 m_faceArray [6]
 
float m_fSize
 Size before padding. More...
 
int m_iSize
 Size before padding. More...
 

Detailed Description

A CPU seamless cube map.

See also
G3D:Image, G3D::Texture

Constructor & Destructor Documentation

◆ CubeMap()

G3D::CubeMap::CubeMap ( const Array< shared_ptr< Image3 >> &  face,
const Color3 readMultiplyFirst,
const Color3 readAddSecond 
)
protected

Member Function Documentation

◆ bilinear()

Color3 G3D::CubeMap::bilinear ( const Vector3 v) const

◆ create()

static shared_ptr<CubeMap> G3D::CubeMap::create ( const Array< shared_ptr< Image3 >> &  face,
const Color3 readMultiplyFirst = Color3::one(),
const Color3 readAddSecond = Color3::zero() 
)
static
Parameters
faceAll faces must have the same dimensions.
gammaApply this gamma: L = p^gamma after reading back values (before bilinear interpolation, and before scale and bias)

◆ createShared()

template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared ( ArgTypes &&...  args)
inlinestaticprotectedinherited

Like std::make_shared, but works for protected constructors.

Call as createShared<myclass>.

◆ format()

const class ImageFormat* G3D::CubeMap::format ( ) const

◆ nearest()

Color3 G3D::CubeMap::nearest ( const Vector3 v) const

◆ pixelCoord()

Vector2 G3D::CubeMap::pixelCoord ( const Vector3 vec,
CubeFace face 
) const
protected

Returns a pixel coordinate in m_faceArray[face].

◆ size()

int G3D::CubeMap::size ( ) const

The size of one face, in pixels, based on the input (not counting padding used for seamless cube mapping.

Member Data Documentation

◆ m_faceArray

Image3 G3D::CubeMap::m_faceArray[6]
protected

◆ m_fSize

float G3D::CubeMap::m_fSize
protected

Size before padding.

◆ m_iSize

int G3D::CubeMap::m_iSize
protected

Size before padding.


documentation generated on Wed Nov 24 2021 08:01:54 using doxygen 1.8.15