HDebugZBuffer

class HDebugZBuffer

HDebugZBuffer is a intended for debugging purposes only. When activated, it pops up a standalone HOOPS window in which it displays the contents of the view’s z buffer. It is pretty rough, but does the job. The z values are scanned for min and max, with background z values excluded. The values are then mapped to a linear grey scale ramp with black at the closest value and white at the furthest. The image is also upside down.

Methods

HDebugZBuffer::HDebugZBuffer(HBaseView *view)

Construct an HDebugZBuffer object.

Parameters

view: A pointer the the HBaseView object you want to associate with the object.
virtual HDebugZBuffer::~HDebugZBuffer()

virtual

The destructor.

void HDebugZBuffer::OpenglFinishPicture(HIC_Rendition const *nr, bool swap_buffers)

This method captures the z buffer and converts it to a grey scale image.

void HDebugZBuffer::Update()

This method forces a full update in the standalone window.

static void HDebugZBuffer::RegisterCallbacks()

static

A standard routine to associate callback names with their function pointers though setting the callbacks comes later.

static void HDebugZBuffer::ogl_finish_picture(HIC_Rendition const *nr, bool swap_buffers)

static

A callback for finish picture to capture the z buffer. It simply calls through to OpenglFinishPicture/

Variables

HC_KEY HDebugZBuffer::m_ViewKey

protected

HC_KEY

self-explanatory

HC_KEY HDebugZBuffer::m_StandaloneKey

protected

HC_KEY

key to the driver relevant to the standalone window

int HDebugZBuffer::m_width

protected

int
int HDebugZBuffer::m_height

protected

int

width and height of the view (and thus the amount of scratch space required)

char *HDebugZBuffer::m_StandaloneSegmentName

protected

char

path to the standalone window

float *HDebugZBuffer::m_FloatBuffer

protected

float

scratch space for z values in range [0..1]

unsigned char *HDebugZBuffer::m_GreyBuffer

protected

unsigned char

scratch space for output image

HC_KEY HDebugZBuffer::m_GreyImageKey

protected

HC_KEY

key to the Image_By_Ref that represents the visualization