TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
List of all members
iBitmap3D Struct Referenceabstract
Inheritance diagram for iBitmap3D:
iBitmapBase iUnknown

Detailed Description

3D Bitmap interface.

             *============*
            /||||||||||||/| <== Slice Pitch
           /||||||||||||/||     (Num of bytes to go
          /||||||||||||/|/|      from the top left
         *===+========*|/ |      corner of one slice
         ||||||||||||||/  |      to the other)
         |============|   |
Depth    |   *========+===*
(R coo)  |  /||||||||||||/ <=== Row Pitch
(Slice)  | /==========|=/       Height
         |/           |/        (T Coo)
         *============*
         Width (S coo)

General

virtual tBool SetMemoryAddress (tPtr apAddr, tBool abFreeData, tU32 anRowPitch=eInvalidHandle, tU32 anSlicePitch=eInvalidHandle)=0
 Set the memory address. More...
 
virtual tU32 GetRowPitch () const =0
 Get the number of bytes per row {Property}. More...
 
virtual tU32 GetSlicePitch () const =0
 Get the number of bytes per slice {Property}. More...
 
virtual tU32 GetSize () const =0
 Get the size in bytes. {Property}. More...
 
virtual tPtr GetData () const =0
 Get the data pointer. {Property}{NoAutomation}. More...
 
virtual tPtr GetSlicePtr (tU32 anSlice) const =0
 Get the slice data pointer. {Property}{NoAutomation}. More...
 
virtual iBitmap2DCreateSliceBitmap (tU32 anSlice) const =0
 Create a 2d bitmap which points to the memory of the specified slice. {NoAutomation}. More...
 

Derived bitmaps creation

virtual iBitmap3DCreateResized (tU32 anW, tU32 anH, tU32 anD) const =0
 Create a resized copy of this bitmap. More...
 

Mip maps

virtual iBitmap3DGetMipMap (tU32 ulIdx) const =0
 Get the indicated mip map. {Property}. More...
 
virtual iBitmap3DGetLevel (tU32 anIndex) const =0
 Get the bitmap at the specified level. More...
 

Pixel format

virtual tBool BeginUnpackPixels ()=0
 Begin unpacking pixels. More...
 
virtual void EndUnpackPixels ()=0
 End unpacking pixels. More...
 

Blitting

virtual tBool Blit (const iBitmap3D *apSrc, const sVec3i &avSrcMin=sVec3i::Zero(), const sVec3i &avDestMin=sVec3i::Zero(), const sVec3i &avSize=sVec3i::Zero())=0
 Blit a bitmap in this bitmap. More...
 

Primitives

virtual void PutPixel (const sVec3i &avPos, tPtr col)=0
 Put a pixel at the specified position. {NoAutomation}. More...
 
virtual tPtr GetPixel (const sVec3i &avPos, tPtr pOut) const =0
 Get a pixel at the specified position. {NoAutomation}. More...
 
virtual void Clear (tPtr pColor=NULL)=0
 Clear the bitmap {NoAutomation}. More...
 
virtual void ClearBox (const sVec3i &avMin, const sVec3i &avMax, tPtr pColor)=0
 Clear the bitmap. More...
 
virtual void PutPixelf (const sVec3i &avPos, const sColor4f &avCol)=0
 Put a pixel at the specified position. More...
 
virtual sColor4f GetPixelf (const sVec3i &avPos) const =0
 Get a pixel at the specified position. More...
 
virtual void Clearf (const sColor4f &avCol)=0
 Clear the bitmap. More...
 
virtual void ClearBoxf (const sVec3i &avMin, const sVec3i &avMax, const sColor4f &avCol)=0
 Clear the bitmap. More...
 

Additional Inherited Members

- Public Member Functions inherited from iBitmapBase
virtual eBitmapType GetType () const =0
 Return the bitmap type. {Property}. More...
 
virtual tU32 GetWidth () const =0
 Get the texture width. {Property}. More...
 
virtual tU32 GetHeight () const =0
 Get the texture height. {Property}. More...
 
virtual tU32 GetDepth () const =0
 Get the texture depth. {Property}. More...
 
virtual iPixelFormatGetPixelFormat () const =0
 Get the pixel format of the texture. {Property}. More...
 
virtual tBool CreateMipMaps (tU32 anNumMipMaps, tBool abCompute)=0
 Create the mipmaps. More...
 
virtual void RemoveMipMaps ()=0
 Remove the mipmaps. More...
 
virtual tU32 GetNumMipMaps () const =0
 Get the number of mipmaps. {Property}. More...
 
virtual iBitmapBaseClone (ePixelFormatBlit eBlit=ePixelFormatBlit_Normal) const =0
 Create a copy of the bitmap. More...
 
virtual iBitmapBaseCreateConvertedFormat (const iPixelFormat *pFmt) const =0
 Create a copy of the bitmap that use the given format. More...
 
virtual iBitmapBaseCreateGammaCorrected (tF32 factor) const =0
 Create a gamma corrected bitmap. More...
 
