Public Member Functions
mi::shader_v3::Access_bsdf Class Reference

#include <shader_bsdf.h>

List of all members.

Public Member Functions

 Access_bsdf (miState *state)
 Access_bsdf ()
 ~Access_bsdf ()
const Bsdfoperator-> () const
 Allows the access to be used like a pointer.
bool valid () const
void reset (miState *state=0)

Detailed Description

A read-only Bsdf handle.

Note that this must be used thread-locally


Constructor & Destructor Documentation

mi::shader_v3::Access_bsdf::Access_bsdf ( miState *  state) [inline]

Accesses a Bsdf.

The created access will attempt to acquire a Bsdf instance from a pool by executing the shader that is attached to the bsdf slot in the current material. The access is valid if the bsdf slot is populated with a valid BSDF wrapper shader.

Parameters:
statethe current state
mi::shader_v3::Access_bsdf::Access_bsdf ( ) [inline]

Creates an invalid Bsdf access.

The Access_bsdf::reset function must be called before this access can be used.

mi::shader_v3::Access_bsdf::~Access_bsdf ( ) [inline]

Destroys the access.

All acquired resources are released.


Member Function Documentation

void mi::shader_v3::Access_bsdf::reset ( miState *  state = 0) [inline]

Resets this access to a new Bsdf.

This function allows manual control over the lifetime of the accessed Bsdf. If state is 0 (the default), the Bsdf instance will be released.

bool mi::shader_v3::Access_bsdf::valid ( ) const [inline]

Checks if the access is valid.

Returns:
true if a Bsdf instance was found on construction, false otherwise.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.