ai_universe.h
Go to the documentation of this file.
1// Copyright 2023 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_bbox.h"
14#include "ai_api.h"
15#include "ai_node_entry.h"
16#include "ai_string.h"
17#include <stdint.h> // uint32_t etc
18
19// forward declares
20struct AtNode;
21struct AtNodeIterator;
22struct AtNodeEntry;
23struct AtNodeEntryIterator;
24struct AtAOVIterator;
25struct AtParamValueMap;
26class AtRenderSession;
27
34{
36 uint8_t type;
39};
40
66class AtUniverse;
67
71#ifdef AI_CPU_COMPILER
72AI_API AtUniverse* AiUniverse();
73AI_API void AiUniverseDestroy(AtUniverse* universe);
74AI_API bool AiUniverseCacheFlush(AtUniverse* universe, int cache_flags);
75AI_API AI_PURE AtNode* AiUniverseGetOptions(const AtUniverse* universe);
76#endif // AI_CPU_COMPILER
77AI_API AI_DEVICE AI_PURE AtNode* AiUniverseGetCamera(const AtUniverse* universe);
78#ifdef AI_CPU_COMPILER
79AI_API AI_PURE AtBBox AiUniverseGetSceneBounds(const AtUniverse* universe);
80AI_API AtNodeIterator* AiUniverseGetNodeIterator(const AtUniverse* universe, unsigned int node_mask);
81AI_API AtNodeEntryIterator* AiUniverseGetNodeEntryIterator(unsigned int node_mask);
82AI_API AtAOVIterator* AiUniverseGetAOVIterator(const AtUniverse* universe);
83AI_API void AiUniverseAddDefaultNodes(AtUniverse* universe, const AtParamValueMap* params);
84AI_API AtRenderSession* AiUniverseGetRenderSession(const AtUniverse* universe);
85AI_API bool AiUniverseCompare(const AtUniverse* universe1, const AtUniverse* universe2, unsigned int node_mask = AI_NODE_ALL, AtParamValueMap* diffs = NULL);
86AI_API uint32_t AiUniverseGetId(const AtUniverse* universe);
87AI_API AtUniverse* AiUniverseGetFromId(uint32_t universe_id);
88
92AI_API void AiNodeIteratorDestroy(AtNodeIterator* iter);
93AI_API AtNode* AiNodeIteratorGetNext(AtNodeIterator* iter);
94AI_API AI_PURE bool AiNodeIteratorFinished(const AtNodeIterator* iter);
95/*\}*/
96
100AI_API void AiNodeEntryIteratorDestroy(AtNodeEntryIterator* iter);
101AI_API AtNodeEntry* AiNodeEntryIteratorGetNext(AtNodeEntryIterator* iter);
102AI_API AI_PURE bool AiNodeEntryIteratorFinished(const AtNodeEntryIterator* iter);
103/*\}*/
104
108AI_API void AiAOVIteratorDestroy(AtAOVIterator* iter);
109AI_API const AtAOVEntry* AiAOVIteratorGetNext(AtAOVIterator* iter);
110AI_API AI_PURE bool AiAOVIteratorFinished(const AtAOVIterator* iter);
111#endif // AI_CPU_COMPILER
112/*\}*/
113
117#define AI_CACHE_TEXTURE 0x0001
118#define AI_CACHE_BACKGROUND 0x0002
119#define AI_CACHE_QUAD 0x0004
120#define AI_CACHE_VOLUME_DISPLAY 0x0008
121#define AI_CACHE_ALL (AI_CACHE_TEXTURE | AI_CACHE_BACKGROUND | AI_CACHE_QUAD | AI_CACHE_VOLUME_DISPLAY)
122/*\}*/
123
124/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
Axis-aligned bounding box types and utilities.
AtNodeEntry type and methods.
AtString class for fast comparisons.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:54
#define AI_NODE_ALL
Bitmask including all node types, used by AiSceneWrite()
Definition: ai_node_entry.h:49
AI_API AtNodeEntryIterator * AiUniverseGetNodeEntryIterator(unsigned int node_mask)
Creates a new node entry iterator and resets it to the first installed node entry.
Definition: ai_universe.cpp:249
int blend_mode
Blend mode
Definition: ai_universe.h:37
AI_API AI_PURE bool AiNodeEntryIteratorFinished(const AtNodeEntryIterator *iter)
Returns true if there are no more node entries to iterate over.
Definition: ai_universe.cpp:576
AI_API bool AiUniverseCacheFlush(AtUniverse *universe, int cache_flags)
Flush one or several caches in a given Arnold universe.
Definition: ai_universe.cpp:39
AI_API AtUniverse * AiUniverse()
Creates a new universe that can be used independently of the default universe.
Definition: ai_universe.cpp:90
AtString expression
Optional light path expression.
Definition: ai_universe.h:38
AI_API AI_PURE AtNode * AiUniverseGetOptions(const AtUniverse *universe)
Fetches the global options node for a specific Arnold universe.
Definition: ai_universe.cpp:124
AI_API AtNodeEntry * AiNodeEntryIteratorGetNext(AtNodeEntryIterator *iter)
Returns current node entry and points node entry iterator to the next node entry.
Definition: ai_universe.cpp:565
AI_API AI_DEVICE AI_PURE AtNode * AiUniverseGetCamera(const AtUniverse *universe)
Fetches the currently active camera node for a given Arnold universe.
Definition: ai_universe.cpp:151
AI_API bool AiUniverseCompare(const AtUniverse *universe1, const AtUniverse *universe2, unsigned int node_mask=AI_NODE_ALL, AtParamValueMap *diffs=NULL)
Compare two universes.
Definition: ai_universe.cpp:358
AI_API AtNodeIterator * AiUniverseGetNodeIterator(const AtUniverse *universe, unsigned int node_mask)
Creates a new node iterator for the given Arnold universe and resets it to the first node.
Definition: ai_universe.cpp:220
AI_API const AtAOVEntry * AiAOVIteratorGetNext(AtAOVIterator *iter)
Returns current AOV entry and points AOV iterator to the next AOV.
Definition: ai_universe.cpp:616
AI_API AtNode * AiNodeIteratorGetNext(AtNodeIterator *iter)
Returns current node and points node iterator to the next node.
Definition: ai_universe.cpp:513
AI_API AtUniverse * AiUniverseGetFromId(uint32_t universe_id)
Returns a universe from its 32bit integer ID.
Definition: ai_universe.cpp:474
uint8_t type
Data type
Definition: ai_universe.h:36
AtString name
AOV name
Definition: ai_universe.h:35
AI_API AI_PURE bool AiAOVIteratorFinished(const AtAOVIterator *iter)
Returns true if there are no more AOV entries to iterate over.
Definition: ai_universe.cpp:627
AI_API void AiNodeIteratorDestroy(AtNodeIterator *iter)
Destroys a node iterator when it is no longer needed.
Definition: ai_universe.cpp:488
AI_API uint32_t AiUniverseGetId(const AtUniverse *universe)
Returns a 32bit integer ID for a universe.
Definition: ai_universe.cpp:460
AI_API AtAOVIterator * AiUniverseGetAOVIterator(const AtUniverse *universe)
Creates a new AOV iterator for a specific universe and resets it to the first entry.
Definition: ai_universe.cpp:264
AI_API void AiNodeEntryIteratorDestroy(AtNodeEntryIterator *iter)
Destroys a node entry iterator when it is no longer needed.
Definition: ai_universe.cpp:540
AI_API AtRenderSession * AiUniverseGetRenderSession(const AtUniverse *universe)
Get the render session using the given universe.
Definition: ai_universe.cpp:319
AI_API AI_PURE AtBBox AiUniverseGetSceneBounds(const AtUniverse *universe)
Returns the bounding box of the given Arnold universe.
Definition: ai_universe.cpp:191
AI_API void AiUniverseDestroy(AtUniverse *universe)
Destroys an existing universe and releases any allocated resources.
Definition: ai_universe.cpp:105
AI_API void AiAOVIteratorDestroy(AtAOVIterator *iter)
Destroys a AOV iterator when it is no longer needed.
Definition: ai_universe.cpp:591
AI_API AI_PURE bool AiNodeIteratorFinished(const AtNodeIterator *iter)
Returns true if there are no more nodes to iterate over.
Definition: ai_universe.cpp:524
AI_API void AiUniverseAddDefaultNodes(AtUniverse *universe, const AtParamValueMap *params)
Creates default camera and/or light nodes when they are not present in the scene.
Definition: ai_universe.cpp:301
This helper struct is used to return information from the AOV iterator.
Definition: ai_universe.h:34
3D axis-aligned bounding box (uses single-precision)
Definition: ai_bbox.h:33
This represents a node type in Arnold.
This represents a node in Arnold.
This represents a universe in Arnold.

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