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...

Classes

class  AnimatedTransform
 Used in Proxy.CreateMeshFile() and Proxy.CreateCombinedMeshFile() More...
 
class  AnimatedTransformDataInternal
 
class  AnimatedTransformDataSerializer
 
struct  Box
 Axis-aligned bounding box More...
 
class  GeomMeshData_Internal
 
class  GeomMeshDataSerializer
 
class  MeshFileData
 A container for the data necessary to a export vrmesh with geometry, hair or particles. Used by Proxy.CreateMeshFile() More...
 
class  MeshFileDataParser
 
class  ProxyReadParamsSerializer
 
class  ReadData
 A holder for the data returned by the ReadFullData() method. More...
 
class  ReadDataFlags
 Flags defining which parts of the proxy data to read. More...
 
class  ReadDataInternal
 
class  ReadParams
 The necessary parameters for reading data in a proxy file. More...
 
class  ReadParamsInternal
 
struct  VerticesAndIndices
 Contains the result of ReadPreviewGeometry method. More...
 
struct  VerticesAndLengths
 Contains the result of ReadPreviewHair method. More...
 

Static Public Member Functions

static bool CreateCombinedMeshFile (IList< MeshFileData > data, IList< AnimatedTransform > animTransforms, ProxyCreateParams parameters)
 
static bool CreateCombinedMeshFile (IList< MeshFileData > data, IList< Transform > transforms, ProxyCreateParams parameters)
 
static bool CreateCombinedMeshFile (IList< Plugin > geomMeshPlugins, IList< AnimatedTransform > animTransforms, ProxyCreateParams parameters)
 
static bool CreateCombinedMeshFile (IList< Plugin > geomMeshPlugins, IList< Transform > transforms, ProxyCreateParams parameters)
 
static bool CreateMeshFile (MeshFileData data, AnimatedTransform animTransform, ProxyCreateParams parameters)
 
static bool CreateMeshFile (MeshFileData data, Transform transform, ProxyCreateParams parameters)
 
static bool CreateMeshFile (Plugin geomMeshPlugin, AnimatedTransform animTransform, ProxyCreateParams parameters)
 
static bool CreateMeshFile (Plugin geomMeshPlugin, Transform transform, ProxyCreateParams parameters)
 
static ReadData ReadFullData (Plugin geomStaticMeshPlugin, ReadDataFlags flags=null)
 Returns the full proxy data or parts of it referenced by the given plugin. More...
 
static ReadData ReadFullData (ReadParams readParams, ReadDataFlags flags=null)
 Returns the full proxy data or parts of it referenced by the given params. More...
 
static ReadData ReadPreviewData (Plugin geomStaticMeshPlugin, ReadDataFlags flags=null)
 Returns the preview proxy data or parts of it referenced by the given plugin. More...
 
static ReadData ReadPreviewData (ReadParams readParams, ReadDataFlags flags=null)
 Returns the preview proxy data or parts of it referenced by the given params. More...
 
static VerticesAndIndices ReadPreviewGeometry (Plugin proxyPlugin, int countHint=0)
 Returns proxy preview geometry data contained in the given plugin. More...
 
static VerticesAndIndices ReadPreviewGeometry (ReadParams readParams, int countHint=0)
 Returns proxy preview geometry data referenced by the given params. More...
 
static VerticesAndLengths ReadPreviewHair (Plugin proxyPlugin, int countHint=0)
 Returns proxy preview hair data contained in the given plugin. More...
 
static VerticesAndLengths ReadPreviewHair (ReadParams readParams, int countHint=0)
 Returns proxy preview hair data referenced by the given params. More...
 
static IList< VectorReadPreviewParticles (Plugin proxyPlugin, int countHint=0)
 
static IList< VectorReadPreviewParticles (ReadParams readParams, int countHint=0)
 

Static Public Attributes

const Int64 CREATE_PARAMS_STRUCT_VERSION = 7
 
const float DEFAULT_FPS = 24.0f
 
const float DEFAULT_POINT_SIZE = 2.2f
 
const Int64 GEOM_MESH_DATA_STRUCT_VERSION = 2
 
const Int64 READ_DATA_STRUCT_VERSION = 5
 
const Int64 READ_PARAMS_STRUCT_VERSION = 2
 

Detailed Description

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

Member Function Documentation

◆ CreateCombinedMeshFile() [1/4]

