ai_sampler.h
Go to the documentation of this file.
1// Copyright 2021 Autodesk, Inc. All rights reserved.
2//
3// Use of this software is subject to the terms of the Autodesk license
4// agreement provided at the time of installation or download, or which
5// otherwise accompanies this software in either electronic or hard copy form.
6
12#pragma once
13#include "ai_api.h"
14
15// forward declarations (defined elsewhere)
16struct AtShaderGlobals;
17
29struct AtSampler;
30
36
37AI_API AtSampler* AiSampler(uint32_t seed, int nsamples, int ndim);
38AI_API AtSamplerIterator* AiSamplerIterator(const AtSampler* sampler, const AtShaderGlobals* sg);
39AI_API AI_DEVICE bool AiSamplerGetSample(AtSamplerIterator* iterator, float* sample);
40AI_API AI_PURE int AiSamplerGetSampleCount(const AtSamplerIterator* iterator);
41AI_API AI_PURE float AiSamplerGetSampleInvCount(const AtSamplerIterator* iterator);
42AI_API void AiSamplerDestroy(AtSampler* sampler);
43
44/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
AI_API AI_DEVICE bool AiSamplerGetSample(AtSamplerIterator *iterator, float *sample)
Get the next sample in an iterator.
Definition: ai_sampler.cpp:82
AI_API AtSampler * AiSampler(uint32_t seed, int nsamples, int ndim)
Create a user sampler with a unique seed.
Definition: ai_sampler.cpp:34
AI_API AtSamplerIterator * AiSamplerIterator(const AtSampler *sampler, const AtShaderGlobals *sg)
Prepare an iterator to loop over the specified sampler.
Definition: ai_sampler.cpp:63
AI_API AI_PURE float AiSamplerGetSampleInvCount(const AtSamplerIterator *iterator)
Get the inverse sample count.
Definition: ai_sampler.cpp:114
AI_API AI_PURE int AiSamplerGetSampleCount(const AtSamplerIterator *iterator)
Get the number of samples taken from this iterator.
Definition: ai_sampler.cpp:98
AI_API void AiSamplerDestroy(AtSampler *sampler)
Destroy a sampler object.
Definition: ai_sampler.cpp:128
Opaque data type for a sampler iterator.
Definition: ai_sampler.h:29
Opaque data type for a sampler.
Shader globals data structure.
Definition: ai_shaderglobals.h:45

© 2022 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com