VRay SDK for C++
Loading...
Searching...
No Matches
VRay::Proxy Class Reference

A group of methods for reading data and creating V-Ray geometry proxies. More...

#include <vraysdk.hpp>

Static Public Member Functions

static bool createCombinedMeshFile (const std::vector< MeshFileData > &data, const std::vector< AnimatedTransform > &animTransforms, const ProxyCreateParams &params)
 
static bool createCombinedMeshFile (const std::vector< MeshFileData > &data, const std::vector< Transform > *transforms, const ProxyCreateParams &params)
 
static bool createCombinedMeshFile (const std::vector< Plugin > &geomMeshPlugins, const std::vector< AnimatedTransform > &animTransforms, const ProxyCreateParams &params)
 
static bool createCombinedMeshFile (const std::vector< Plugin > &geomMeshPlugins, const std::vector< Transform > *transforms, const ProxyCreateParams &params)
 
static bool createMeshFile (const MeshFileData &data, const AnimatedTransform &animTransform, const ProxyCreateParams &params)
 
static bool createMeshFile (const MeshFileData &data, const Transform *transform, const ProxyCreateParams &params)
 
static bool createMeshFile (const Plugin &geomMeshPlugin, const AnimatedTransform &animTransform, const ProxyCreateParams &params)
 
static bool createMeshFile (const Plugin &geomMeshPlugin, const Transform *transform, const ProxyCreateParams &params)
 
static bool readFullData (const Plugin &proxyPlugin, ProxyReadData &readData)
 
static bool readFullData (const ProxyReadParams &params, ProxyReadData &readData)
 
static bool readPreviewData (const Plugin &proxyPlugin, ProxyReadData &readData)
 
static bool readPreviewData (const ProxyReadParams &params, ProxyReadData &readData)
 
static bool readPreviewGeometry (const Plugin &proxyPlugin, VectorList &vertices, IntList &indices, int countHint=0)
 
static bool readPreviewGeometry (const ProxyReadParams &params, VectorList &vertices, IntList &indices, int countHint=0)
 
static bool readPreviewHair (const Plugin &proxyPlugin, VectorList &vertices, IntList &lengths, int countHint=0)
 
static bool readPreviewHair (const ProxyReadParams &params, VectorList &vertices, IntList &lengths, int countHint=0)
 
static bool readPreviewParticles (const Plugin &proxyPlugin, VectorList &positions, int countHint=0)
 
static bool readPreviewParticles (const ProxyReadParams &params, VectorList &positions, int countHint=0)
 

Detailed Description

A group of methods for reading data and creating V-Ray geometry proxies.

Used by LightUtils::readLuminaireFieldData(). If readLuminaireFieldData succeeds, the various get* methods provide access to the data.

Member Function Documentation

◆ createCombinedMeshFile() [1/4]

static bool VRay::Proxy::createCombinedMeshFile ( const std::vector< MeshFileData > &  data,
const std::vector< AnimatedTransform > &  animTransforms,
const ProxyCreateParams params 
)
static
Parameters
dataAn array of MeshFileData containers supplying the data to combine in the proxy file
animTransformsArray of objects containing transformations at corresponding keyframes, to be written to the created file. The size must equal the mesh array size
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info. Will return false without "last error" set if a transform array of mismatching size is passed.

◆ createCombinedMeshFile() [2/4]

static bool VRay::Proxy::createCombinedMeshFile ( const std::vector< MeshFileData > &  data,
const std::vector< Transform > *  transforms,
const ProxyCreateParams params 
)
static
Parameters
dataAn array of MeshFileData containers supplying the data to combine in the proxy file
transformsTransformations for the separate input meshes to bake into the final mesh. Size must equal the mesh array size. Pass NULL to skip.
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info. Will return false without "last error" set if a transform array of mismatching size is passed.

◆ createCombinedMeshFile() [3/4]