static bool VRay.Proxy.CreateCombinedMeshFile ( IList< MeshFileData data,
IList< AnimatedTransform animTransforms,
ProxyCreateParams  parameters 
)
static
Parameters
dataAn array of MeshFileData instances to combine in the proxy file as one mesh
animTransformsArray of objects containing transformations at corresponding keyframes, to be written to the created file. The size must equal the mesh array size
parametersA ProxyCreateParams container for the various parameters, including file name
Returns
true on success, false if an error ocurred. Check LastError 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 ( IList< MeshFileData data,
IList< Transform transforms,
ProxyCreateParams  parameters 
)
static
Parameters
dataAn array of MeshFileData instances to combine in the proxy file as one mesh
transformsTransformations for the separate input meshes to bake into the final mesh. Size must equal the mesh array size. Pass null to skip.
parametersA ProxyCreateParams container for the various parameters, including file name
Returns
true on success, false if an error ocurred. Check LastError 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 ( IList< Plugin geomMeshPlugins,
IList< AnimatedTransform animTransforms,
ProxyCreateParams  parameters 
)
static

Creates a.vrmesh file from data stored in multiple plugins. The plugin types for geomMeshPlugins 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
    Parameters
    geomMeshPluginsAn array of plugins supplying the data to combine in the proxy file - see supported plugin types above
    animTransformsArray of objects containing transformations at corresponding keyframes, to be written to the created file. The size must equal the mesh array size
    parametersA ProxyCreateParams container for the various parameters, including file name
    Returns
    true on success, false if an error ocurred. Check LastError 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 ( IList< Plugin geomMeshPlugins,
IList< Transform transforms,
ProxyCreateParams  parameters 
)
static

Creates a.vrmesh file from data stored in multiple plugins. The plugin types for geomMeshPlugins 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
    Parameters
    geomMeshPluginsAn array of plugins supplying the data to combine in the proxy file - see supported plugin types above
    transformsTransformations for the separate input meshes to bake into the final mesh. Size must equal the mesh array size. Pass null to skip.
    parametersA ProxyCreateParams container for the various parameters, including file name
    Returns
    true on success, false if an error ocurred. Check LastError 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 ( MeshFileData  data,
AnimatedTransform  animTransform,
ProxyCreateParams  parameters 
)
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
parametersA ProxyCreateParams container for the various parameters, including file name
Returns
true on success, false if an error ocurred. Check LastError for additional info.

◆ CreateMeshFile() [2/4]

static bool VRay.Proxy.CreateMeshFile ( MeshFileData  data,
Transform  transform,
ProxyCreateParams  parameters 
)
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.
parametersA ProxyCreateParams container for the various parameters, including file name
Returns
true on success, false if an error ocurred. Check LastError for additional info.

◆ CreateMeshFile() [3/4]

static bool VRay.Proxy.CreateMeshFile ( Plugin  geomMeshPlugin,
AnimatedTransform  animTransform,
ProxyCreateParams  parameters 
)
static

Creates a.vrmesh file from data stored in a plugin. The plugin types for geomMeshPlugin 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
    Parameters
    geomMeshPluginA plugin supplying the data for the proxy file - see supported plugin types above
    animTransformAn object containing transformations at corresponding keyframes, to be written to the created file
    parametersA ProxyCreateParams container for the various parameters, including file name
    Returns
    true on success, false if an error ocurred. Check LastError for additional info.

◆ CreateMeshFile() [4/4]

static bool VRay.Proxy.CreateMeshFile ( Plugin  geomMeshPlugin,
Transform  transform,
ProxyCreateParams  parameters 
)
static

Creates a.vrmesh file from data stored in a plugin. The plugin types for geomMeshPlugin 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
    Parameters
    geomMeshPluginA plugin supplying the data for the proxy file - see supported plugin types above
    transformA transformation to bake into the geometry data. Pass null to skip.
    parametersA ProxyCreateParams container for the various parameters, including file name
    Returns
    true on success, false if an error ocurred. Check LastError for additional info.

◆ ReadFullData() [1/2]

static ReadData VRay.Proxy.ReadFullData ( Plugin  geomStaticMeshPlugin,
ReadDataFlags  flags = null 
)
static

Returns the full proxy data or parts of it referenced by the given plugin.

Parameters
geomStaticMeshPluginA GeomMeshFile plugin instance to read the file path and parameters from.
flagsFlags defining which parts of the data to read.
Returns
An object containing the resultant arrays.

