Pointwise Plugin SDK
|
Customizes the typedef CAEP_RTITEM declaration. More...
Go to the source code of this file.
Customizes the typedef CAEP_RTITEM declaration.
If your plugin needs custom, per-instance CAE data members added to the CAEP_RTITEM typedef, you will need to modify the rtCaepInstanceData.h file.
The SDK file apiCAEPUtils.h includes rtCaepInstanceData.h before the CAEP_RTITEM struct is typedef'ed. The CAEP_RUNTIME_INSTDATADECL macro is used at the end of the struct as shown below. By default, the CAEP_RUNTIME_INSTDATADECL macro resolves to nothing (no data) and does not change the CAEP_RTITEM typedef.
There are 2 similar approaches to adding data members to the CAEP_RTITEM typedef.
The examples below show the same 4 data members being added to CAEP_RTITEM using the two approaches. Which approach you choose is a matter of personal preference.
In rtCaepInstanceData.h, define your custom data struct and then define the CAEP_RUNTIME_INSTDATADECL Macro as if you were declaring an instance of this struct. The code below shows this approach.
Your single, struct data member is now part of CAEP_RTITEM. You can access its members using the pRti pointer passed into the runtimeWrite() function as shown in the code below.
In rtCaepInstanceData.h, define the CAEP_RUNTIME_INSTDATADECL Macro as if you were declaring your data members as local variables. The code below shows this approach.
Your separate data members are now part of CAEP_RTITEM. You can access them using the pRti pointer passed into the runtimeWrite() function as shown in the code below.
Definition in file rtCaepInstanceData.h.