Avara3D 0.2.0
C++ API reference
a3d::CubeImage Class Reference

Owns the six images used as cubemap faces. More...

#include <a3d/CubeImage.h>

Public Types

enum class  Face : uint8_t {
  X_Pos , X_Neg , Y_Pos , Y_Neg ,
  Z_Pos , Z_Neg
}
 Identifies a cubemap face by its outward axis direction. More...
 

Public Member Functions

 CubeImage (std::array< std::unique_ptr< Image >, 6 > faces)
 Takes ownership of the six cubemap face images. More...
 
unsigned width () const
 Returns the common face width in pixels. More...
 
unsigned height () const
 Returns the common face height in pixels. More...
 
unsigned bytesPerPixel () const
 Returns the common number of bytes per pixel. More...
 
Imageface (Face face) const
 Returns the Image owned for face. More...
 

Detailed Description

Owns the six images used as cubemap faces.

All faces have identical width, height, and bytes-per-pixel values.

Definition at line 25 of file CubeImage.h.

Member Enumeration Documentation

◆ Face

enum class a3d::CubeImage::Face : uint8_t
strong

Identifies a cubemap face by its outward axis direction.

Enumerator
X_Pos 

Positive X face.

X_Neg 

Negative X face.

Y_Pos 

Positive Y face.

Y_Neg 

Negative Y face.

Z_Pos 

Positive Z face.

Z_Neg 

Negative Z face.

Definition at line 31 of file CubeImage.h.

Constructor & Destructor Documentation

◆ CubeImage()

a3d::CubeImage::CubeImage ( std::array< std::unique_ptr< Image >, 6 >  faces)
explicit

Takes ownership of the six cubemap face images.

Array entries correspond to Face values in declaration order. Every face must be non-null, and all faces must have identical dimensions and pixel sizes.

Exceptions
std::invalid_argumentif a face is null or the face dimensions or bytes-per-pixel values differ.

Member Function Documentation

◆ bytesPerPixel()

unsigned a3d::CubeImage::bytesPerPixel ( ) const

Returns the common number of bytes per pixel.

◆ face()

Image * a3d::CubeImage::face ( Face  face) const

Returns the Image owned for face.

◆ height()

unsigned a3d::CubeImage::height ( ) const

Returns the common face height in pixels.

◆ width()

unsigned a3d::CubeImage::width ( ) const

Returns the common face width in pixels.


The documentation for this class was generated from the following file: