Rhino C++ API  8.6
Public Member Functions | List of all members
IRhRdkRenderWindow::IChannel Class Referenceabstract

#include <IRhRdkRenderWindow.h>

Inheritance diagram for IRhRdkRenderWindow::IChannel:
IRhRdkRenderWindow::IChannelEx

Public Member Functions

virtual ~IChannel ()
 
virtual void Close (void)=0
 
virtual void * EVF (const wchar_t *, void *)=0
 
virtual const void * GetValue (int x, int y) const =0
 
virtual UINT PixelSize (void) const =0
 
virtual void SetValue (int x, int y, ComponentOrder co, const void *pData)=0
 
virtual bool SetValueRect (int x, int y, int width, int height, int stride, ComponentOrder co, const void *pData)=0
 
virtual bool SetValueRect (int x, int y, int width, int height, int stride, ComponentOrder co, const void *pData, bool bUseOffset)=0
 

Constructor & Destructor Documentation

◆ ~IChannel()

virtual IRhRdkRenderWindow::IChannel::~IChannel ( )
inlinevirtual

Member Function Documentation

◆ Close()

virtual void IRhRdkRenderWindow::IChannel::Close ( void  )
pure virtual

Close the channel.

◆ EVF()

virtual void* IRhRdkRenderWindow::IChannel::EVF ( const wchar_t *  ,
void *   
)
pure virtual

Emergency virtual function for future expansion.

◆ GetValue()

virtual const void* IRhRdkRenderWindow::IChannel::GetValue ( int  x,
int  y 
) const
pure virtual

Get a value from the channel. This function is deprecated in favor of IChannelEx::GetValueEx().

Parameters
xis the horizontal pixel position. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer.
yis the vertical pixel position. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer.
Returns
A pointer to the data in the channel at the specified position.
Warning
You must know how much data the buffer contains and be ready to read the correct amount. If you try to read more data than the buffer contains, you may crash Rhino.

◆ PixelSize()

virtual UINT IRhRdkRenderWindow::IChannel::PixelSize ( void  ) const
pure virtual
Returns
The size of one pixel's data in the channel. For RDK standard channels, this value is always sizeof(float). For the special chanRGBA composite channel, this value is 4 * sizeof(float).

◆ SetValue()

virtual void IRhRdkRenderWindow::IChannel::SetValue ( int  x,
int  y,
ComponentOrder  co,
const void *  pData 
)
pure virtual

Set a value into the channel.

Parameters
xis the horizontal pixel position. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer.
yis the vertical pixel position. No validation is done on this value. The caller is responsible for ensuring that it is within the frame buffer.
cois the component order of the source data.
pDatacontains the data to store in the channel at the specified position.
Warning
If x or y are out of range or pData does not point to a big enough buffer, the function will fail and may crash Rhino.

◆ SetValueRect() [1/2]

virtual bool IRhRdkRenderWindow::IChannel::SetValueRect ( int  x,
int  y,
int  width,
int  height,
int  stride,
ComponentOrder  co,
const void *  pData 
)
pure virtual

Set a rectangle of values into the channel. The input parameters are checked for validity. If the rectangle is not fully inside the frame buffer, the function will fail.

Parameters
xis the horizontal pixel position of the left edge.
yis the vertical pixel position of the top edge.
widthis the width of the rectangle in pixels.
heightis the height of the rectangle in pixels.
strideis the number of bytes between pixel rows in the source buffer.
cois the component order of the source data.
pDatacontains the data to store in the channel starting at the specified position. There must be the correct amount of data in the correct layout to match the shape of the rectangle and the stride.
Returns
true if successful, else false.

◆ SetValueRect() [2/2]

virtual bool IRhRdkRenderWindow::IChannel::SetValueRect ( int  x,
int  y,
int  width,
int  height,
int  stride,
ComponentOrder  co,
const void *  pData,
bool  bUseOffset 
)
pure virtual

Set a rectangle of values into the channel with the ability to use x and y as offsets into pData. The input parameters are checked for validity. If the rectangle is not fully inside the frame buffer, the function will fail.

Parameters
xis the horizontal pixel position of the left edge.
yis the vertical pixel position of the top edge.
widthis the width of the rectangle in pixels.
heightis the height of the rectangle in pixels.
strideis the number of bytes between pixel rows in the source buffer.
cois the component order of the source data.
pDatacontains the data to store in the channel starting at the specified position. There must be the correct amount of data in the correct layout to match the shape of the rectangle and the stride.
bUseOffsetis true if x and y should also be used as offsets into pData, else false.
Returns
true if successful, else false.