◆ ReadFullData() [2/2]

static ReadData VRay.Proxy.ReadFullData ( ReadParams  readParams,
ReadDataFlags  flags = null 
)
static

Returns the full proxy data or parts of it referenced by the given params.

Parameters
readParamsA struct to read the file path and parameters from.
flagsFlags defining which parts of the data to read.
Returns
An object containing the resultant arrays.

◆ ReadPreviewData() [1/2]

static ReadData VRay.Proxy.ReadPreviewData ( Plugin  geomStaticMeshPlugin,
ReadDataFlags  flags = null 
)
static

Returns the preview proxy data or parts of it referenced by the given plugin.

Parameters
geomStaticMeshPluginA GeomMeshFile plugin instance to read the file path and parameters from.
flagsFlags defining which parts of the data to read.
Returns
An object containing the resultant arrays.

◆ ReadPreviewData() [2/2]

static ReadData VRay.Proxy.ReadPreviewData ( ReadParams  readParams,
ReadDataFlags  flags = null 
)
static

Returns the preview proxy data or parts of it referenced by the given params.

Parameters
readParamsA struct to read the file path and parameters from.
flagsFlags defining which parts of the data to read.
Returns
An object containing the resultant arrays.

◆ ReadPreviewGeometry() [1/2]

static VerticesAndIndices VRay.Proxy.ReadPreviewGeometry ( Plugin  proxyPlugin,
int  countHint = 0 
)
static

Returns proxy preview geometry data contained in the given plugin.

Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
countHintThe number of triangles to return. The exact number of elements in 'vertices' may differ slightly. If countHint is 0, proxyPlugin.num_preview_faces is used.
Returns
Vertices and indices lists. Set to null on failure so don't forget to check them.

◆ ReadPreviewGeometry() [2/2]

static VerticesAndIndices VRay.Proxy.ReadPreviewGeometry ( ReadParams  readParams,
int  countHint = 0 
)
static

Returns proxy preview geometry data referenced by the given params.

Parameters
readParamsA struct to read the file path and parameters from.
countHintThe number of triangles to return. The exact number of elements in 'vertices' may differ slightly. If countHint is 0, readParams.num_preview_faces is used.
Returns
Vertices and indices lists. Set to null on failure so don't forget to check them.

◆ ReadPreviewHair() [1/2]

static VerticesAndLengths VRay.Proxy.ReadPreviewHair ( Plugin  proxyPlugin,
int  countHint = 0 
)
static

Returns proxy preview hair data contained in the given plugin.

Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
countHintThe number of hair strands to return. The exact number of elements in 'lengths' may differ slightly. If countHint is 0, proxyPlugin::num_preview_faces is used.
Returns
Vertices and lengths lists. Set to null on failure so don't forget to check them.

◆ ReadPreviewHair() [2/2]

static VerticesAndLengths VRay.Proxy.ReadPreviewHair ( ReadParams  readParams,
int  countHint = 0 
)
static

Returns proxy preview hair data referenced by the given params.

Parameters
readParamsA struct to read the file path and parameters from.
countHintThe number of hair strands to return. The exact number of elements in 'lengths' may differ slightly. If countHint is 0, proxyPlugin::num_preview_faces is used.
Returns
Vertices and lengths lists. Set to null on failure so don't forget to check them.

◆ ReadPreviewParticles() [1/2]

static IList< Vector > VRay.Proxy.ReadPreviewParticles ( Plugin  proxyPlugin,
int  countHint = 0 
)
static

Returns particle preview data contained in the given plugin.

Parameters
proxyPluginA GeomMeshFile plugin instance to read the file path and parameters from.
countHintAn optional number of particles to return. The exact number of elements in 'positions' may differ slightly. If countHint is 0, proxyPlugin::num_preview_faces is used.
Returns
The positions of the preview subset of all particles.

◆ ReadPreviewParticles() [2/2]

static IList< Vector > VRay.Proxy.ReadPreviewParticles ( ReadParams  readParams,
int  countHint = 0 
)
static

Returns particle preview data referenced by the given params.

Parameters
readParamsA struct to read the file path and parameters from.
countHintAn optional number of particles to return. The exact number of elements in 'positions' may differ slightly. If countHint is 0, proxyPlugin::num_preview_faces is used.
Returns
The positions of the preview subset of all particles.

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