virtual tBool GammaCorrect (tF32 factor)=0
 Correct gamma of the bitmap. More...
 
- Public Member Functions inherited from iUnknown
virtual tBool IsOK () const =0
 Check if the object is valid. More...
 
virtual tI32 AddRef ()=0
 Signal that one more reference of the object has been created. More...
 
virtual tI32 Release ()=0
 Release a reference of the object. More...
 
virtual void DeleteThis ()=0
 Bypass any reference counting and delete this object. More...
 
virtual void Invalidate ()=0
 Invalidate the object. More...
 
virtual iUnknownQueryInterface (const tUUID &aIID)=0
 Query an interface. More...
 
virtual void ListInterfaces (iMutableCollection *apLst, tU32 anFlags) const =0
 Fill a UUID list containing the UUIDs of the implemented interfaces. More...
 
virtual tI32 SetNumRefs (tI32 anNumRefs)=0
 Set the reference counter directly. More...
 
virtual tI32 GetNumRefs () const =0
 Get the number of references to this object. More...
 

Member Function Documentation

virtual tBool SetMemoryAddress ( tPtr  apAddr,
tBool  abFreeData,
tU32  anRowPitch = eInvalidHandle,
tU32  anSlicePitch = eInvalidHandle 
)
pure virtual

Set the memory address.

Parameters
apAddris the address of the bitmap's data.
abFreeDataif eTrue the data will be freed automatically when the bitmap is released.
anRowPitchif != eInvalidHandle will adjust the bitmap's row pitch.
anSlicePitchif != eInvalidHandle will adjust the bitmap's slice pitch.
Returns
eFalse if apAddre is NULL, else eTrue.
Remarks
If abFreeData the memory must have been allocated with niNew or niMalloc.
virtual tU32 GetRowPitch ( ) const
pure virtual

Get the number of bytes per row {Property}.

virtual tU32 GetSlicePitch ( ) const
pure virtual

Get the number of bytes per slice {Property}.

virtual tU32 GetSize ( ) const
pure virtual

Get the size in bytes. {Property}.

virtual tPtr GetData ( ) const
pure virtual

Get the data pointer. {Property}{NoAutomation}.

virtual tPtr GetSlicePtr ( tU32  anSlice) const
pure virtual

Get the slice data pointer. {Property}{NoAutomation}.

virtual iBitmap2D* CreateSliceBitmap ( tU32  anSlice) const
pure virtual

Create a 2d bitmap which points to the memory of the specified slice. {NoAutomation}.

Remarks
Creates a bitmap that points to the slice data, that bitmap DOES NOT own the memory, if the 3d bitmap's memory is deleted that new bitmaps become invalid.
virtual iBitmap3D* CreateResized ( tU32  anW,
tU32  anH,
tU32  anD 
) const
pure virtual

Create a resized copy of this bitmap.

virtual iBitmap3D* GetMipMap ( tU32  ulIdx) const
pure virtual

Get the indicated mip map. {Property}.

virtual iBitmap3D* GetLevel ( tU32  anIndex) const
pure virtual

Get the bitmap at the specified level.

Remarks
0 is the main surface, 1 is the first mip map, and so on. {Property}
virtual tBool BeginUnpackPixels ( )
pure virtual

Begin unpacking pixels.

virtual void EndUnpackPixels ( )
pure virtual

End unpacking pixels.

virtual tBool Blit ( const iBitmap3D apSrc,
const sVec3i avSrcMin = sVec3i::Zero(),
const sVec3i avDestMin = sVec3i::Zero(),
const sVec3i avSize = sVec3i::Zero() 
)
pure virtual

Blit a bitmap in this bitmap.

Remarks
Clipping and pixel format conversion are automatically performed.
virtual void PutPixel ( const sVec3i avPos,
tPtr  col 
)
pure virtual

Put a pixel at the specified position. {NoAutomation}.

virtual tPtr GetPixel ( const sVec3i avPos,
tPtr  pOut 
) const
pure virtual

Get a pixel at the specified position. {NoAutomation}.

virtual void Clear ( tPtr  pColor = NULL)
pure virtual

Clear the bitmap {NoAutomation}.

virtual void ClearBox ( const sVec3i avMin,
const sVec3i avMax,
tPtr  pColor 
)
pure virtual

Clear the bitmap.

Remarks
The right, bottom and back edges are not filled. {NoAutomation}
virtual void PutPixelf ( const sVec3i avPos,
const sColor4f avCol 
)
pure virtual

Put a pixel at the specified position.

virtual sColor4f GetPixelf ( const sVec3i avPos) const
pure virtual

Get a pixel at the specified position.

virtual void Clearf ( const sColor4f avCol)
pure virtual

Clear the bitmap.

virtual void ClearBoxf ( const sVec3i avMin,
const sVec3i avMax,
const sColor4f avCol 
)
pure virtual

Clear the bitmap.

Remarks
The right and bottom edges are not filled.