A group of utility methods related to variuos geometry source plugins.
More...
#include <vraysdk.hpp>
|
static bool | readGaussianData (const Plugin &gaussianPlugin, GaussianReadData &readData) |
|
static bool | readGaussianData (const std::string &fileName, GaussianReadData &readData) |
|
static bool | readGeomHairData (const Plugin &nodePlugin, VectorList &vertices, IntList &lengths, int countHint=0) |
|
static bool | readScatterData (const Plugin &scatterPlugin, std::vector< Transform > &transforms, IntList &topo) |
|
static bool | readScatterPreset (const ScatterReadParams ¶ms, Plugin(*callback)(VRayRenderer &, const char *assetId, Vector importPosition, void *userData)=0, const void *userData=nullptr) |
|
template<class T , Plugin(T::*)(VRayRenderer &, const char *assetId, Vector importPosition, void *userData) TMethod> |
static bool | readScatterPreset (const ScatterReadParams ¶ms, T &object, const void *userData=nullptr) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
|
A group of utility methods related to variuos geometry source plugins.
◆ readGaussianData() [1/2]
- Parameters
-
gaussianPlugin | A GeomGaussians plugin instance |
readData | An object providing interfaces to all data necessary to create a preview of a single Gaussian model |
- Returns
- false if an error ocurred. Check getLastError() for additional info.
◆ readGaussianData() [2/2]
static bool VRay::GeomUtils::readGaussianData |
( |
const std::string & |
fileName, |
|
|
GaussianReadData & |
readData |
|
) |
| |
|
static |
- Parameters
-
fileName | Gaussian file name (.ply) |
readData | An object providing interfaces to all data necessary to create a preview of a single Gaussian model |
- Returns
- false if an error ocurred.
◆ readGeomHairData()
static bool VRay::GeomUtils::readGeomHairData |
( |
const Plugin & |
nodePlugin, |
|
|
VectorList & |
vertices, |
|
|
IntList & |
lengths, |
|
|
int |
countHint = 0 |
|
) |
| |
|
static |
- Parameters
-
nodePlugin | A Node plugin instance containing GeomHair as a geometry source plugin |
vertices | Output vertex preview data. Consecutive vertices form hair strands. The i-th strand has lengths[i] consecutive vertices. |
lengths | Output hair strand length data. Each strand can have a different number of vertices. |
countHint | The number of hair strands to get. If countHint is not specified, all generated data is returned. |
- Returns
- false if an error ocurred. The returned data could be then used to create a preview of the generated GeomHair
◆ readScatterData()
static bool VRay::GeomUtils::readScatterData |
( |
const Plugin & |
scatterPlugin, |
|
|
std::vector< Transform > & |
transforms, |
|
|
IntList & |
topo |
|
) |
| |
|
static |
- Parameters
-
scatterPlugin | A GeomScatter plugin instance (the scatter data generation is triggered depending on the plugin parameter config) |
transforms | Full output transforms data array |
topo | Full output source topology array. The indices are corresponding to the sources list in GeomScatter::models |
- Returns
- false if an error ocurred. Check getLastError() for additional info.
◆ readScatterPreset()
static bool VRay::GeomUtils::readScatterPreset |
( |
const ScatterReadParams & |
params, |
|
|
Plugin(*)(VRayRenderer &, const char *assetId, Vector importPosition, void *userData) |
callback = 0 , |
|
|
const void * |
userData = nullptr |
|
) |
| |
|
static |
- Parameters
-
params | A struct to read the file name and parameters from. |
callback | [optional] A function to be called during reading the preset config, responsible for creating the model plugins corresponding to the imported assets Arguments: renderer - The renderer which produced the event assetId - Cosmos assetId to be imported (string) importPosition - the position where the asset should be imported to the scene return - The callback should return the the newly added model (plugin to be scattered) corresponding to the assetId |
- Returns
- false if an error ocurred. Check getLastError() for additional info.
The documentation for this class was generated from the following file:
- /home/jenkins/ci/cgrepo/appsdk/VRay_SDK_CPP/include/vraysdk.hpp