Open CASCADE Technology  7.4.0
Public Member Functions | Protected Attributes

Graphic3d_CubeMapPacked Class Reference

Class is intended to process cubemap packed into single image plane. More...

#include <Graphic3d_CubeMapPacked.hxx>

Inheritance diagram for Graphic3d_CubeMapPacked:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_CubeMapPacked (const TCollection_AsciiString &theFileName, const Graphic3d_ValidatedCubeMapOrder theOrder=Graphic3d_CubeMapOrder::Default())
 Initialization to load cubemef from file. - path to the cubemap image - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides. More...
 
 Graphic3d_CubeMapPacked (const Handle< Image_PixMap > &theImage, const Graphic3d_ValidatedCubeMapOrder theOrder=Graphic3d_CubeMapOrder::Default())
 Initialization to set cubemap directly by PixMap. - origin PixMap - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides. More...
 
Handle< Image_PixMapValue () override
 Returns current cubemap side as PixMap. Resulting PixMap is memory wrapper over original image. Returns null handle if current side or whole cubemap is invalid. Origin image has to contain six quad tiles having one sizes without any gaps to be valid. More...
 
 ~Graphic3d_CubeMapPacked ()
 Empty destructor. More...
 
- Public Member Functions inherited from Graphic3d_CubeMap
 Graphic3d_CubeMap (const TCollection_AsciiString &theFileName)
 Constructor defining loading cubemap from file. More...
 
 Graphic3d_CubeMap (const Handle< Image_PixMap > &thePixmap=Handle< Image_PixMap >())
 Constructor defining direct cubemap initialization from PixMap. More...
 
Standard_Boolean More () const
 Returns whether the iterator has reached the end (true if it hasn't). More...
 
Graphic3d_CubeMapSide CurrentSide () const
 Returns current cubemap side (iterator state). More...
 
void Next ()
 Moves iterator to the next cubemap side. Uses OpenGL cubemap sides order +X -> -X -> +Y -> -Y -> +Z -> -Z. More...
 
Standard_Boolean IsTopDown () const
 Returns whether row's memory layout is top-down. More...
 
void SetZInversion (Standard_Boolean theZIsInverted)
 Sets Z axis inversion (vertical flipping). More...
 
Standard_Boolean ZIsInverted () const
 Returns whether Z axis is inverted. More...
 
Graphic3d_CubeMapReset ()
 Sets iterator state to +X cubemap side. More...
 
 ~Graphic3d_CubeMap ()
 Empty destructor. More...
 
- Public Member Functions inherited from Graphic3d_TextureMap
void EnableSmooth ()
 enable texture smoothing More...
 
Standard_Boolean IsSmoothed () const
 Returns TRUE if the texture is smoothed. More...
 
void DisableSmooth ()
 disable texture smoothing More...
 
void EnableModulate ()
 enable texture modulate mode. the image is modulate with the shading of the surface. More...
 
void DisableModulate ()
 disable texture modulate mode. the image is directly decal on the surface. More...
 
Standard_Boolean IsModulate () const
 Returns TRUE if the texture is modulate. More...
 
void EnableRepeat ()
 use this methods if you want to enable texture repetition on your objects. More...
 
void DisableRepeat ()
 use this methods if you want to disable texture repetition on your objects. More...
 
Standard_Boolean IsRepeat () const
 Returns TRUE if the texture repeat is enable. More...
 
Graphic3d_LevelOfTextureAnisotropy AnisoFilter () const
 
void SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel)
 
- Public Member Functions inherited from Graphic3d_TextureRoot
 ~Graphic3d_TextureRoot ()
 Destructor. More...
 
virtual Standard_Boolean IsDone () const
 Checks if a texture class is valid or not. More...
 
const OSD_PathPath () const
 Returns the full path of the defined texture. It could be empty path if GetImage() is overridden to load image not from file. More...
 
Graphic3d_TypeOfTexture Type () const
 
const TCollection_AsciiStringGetId () const
 This ID will be used to manage resource in graphic driver. More...
 
Standard_Size Revision () const
 Return image revision. More...
 
void UpdateRevision ()
 Update image revision. Can be used for signaling changes in the texture source (e.g. file update, pixmap update) without re-creating texture source itself (since unique id should be never modified). More...
 
