ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
pba::CuTexImage Class Reference

#include <CuTexImage.h>

Public Member Functions

bool InitTexture (unsigned int width, unsigned int height, unsigned int nchannel=1)
 
void SetTexture (void *data, unsigned int width, unsigned int nchannel=1)
 
void SwapData (CuTexImage &src)
 
void CopyToHost (void *buf)
 
void CopyFromDevice (const void *buf)
 
void CopyFromHost (const void *buf)
 
void SaveToFile (const char *name)
 
void ReleaseData ()
 
float * data ()
 
bool IsValid ()
 
unsigned int GetLength ()
 
unsigned int GetImgWidth ()
 
unsigned int GetImgHeight ()
 
size_t GetReservedWidth ()
 
size_t GetDataSize ()
 
size_t GetRequiredSize ()
 
unsigned int IsHugeData ()
 
 CuTexImage ()
 
virtual ~CuTexImage ()
 

Protected Attributes

bool _owner
 
void * _cuData
 
unsigned int _numChannel
 
unsigned int _imgWidth
 
unsigned int _imgHeight
 
size_t _numBytes
 

Detailed Description

Definition at line 31 of file CuTexImage.h.

Constructor & Destructor Documentation

◆ CuTexImage()

CuTexImage::CuTexImage ( )

Definition at line 38 of file CuTexImage.cpp.

References NULL.

◆ ~CuTexImage()

CuTexImage::~CuTexImage ( )
virtual

Definition at line 45 of file CuTexImage.cpp.

Member Function Documentation

◆ CopyFromDevice()

void CuTexImage::CopyFromDevice ( const void *  buf)

Definition at line 115 of file CuTexImage.cpp.

References NULL.

◆ CopyFromHost()

void CuTexImage::CopyFromHost ( const void *  buf)

Definition at line 109 of file CuTexImage.cpp.

References NULL.

Referenced by pba::SparseBundleCU::RunProfileSteps(), and pba::SparseBundleCU::TransferDataToGPU().

◆ CopyToHost()

void CuTexImage::CopyToHost ( void *  buf)

◆ data()

◆ GetDataSize()

size_t pba::CuTexImage::GetDataSize ( )
inline

Definition at line 65 of file CuTexImage.h.

References _numBytes, and GetRequiredSize().

Referenced by IsValid().

◆ GetImgHeight()

unsigned int pba::CuTexImage::GetImgHeight ( )
inline

Definition at line 59 of file CuTexImage.h.

References _imgHeight.

◆ GetImgWidth()

unsigned int pba::CuTexImage::GetImgWidth ( )
inline

Definition at line 58 of file CuTexImage.h.

References _imgWidth.

◆ GetLength()

unsigned int pba::CuTexImage::GetLength ( )
inline

Definition at line 55 of file CuTexImage.h.

References _imgHeight, _imgWidth, and _numChannel.

Referenced by IsHugeData().

◆ GetRequiredSize()

size_t pba::CuTexImage::GetRequiredSize ( )
inline

Definition at line 66 of file CuTexImage.h.

References _imgHeight, _imgWidth, and _numChannel.

Referenced by data(), and GetDataSize().

◆ GetReservedWidth()

size_t pba::CuTexImage::GetReservedWidth ( )
inline

◆ InitTexture()

bool CuTexImage::InitTexture ( unsigned int  width,
unsigned int  height,
unsigned int  nchannel = 1 
)

Definition at line 80 of file CuTexImage.cpp.

References height, size, and width.

Referenced by pba::SparseBundleCU::AdjustBundleAdjsutmentMode().

◆ IsHugeData()

unsigned int pba::CuTexImage::IsHugeData ( )
inline

Definition at line 69 of file CuTexImage.h.

References GetLength().

◆ IsValid()

◆ ReleaseData()

void CuTexImage::ReleaseData ( )

◆ SaveToFile()

void CuTexImage::SaveToFile ( const char *  name)

Definition at line 132 of file CuTexImage.cpp.

◆ SetTexture()

void CuTexImage::SetTexture ( void *  data,
unsigned int  width,
unsigned int  nchannel = 1 
)

◆ SwapData()

Member Data Documentation

◆ _cuData

void* pba::CuTexImage::_cuData
protected

Definition at line 34 of file CuTexImage.h.

Referenced by data(), IsValid(), and SwapData().

◆ _imgHeight

unsigned int pba::CuTexImage::_imgHeight
protected

Definition at line 37 of file CuTexImage.h.

Referenced by GetImgHeight(), GetLength(), GetRequiredSize(), GetReservedWidth(), and SwapData().

◆ _imgWidth

unsigned int pba::CuTexImage::_imgWidth
protected

Definition at line 36 of file CuTexImage.h.

Referenced by GetImgWidth(), GetLength(), GetRequiredSize(), and SwapData().

◆ _numBytes

size_t pba::CuTexImage::_numBytes
protected

Definition at line 38 of file CuTexImage.h.

Referenced by GetDataSize(), GetReservedWidth(), and SwapData().

◆ _numChannel

unsigned int pba::CuTexImage::_numChannel
protected

Definition at line 35 of file CuTexImage.h.

Referenced by GetLength(), GetRequiredSize(), GetReservedWidth(), and SwapData().

◆ _owner

bool pba::CuTexImage::_owner
protected

Definition at line 33 of file CuTexImage.h.

Referenced by SwapData().


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