static bool VRay::Proxy::createCombinedMeshFile ( const std::vector< Plugin > &  geomMeshPlugins,
const std::vector< AnimatedTransform > &  animTransforms,
const ProxyCreateParams params 
)
static
Parameters
geomMeshPluginsAn array of plugins supplying the data to combine in the proxy file. The plugin types could be:
  • one of these geometry types - GeomStaticMesh/GeomMayaHair/GeomParticleSystem
  • one of these instancer types - Instancer/Instancer2/GeomInstancer/GeomRayserverInstancer
  • Node with geometry property one of the supported geometry or instancer types
animTransformsArray of objects containing transformations at corresponding keyframes, to be written to the created file. The size must equal the mesh array size
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info. Will return false without "last error" set if a transform array of mismatching size is passed.

◆ createCombinedMeshFile() [4/4]

static bool VRay::Proxy::createCombinedMeshFile ( const std::vector< Plugin > &  geomMeshPlugins,
const std::vector< Transform > *  transforms,
const ProxyCreateParams params 
)
static
Parameters
geomMeshPluginsAn array of plugins supplying the data to combine in the proxy file. The plugin types could be:
  • one of these geometry types - GeomStaticMesh/GeomMayaHair/GeomParticleSystem
  • one of these instancer types - Instancer/Instancer2/GeomInstancer/GeomRayserverInstancer
  • Node with geometry property one of the supported geometry or instancer types
transformsTransformations for the separate input meshes to bake into the final mesh. Size must equal the mesh array size. Pass NULL to skip.
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info. Will return false without "last error" set if a transform array of mismatching size is passed.

◆ createMeshFile() [1/4]

static bool VRay::Proxy::createMeshFile ( const MeshFileData data,
const AnimatedTransform animTransform,
const ProxyCreateParams params 
)
static
Parameters
dataA container for the data necessary to a export vrmesh with geometry, hair or particles.
animTransformAn object containing transformations at corresponding keyframes, to be written to the created file
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ createMeshFile() [2/4]

static bool VRay::Proxy::createMeshFile ( const MeshFileData data,
const Transform transform,
const ProxyCreateParams params 
)
static
Parameters
dataA container for the data necessary to a export vrmesh with geometry, hair or particles.
transformA transformation to bake into the geometry data. Pass NULL to skip.
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ createMeshFile() [3/4]

static bool VRay::Proxy::createMeshFile ( const Plugin geomMeshPlugin,
const AnimatedTransform animTransform,
const ProxyCreateParams params 
)
static
Parameters
geomMeshPluginA plugin supplying the data for the proxy file. The plugin types could be:
  • one of these geometry types - GeomStaticMesh/GeomMayaHair/GeomParticleSystem
  • one of these instancer types - Instancer/Instancer2/GeomInstancer/GeomRayserverInstancer
  • Node with geometry property one of the supported geometry or instancer types
animTransformAn object containing transformations at corresponding keyframes, to be written to the created file
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ createMeshFile() [4/4]

static bool VRay::Proxy::createMeshFile ( const Plugin geomMeshPlugin,
const Transform transform,
const ProxyCreateParams params 
)
static
Parameters
geomMeshPluginA plugin supplying the data for the proxy file. The plugin types could be:
  • one of these geometry types - GeomStaticMesh/GeomMayaHair/GeomParticleSystem
  • one of these instancer types - Instancer/Instancer2/GeomInstancer/GeomRayserverInstancer
  • Node with geometry property one of the supported geometry or instancer types
transformA transformation to bake into the geometry data. Pass NULL to skip.
paramsA ProxyCreateParams container for the various parameters, including file name
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ readFullData() [1/2]

static bool VRay::Proxy::readFullData ( const Plugin proxyPlugin,
ProxyReadData readData 
)
static
Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
readDataA structure defining which parts of the data to read (with .setFlags()) and holding the resulting arrays.
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ readFullData() [2/2]

static bool VRay::Proxy::readFullData ( const ProxyReadParams params,
ProxyReadData readData 
)
static
Parameters
paramsA struct to read the file path and parameters from.
readDataA structure defining which parts of the data to read (with .setFlags()) and holding the resulting arrays.
Returns
false if an error ocurred.

