Open CASCADE Technology
7.7.0
|
Graphic3d_CubeMapOrder maps sides of cubemap on tiles in packed cubemap image to support different tiles order in such images. Also it can be considered as permutation of numbers from 0 to 5. It stores permutation in one integer as convolution. More...
#include <Graphic3d_CubeMapOrder.hxx>
Public Member Functions | |
Graphic3d_CubeMapOrder () | |
Default constructor. Creates empty order with zero convolution. More... | |
Graphic3d_CubeMapOrder (unsigned char thePosXLocation, unsigned char theNegXLocation, unsigned char thePosYLocation, unsigned char theNegYLocation, unsigned char thePosZLocation, unsigned char theNegZLocation) | |
Initializes order with values. More... | |
Graphic3d_CubeMapOrder (const Graphic3d_ValidatedCubeMapOrder theOrder) | |
Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder. More... | |
Graphic3d_CubeMapOrder & | Set (const Graphic3d_CubeMapOrder &theOrder) |
Alias of 'operator='. More... | |
Graphic3d_ValidatedCubeMapOrder | Validated () const |
Checks whether order is valid and returns object containing it. If order is invalid then exception will be thrown. This method is only way to create Graphic3d_ValidatedCubeMapOrder except copy constructor. More... | |
Graphic3d_CubeMapOrder & | Set (Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue) |
Sets number of tile in packed cubemap image according passed cubemap side. More... | |
Graphic3d_CubeMapOrder & | SetDefault () |
Sets default order (just from 0 to 5) More... | |
Graphic3d_CubeMapOrder & | Permute (Graphic3d_ValidatedCubeMapOrder anOrder) |
Applies another cubemap order as permutation for the current one. More... | |
Graphic3d_CubeMapOrder | Permuted (Graphic3d_ValidatedCubeMapOrder anOrder) const |
Returns permuted by other cubemap order copy of current one. More... | |
Graphic3d_CubeMapOrder & | Swap (Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide) |
Swaps values of two cubemap sides. More... | |
Graphic3d_CubeMapOrder | Swapped (Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide) const |
Returns copy of current order with swapped values of two cubemap sides. More... | |
unsigned char | Get (Graphic3d_CubeMapSide theCubeMapSide) const |
Returns value of passed cubemap side. More... | |
unsigned char | operator[] (Graphic3d_CubeMapSide theCubeMapSide) const |
Alias of 'Get'. More... | |
Graphic3d_CubeMapOrder & | Clear () |
Makes order empty. More... | |
bool | IsEmpty () const |
Checks whether order is empty. More... | |
bool | HasRepetitions () const |
Checks whether order has repetitions. More... | |
bool | HasOverflows () const |
Checks whether attempts to assign index greater than 5 to any side happed. More... | |
bool | IsValid () const |
Checks whether order is valid. Order is valid when it doesn't have repetitions and there were not attempts to assign indexes greater than 5. More... | |
Static Public Member Functions | |
static const Graphic3d_ValidatedCubeMapOrder & | Default () |
Returns default order in protector container class. It is guaranteed to be valid. More... | |
Graphic3d_CubeMapOrder maps sides of cubemap on tiles in packed cubemap image to support different tiles order in such images. Also it can be considered as permutation of numbers from 0 to 5. It stores permutation in one integer as convolution.
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder | ( | ) |
Default constructor. Creates empty order with zero convolution.
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder | ( | unsigned char | thePosXLocation, |
unsigned char | theNegXLocation, | ||
unsigned char | thePosYLocation, | ||
unsigned char | theNegYLocation, | ||
unsigned char | thePosZLocation, | ||
unsigned char | theNegZLocation | ||
) |
Initializes order with values.
Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder | ( | const Graphic3d_ValidatedCubeMapOrder | theOrder | ) |
Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder.
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Clear | ( | ) |
Makes order empty.
|
static |
Returns default order in protector container class. It is guaranteed to be valid.
unsigned char Graphic3d_CubeMapOrder::Get | ( | Graphic3d_CubeMapSide | theCubeMapSide | ) | const |
Returns value of passed cubemap side.
bool Graphic3d_CubeMapOrder::HasOverflows | ( | ) | const |
Checks whether attempts to assign index greater than 5 to any side happed.
bool Graphic3d_CubeMapOrder::HasRepetitions | ( | ) | const |
Checks whether order has repetitions.
bool Graphic3d_CubeMapOrder::IsEmpty | ( | ) | const |
Checks whether order is empty.
bool Graphic3d_CubeMapOrder::IsValid | ( | ) | const |
Checks whether order is valid. Order is valid when it doesn't have repetitions and there were not attempts to assign indexes greater than 5.
unsigned char Graphic3d_CubeMapOrder::operator[] | ( | Graphic3d_CubeMapSide | theCubeMapSide | ) | const |
Alias of 'Get'.
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Permute | ( | Graphic3d_ValidatedCubeMapOrder | anOrder | ) |
Applies another cubemap order as permutation for the current one.
Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted | ( | Graphic3d_ValidatedCubeMapOrder | anOrder | ) | const |
Returns permuted by other cubemap order copy of current one.
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set | ( | const Graphic3d_CubeMapOrder & | theOrder | ) |
Alias of 'operator='.
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Set | ( | Graphic3d_CubeMapSide | theCubeMapSide, |
unsigned char | theValue | ||
) |
Sets number of tile in packed cubemap image according passed cubemap side.
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::SetDefault | ( | ) |
Sets default order (just from 0 to 5)
Graphic3d_CubeMapOrder& Graphic3d_CubeMapOrder::Swap | ( | Graphic3d_CubeMapSide | theFirstSide, |
Graphic3d_CubeMapSide | theSecondSide | ||
) |
Swaps values of two cubemap sides.
Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped | ( | Graphic3d_CubeMapSide | theFirstSide, |
Graphic3d_CubeMapSide | theSecondSide | ||
) | const |
Returns copy of current order with swapped values of two cubemap sides.
Graphic3d_ValidatedCubeMapOrder Graphic3d_CubeMapOrder::Validated | ( | ) | const |
Checks whether order is valid and returns object containing it. If order is invalid then exception will be thrown. This method is only way to create Graphic3d_ValidatedCubeMapOrder except copy constructor.