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

This class groups methods related to management of render elements in the scene. More...

#include <vraysdk.hpp>

Public Member Functions

RenderElement add (RenderElement::Type type, const char *displayName=nullptr, const char *instanceName=nullptr)
 
size_t get (const std::string &name, const RenderElement::GetDataOptions &options, void *buf) const
 
RenderElement get (RenderElement::Type type) const
 
std::vector< RenderElementgetAll (RenderElement::Type type) const
 

Friends

class VRayRenderer
 

Detailed Description

This class groups methods related to management of render elements in the scene.

Member Function Documentation

◆ add()

RenderElement VRay::RenderElements::add ( RenderElement::Type  type,
const char *  displayName = nullptr,
const char *  instanceName = nullptr 
)

Attempts to create a new render element. Check the result against false for failure.

Parameters
typeThe type of render element. Some types allow more than one instance.
displayNameAn optional name to show in the VFB. If NULL, a default name will be used.
instanceNameAn optional name for the plugin instance that will be created.

◆ get() [1/2]

size_t VRay::RenderElements::get ( const std::string &  name,
const RenderElement::GetDataOptions options,
void *  buf 
) const

Retrieves the render element raw data into the buffer. WARNING: If Nvidia AI upscaling is enabled, then the returned image/data will have even dimentions.

Parameters
nameRender element name.
optionsImage options (crop, color correct, etc.).
bufThe output data buffer. If nullptr - returns required buffer size.
Returns
If data is nullptr returns required buffer size; 0 on error; 1 on success.

◆ get() [2/2]

RenderElement VRay::RenderElements::get ( RenderElement::Type  type) const

Returns the first render element of the specified type. Often there is only one element of a given type

◆ getAll()

std::vector< RenderElement > VRay::RenderElements::getAll ( RenderElement::Type  type) const

Returns all render elements of the specified type. If type is NONE, all render elements of all types will be returned.


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