◆ readPreviewData() [1/2]

static bool VRay::Proxy::readPreviewData ( const Plugin proxyPlugin,
ProxyReadData readData 
)
static
Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
readDataA structure defining which parts of the data to read (with .setFlags()) and holding the resulting arrays.
Returns
false if an error ocurred. Check getLastError() for additional info.

◆ readPreviewData() [2/2]

static bool VRay::Proxy::readPreviewData ( const ProxyReadParams params,
ProxyReadData readData 
)
static
Parameters
paramsA struct to read the file path and parameters from.
readDataA structure defining which parts of the data to read (with .setFlags()) and holding the resulting arrays.
Returns
false if an error ocurred.

◆ readPreviewGeometry() [1/2]

static bool VRay::Proxy::readPreviewGeometry ( const Plugin proxyPlugin,
VectorList &  vertices,
IntList &  indices,
int  countHint = 0 
)
static
Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
verticesOutput vertex preview data. The array can be passed on directly to DirectX/OpenGL etc. (and the indices too)
indicesOutput face index data. Each three consecutive elements make up one triangle.
countHint[Alembic only] An optional number of triangles to return. The exact number of elements in 'vertices' may differ slightly. If countHint is not specified, proxyPlugin::num_preview_faces is used.

◆ readPreviewGeometry() [2/2]

static bool VRay::Proxy::readPreviewGeometry ( const ProxyReadParams params,
VectorList &  vertices,
IntList &  indices,
int  countHint = 0 
)
static
Parameters
paramsA struct to read the file path and parameters from.
verticesOutput vertex preview data. The array can be passed on directly to DirectX/OpenGL etc. (and the indices too)
indicesOutput face index data. Each three consecutive elements make up one triangle.
countHint[Alembic only] An optional number of triangles to return. The exact number of elements in 'vertices' may differ slightly. If countHint is not specified, params.num_preview_faces is used.

◆ readPreviewHair() [1/2]

static bool VRay::Proxy::readPreviewHair ( const Plugin proxyPlugin,
VectorList &  vertices,
IntList &  lengths,
int  countHint = 0 
)
static
Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
verticesOutput vertex preview data. Consecutive vertices form hair strands. The i-th strand has lengths[i] consecutive vertices.
lengthsOutput hair strand length data. Each strand can have a different number of vertices.
countHint[Alembic only] The number of hair strands to return. The exact number of elements in 'lengths' may differ slightly. If countHint is not specified, proxyPlugin::num_preview_faces is used.

◆ readPreviewHair() [2/2]

static bool VRay::Proxy::readPreviewHair ( const ProxyReadParams params,
VectorList &  vertices,
IntList &  lengths,
int  countHint = 0 
)
static
Parameters
paramsA struct to read the file path and parameters from.
verticesOutput vertex preview data. Consecutive vertices form hair strands. The i-th strand has lengths[i] consecutive vertices.
lengthsOutput hair strand length data. Each strand can have a different number of vertices.
countHint[Alembic only] The number of hair strands to return. The exact number of elements in 'lengths' may differ slightly. If countHint is not specified, params.num_preview_faces is used.

◆ readPreviewParticles() [1/2]

static bool VRay::Proxy::readPreviewParticles ( const Plugin proxyPlugin,
VectorList &  positions,
int  countHint = 0 
)
static
Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
positionsOutput particle preview data. The positions of the preview subset of all particles.
countHint[Alembic only] An optional number of particles to return. The exact number of elements in 'positions' may differ slightly. If countHint is not specified, proxyPlugin::num_preview_faces is used.

◆ readPreviewParticles() [2/2]

static bool VRay::Proxy::readPreviewParticles ( const ProxyReadParams params,
VectorList &  positions,
int  countHint = 0 
)
static
Parameters
paramsA struct to read the file path and parameters from.
positionsOutput particle preview data. The positions of the preview subset of all particles.
countHint[Alembic only] An optional number of particles to return. The exact number of elements in 'positions' may differ slightly. If countHint is not specified, params.num_preview_faces is used.

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