Open CASCADE Technology 7.8.0
Public Member Functions | Static Public Member Functions
Graphic3d_CubeMapOrder Class Reference

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.
 
 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 (const Graphic3d_ValidatedCubeMapOrder &theOrder)
 Creates Graphic3d_CubeMapOrder using Graphic3d_ValidatedCubeMapOrder.
 
Graphic3d_CubeMapOrderSet (const Graphic3d_CubeMapOrder &theOrder)
 Alias of 'operator='.
 
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.
 
Graphic3d_CubeMapOrderSet (Graphic3d_CubeMapSide theCubeMapSide, unsigned char theValue)
 Sets number of tile in packed cubemap image according passed cubemap side.
 
Graphic3d_CubeMapOrderSetDefault ()
 Sets default order (just from 0 to 5)
 
Graphic3d_CubeMapOrderPermute (const Graphic3d_ValidatedCubeMapOrder &anOrder)
 Applies another cubemap order as permutation for the current one.
 
Graphic3d_CubeMapOrder Permuted (const Graphic3d_ValidatedCubeMapOrder &anOrder) const
 Returns permuted by other cubemap order copy of current one.
 
Graphic3d_CubeMapOrderSwap (Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide)
 Swaps values of two cubemap sides.
 
Graphic3d_CubeMapOrder Swapped (Graphic3d_CubeMapSide theFirstSide, Graphic3d_CubeMapSide theSecondSide) const
 Returns copy of current order with swapped values of two cubemap sides.
 
unsigned char Get (Graphic3d_CubeMapSide theCubeMapSide) const
 Returns value of passed cubemap side.
 
unsigned char operator[] (Graphic3d_CubeMapSide theCubeMapSide) const
 Alias of 'Get'.
 
Graphic3d_CubeMapOrderClear ()
 Makes order empty.
 
bool IsEmpty () const
 Checks whether order is empty.
 
bool HasRepetitions () const
 Checks whether order has repetitions.
 
bool HasOverflows () const
 Checks whether attempts to assign index greater than 5 to any side happed.
 
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.
 

Static Public Member Functions

static const Graphic3d_ValidatedCubeMapOrderDefault ()
 Returns default order in protector container class. It is guaranteed to be valid.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Graphic3d_CubeMapOrder() [1/3]

Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder ( )

Default constructor. Creates empty order with zero convolution.

◆ Graphic3d_CubeMapOrder() [2/3]

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() [3/3]

Graphic3d_CubeMapOrder::Graphic3d_CubeMapOrder ( const Graphic3d_ValidatedCubeMapOrder theOrder)

Member Function Documentation

◆ Clear()

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::Clear ( )

Makes order empty.

◆ Default()

static const Graphic3d_ValidatedCubeMapOrder & Graphic3d_CubeMapOrder::Default ( )
static

Returns default order in protector container class. It is guaranteed to be valid.

◆ Get()

unsigned char Graphic3d_CubeMapOrder::Get ( Graphic3d_CubeMapSide  theCubeMapSide) const

Returns value of passed cubemap side.

◆ HasOverflows()

bool Graphic3d_CubeMapOrder::HasOverflows ( ) const

Checks whether attempts to assign index greater than 5 to any side happed.

◆ HasRepetitions()

bool Graphic3d_CubeMapOrder::HasRepetitions ( ) const

Checks whether order has repetitions.

◆ IsEmpty()

bool Graphic3d_CubeMapOrder::IsEmpty ( ) const

Checks whether order is empty.

◆ IsValid()

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.

◆ operator[]()

unsigned char Graphic3d_CubeMapOrder::operator[] ( Graphic3d_CubeMapSide  theCubeMapSide) const

Alias of 'Get'.

◆ Permute()

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::Permute ( const Graphic3d_ValidatedCubeMapOrder anOrder)

Applies another cubemap order as permutation for the current one.

◆ Permuted()

Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Permuted ( const Graphic3d_ValidatedCubeMapOrder anOrder) const

Returns permuted by other cubemap order copy of current one.

◆ Set() [1/2]

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::Set ( const Graphic3d_CubeMapOrder theOrder)

Alias of 'operator='.

◆ Set() [2/2]

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::Set ( Graphic3d_CubeMapSide  theCubeMapSide,
unsigned char  theValue 
)

Sets number of tile in packed cubemap image according passed cubemap side.

◆ SetDefault()

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::SetDefault ( )

Sets default order (just from 0 to 5)

◆ Swap()

Graphic3d_CubeMapOrder & Graphic3d_CubeMapOrder::Swap ( Graphic3d_CubeMapSide  theFirstSide,
Graphic3d_CubeMapSide  theSecondSide 
)

Swaps values of two cubemap sides.

◆ Swapped()

Graphic3d_CubeMapOrder Graphic3d_CubeMapOrder::Swapped ( Graphic3d_CubeMapSide  theFirstSide,
Graphic3d_CubeMapSide  theSecondSide 
) const

Returns copy of current order with swapped values of two cubemap sides.

◆ Validated()

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.


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