virtual Handle< Image_PixMapGetImage () const
 This method will be called by graphic driver each time when texture resource should be created. Default constructors allow defining the texture source as path to texture image or directly as pixmap. If the source is defined as path, then the image will be dynamically loaded when this method is called (and no copy will be preserved in this class instance). Inheritors may dynamically generate the image. Notice, image data should be in Bottom-Up order (see Image_PixMap::IsTopDown())! More...
 
const Handle< Graphic3d_TextureParams > & GetParams () const
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Attributes

Graphic3d_CubeMapOrder myOrder
 order mapping tile grit to cubemap sides More...
 
unsigned int myTileNumberX
 width of tile grid More...
 
- Protected Attributes inherited from Graphic3d_CubeMap
Graphic3d_CubeMapSide myCurrentSide
 Iterator state. More...
 
Standard_Boolean myEndIsReached
 Indicates whether end of iteration has been reached or hasn't. More...
 
Standard_Boolean myIsTopDown
 Stores rows's memory layout. More...
 
Standard_Boolean myZIsInverted
 Indicates whether Z axis is inverted that allows to synchronize vertical flip of cubemap. More...
 
- Protected Attributes inherited from Graphic3d_TextureRoot
Handle< Graphic3d_TextureParamsmyParams
 associated texture parameters More...
 
TCollection_AsciiString myTexId
 unique identifier of this resource (for sharing graphic resource); should never be modified outside constructor More...
 
Handle< Image_PixMapmyPixMap
 image pixmap - as one of the ways for defining the texture source More...
 
OSD_Path myPath
 image file path - as one of the ways for defining the texture source More...
 
Standard_Size myRevision
 image revision - for signaling changes in the texture source (e.g. file update, pixmap update) More...
 
Graphic3d_TypeOfTexture myType
 texture type More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Graphic3d_TextureRoot
static TCollection_AsciiString TexturesFolder ()
 The path to textures determined from CSF_MDTVTexturesDirectory or CASROOT environment variables. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 
- Protected Member Functions inherited from Graphic3d_TextureMap
 Graphic3d_TextureMap (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType)
 
 Graphic3d_TextureMap (const Handle< Image_PixMap > &thePixMap, const Graphic3d_TypeOfTexture theType)
 
- Protected Member Functions inherited from Graphic3d_TextureRoot
 Graphic3d_TextureRoot (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType)
 Creates a texture from a file Warning: Note that if <FileName> is NULL the texture must be realized using LoadTexture(image) method. More...
 
 Graphic3d_TextureRoot (const Handle< Image_PixMap > &thePixmap, const Graphic3d_TypeOfTexture theType)
 Creates a texture from pixmap. Please note that the implementation expects the image data to be in Bottom-Up order (see Image_PixMap::IsTopDown()). More...
 
void generateId ()
 Unconditionally generate new texture id. Should be called only within constructor. More...
 

Detailed Description

Class is intended to process cubemap packed into single image plane.

Constructor & Destructor Documentation

◆ Graphic3d_CubeMapPacked() [1/2]

Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked ( const TCollection_AsciiString theFileName,
const Graphic3d_ValidatedCubeMapOrder  theOrder = Graphic3d_CubeMapOrder::Default() 
)

Initialization to load cubemef from file. - path to the cubemap image - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides.

◆ Graphic3d_CubeMapPacked() [2/2]

Graphic3d_CubeMapPacked::Graphic3d_CubeMapPacked ( const Handle< Image_PixMap > &  theImage,
const Graphic3d_ValidatedCubeMapOrder  theOrder = Graphic3d_CubeMapOrder::Default() 
)

Initialization to set cubemap directly by PixMap. - origin PixMap - array conaining six different indexes of cubemap sides which maps tile grid to cubemap sides.

◆ ~Graphic3d_CubeMapPacked()

Graphic3d_CubeMapPacked::~Graphic3d_CubeMapPacked ( )
inline

Empty destructor.

Member Function Documentation

◆ Value()

Handle< Image_PixMap > Graphic3d_CubeMapPacked::Value ( )
overridevirtual

Returns current cubemap side as PixMap. Resulting PixMap is memory wrapper over original image. Returns null handle if current side or whole cubemap is invalid. Origin image has to contain six quad tiles having one sizes without any gaps to be valid.

Implements Graphic3d_CubeMap.

Field Documentation

◆ myOrder

Graphic3d_CubeMapOrder Graphic3d_CubeMapPacked::myOrder
protected

order mapping tile grit to cubemap sides

◆ myTileNumberX

unsigned int Graphic3d_CubeMapPacked::myTileNumberX
protected

width of tile grid


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