VRay SDK for C#
Loading...
Searching...
No Matches
VRay.GeomUtils Class Reference

A group of utility methods related to variuos geometry source plugins. More...

Classes

class  GaussianReadData
 All related data necessary to create a preview of a single Gaussian model. Used by GeomUtils.ReadGaussianData() More...
 
struct  ImportScatterPresetCallbackData
 
class  ScatterReadParams
 The necessary parameters for reading the data in the preset config file (.mbc) More...
 
class  ScatterReadParamsInternal
 
class  ScatterReadParamsSerializer
 
struct  TransformsAndTopo
 Contains the result of ReadScatterData method. More...
 

Public Member Functions

delegate Plugin OnImportScatterPreset (VRayRenderer renderer, string assetId, Vector importPosition)
 A function to be called during reading the preset config, responsible for creating the model plugins corresponding to the imported assets More...
 

Static Public Member Functions

static GaussianReadData ReadGaussianData (Plugin gaussianPlugin)
 Reads the data contained in the property GeomGaussians.file of the given plugin More...
 
static GaussianReadData ReadGaussianData (string filename)
 Reads the data contained in the given file More...
 
static TransformsAndTopo ReadScatterData (Plugin scatterPlugin)
 Returns the generated scatter transforms and source topology data, corresponding to the plugin parameter config. More...
 
static bool ReadScatterPreset (ScatterReadParams readParams, OnImportScatterPreset userCallback=null)
 Fills the parameters in the given scatterPlugin with the data provided from the preset config file (.mbc) The user callback could be used to import Cosmos assets and other relevant plugins to the scene More...
 

Static Public Attributes

const long SCATTER_READ_PARAMS_STRUCT_VERSION = 0
 

Detailed Description

A group of utility methods related to variuos geometry source plugins.

Member Function Documentation

◆ OnImportScatterPreset()

delegate Plugin VRay.GeomUtils.OnImportScatterPreset ( VRayRenderer  renderer,
string  assetId,
Vector  importPosition 
)

A function to be called during reading the preset config, responsible for creating the model plugins corresponding to the imported assets

Parameters
rendererThe renderer which produced the event
assetIdCosmos assetId to be imported (string)
importPositionThe position where the asset should be imported to the scene
Returns
The callback should return the newly added model (plugin to be scattered) corresponding to the assetId

◆ ReadGaussianData() [1/2]

static GaussianReadData VRay.GeomUtils.ReadGaussianData ( Plugin  gaussianPlugin)
static

Reads the data contained in the property GeomGaussians.file of the given plugin

Parameters
gaussianPluginA GeomGaussians plugin instance (the scatter data generation is triggered depending on the plugin parameter config).
Returns
An object providing interfaces to all data necessary to create a preview of a single Gaussian model

◆ ReadGaussianData() [2/2]

static GaussianReadData VRay.GeomUtils.ReadGaussianData ( string  filename)
static

Reads the data contained in the given file

Parameters
filenameA Gaussian file name (.ply)
Returns
An object providing interfaces to all data necessary to create a preview of a single Gaussian model

◆ ReadScatterData()

static TransformsAndTopo VRay.GeomUtils.ReadScatterData ( Plugin  scatterPlugin)
static

Returns the generated scatter transforms and source topology data, corresponding to the plugin parameter config.

Parameters
scatterPluginA GeomScatter plugin instance (the scatter data generation is triggered depending on the plugin parameter config).
Returns
Transforms and source topology lists. Set to null on failure so don't forget to check them.

◆ ReadScatterPreset()

static bool VRay.GeomUtils.ReadScatterPreset ( ScatterReadParams  readParams,
OnImportScatterPreset  userCallback = null 
)
static

Fills the parameters in the given scatterPlugin with the data provided from the preset config file (.mbc) The user callback could be used to import Cosmos assets and other relevant plugins to the scene

Parameters
readParamsA struct to read the file name and parameters from.
userCallbackA function to be called during reading the preset config, responsible for creating the plugins corresponding to the imported assets
Returns
false if an error ocurred

The documentation for this class was generated from the following file: