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
29{
31 uint8_t type;
34};
35
57class AtUniverse;
58
62AI_API AtUniverse* AiUniverse();
63AI_API void AiUniverseDestroy(AtUniverse* universe);
64AI_API bool AiUniverseCacheFlush(const AtUniverse* universe, int cache_flags);
65AI_API AI_PURE AtNode* AiUniverseGetOptions(const AtUniverse* universe);
66AI_API AI_PURE AtNode* AiUniverseGetCamera(const AtUniverse* universe);
67AI_API AI_PURE AtBBox AiUniverseGetSceneBounds(const AtUniverse* universe);
68AI_API AtNodeIterator* AiUniverseGetNodeIterator(const AtUniverse* universe, unsigned int node_mask);
69AI_API AtNodeEntryIterator* AiUniverseGetNodeEntryIterator(unsigned int node_mask);
70AI_API AtAOVIterator* AiUniverseGetAOVIterator(const AtUniverse* universe);
71AI_API void AiUniverseAddDefaultNodes(AtUniverse* universe, const AtParamValueMap* params);
72AI_API AtRenderSession* AiUniverseGetRenderSession(const AtUniverse* universe);
73AI_API bool AiUniverseCompare(const AtUniverse* universe1, const AtUniverse* universe2, unsigned int node_mask = AI_NODE_ALL, AtParamValueMap* diffs = NULL);
74AI_API uint32_t AiUniverseGetId(const AtUniverse* universe);
75AI_API AtUniverse* AiUniverseGetFromId(uint32_t universe_id);
76
80AI_API void AiNodeIteratorDestroy(AtNodeIterator* iter);
81AI_API AtNode* AiNodeIteratorGetNext(AtNodeIterator* iter);
82AI_API AI_PURE bool AiNodeIteratorFinished(const AtNodeIterator* iter);
83/*\}*/
84
88AI_API void AiNodeEntryIteratorDestroy(AtNodeEntryIterator* iter);
89AI_API AtNodeEntry* AiNodeEntryIteratorGetNext(AtNodeEntryIterator* iter);
90AI_API AI_PURE bool AiNodeEntryIteratorFinished(const AtNodeEntryIterator* iter);
91/*\}*/
92
96AI_API void AiAOVIteratorDestroy(AtAOVIterator* iter);
97AI_API const AtAOVEntry* AiAOVIteratorGetNext(AtAOVIterator* iter);
98AI_API AI_PURE bool AiAOVIteratorFinished(const AtAOVIterator* iter);
99/*\}*/
100
104#define AI_CACHE_TEXTURE 0x0001
105#define AI_CACHE_BACKGROUND 0x0002
106#define AI_CACHE_QUAD 0x0004
107#define AI_CACHE_ALL 0xFFFF
108/*\}*/
109
110/*\}*/
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:46
#define AI_NODE_ALL
Bitmask including all node types, used by AiASSWrite()
Definition: ai_node_entry.h:48
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:246
int blend_mode
Blend mode
Definition: ai_universe.h:32
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:573
AI_API AtUniverse * AiUniverse()
Creates a new universe that can be used independently of the default universe.
Definition: ai_universe.cpp:99
AtString expression
Optional light path expression.
Definition: ai_universe.h:33
AI_API AI_PURE AtNode * AiUniverseGetCamera(const AtUniverse *universe)
Fetches the currently active camera node for a given Arnold universe.
Definition: ai_universe.cpp:153
AI_API AI_PURE AtNode * AiUniverseGetOptions(const AtUniverse *universe)
Fetches the global options node for a specific Arnold universe.
Definition: ai_universe.cpp:126
AI_API AtNodeEntry * AiNodeEntryIteratorGetNext(AtNodeEntryIterator *iter)
Returns current node entry and points node entry iterator to the next node entry.
Definition: ai_universe.cpp:562
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:355
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:217
AI_API const AtAOVEntry * AiAOVIteratorGetNext(AtAOVIterator *iter)
Returns current AOV entry and points AOV iterator to the next AOV.
Definition: ai_universe.cpp:613
AI_API AtNode * AiNodeIteratorGetNext(AtNodeIterator *iter)
Returns current node and points node iterator to the next node.
Definition: ai_universe.cpp:510
AI_API AtUniverse * AiUniverseGetFromId(uint32_t universe_id)
Returns a universe from its 32bit integer ID.
Definition: ai_universe.cpp:471
uint8_t type
Data type
Definition: ai_universe.h:31
AtString name
AOV name
Definition: ai_universe.h:30
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:624
AI_API bool AiUniverseCacheFlush(const AtUniverse *universe, int cache_flags)
Flush one or several caches in a given Arnold universe.
Definition: ai_universe.cpp:33
AI_API void AiNodeIteratorDestroy(AtNodeIterator *iter)
Destroys a node iterator when it is no longer needed.
Definition: ai_universe.cpp:485
AI_API uint32_t AiUniverseGetId(const AtUniverse *universe)
Returns a 32bit integer ID for a universe.
Definition: ai_universe.cpp:457
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:261
AI_API void AiNodeEntryIteratorDestroy(AtNodeEntryIterator *iter)
Destroys a node entry iterator when it is no longer needed.
Definition: ai_universe.cpp:537
AI_API AtRenderSession * AiUniverseGetRenderSession(const AtUniverse *universe)
Get the render session using the given universe.
Definition: ai_universe.cpp:316
AI_API AI_PURE AtBBox AiUniverseGetSceneBounds(const AtUniverse *universe)
Returns the bounding box of the given Arnold universe.
Definition: ai_universe.cpp:188
AI_API void AiUniverseDestroy(AtUniverse *universe)
Destroys an existing universe and releases any allocated resources.
Definition: ai_universe.cpp:114
AI_API void AiAOVIteratorDestroy(AtAOVIterator *iter)
Destroys a AOV iterator when it is no longer needed.
Definition: ai_universe.cpp:588
AI_API AI_PURE bool AiNodeIteratorFinished(const AtNodeIterator *iter)
Returns true if there are no more nodes to iterate over.
Definition: ai_universe.cpp:521
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:298
Definition: ai_universe.h:29
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.

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