|
AGX Dynamics 2.42.1.1
|
A channel is a directional data transfer connection between two buffers. More...
#include <Channel.h>
Public Member Functions | |
| Channel () | |
| Default constructor. | |
| Channel (Buffer *target, Buffer *source) | |
| Constructor. | |
| ~Channel () | |
| Destructor. | |
| void | connect (Buffer *target, Buffer *source) |
| void | flip () |
| Flip the direction of the channel. | |
| Buffer * | getSourceBuffer () |
| Buffer * | getTargetBuffer () |
| void | postTransfer () |
| Perform local data copying and transformations if needed. | |
| agx::SyncTag * | transfer (size_t targetOffset, size_t sourceOffset, size_t numElements, bool blocking) |
| Transmit data on the channel. | |
A channel is a directional data transfer connection between two buffers.
The buffers must have the same attribute type (eg. Vec3 -> Vec3), but does not need to be the same attribute instance (eg. it is possible to set up a channel of particle forces -> rigid body forces). If the type format differs, data transformation is automatically done via a temporary buffer.
| agxData::Channel::Channel | ( | ) |
Default constructor.
Constructor.
| target | The target buffer. |
| source | The source buffer. |
| agxData::Channel::~Channel | ( | ) |
Destructor.
| void agxData::Channel::flip | ( | ) |
Flip the direction of the channel.
| Buffer * agxData::Channel::getSourceBuffer | ( | ) |
| Buffer * agxData::Channel::getTargetBuffer | ( | ) |
| void agxData::Channel::postTransfer | ( | ) |
Perform local data copying and transformations if needed.
Must be called after transfer. TODO Use automated callbacks in transfer tag instead
| agx::SyncTag * agxData::Channel::transfer | ( | size_t | targetOffset, |
| size_t | sourceOffset, | ||
| size_t | numElements, | ||
| bool | blocking | ||
| ) |
Transmit data on the channel.
If the target buffer is not large enough, it is automatically resized.
| targetOffset | The offset in the target buffer (num elements). |
| sourceOffset | The offset in the source buffer (num elements). |
| numElements | The number of elements to transfer. |
| blocking | Set true for blocking transfer. |