[][src]Crate nsi

A flexible, modern API for offline 3D renderers

The Nodal Scene Interface (ɴsɪ) is built around the concept of nodes. Each node has a unique handle to identify it and a type which describes its intended function in the scene. Nodes are abstract containers for data. The interpretation depends on the node type. Nodes can also be connected to each other to express relationships.

Data is stored on nodes as attributes. Each attribute has a name which is unique on the node and a type which describes the kind of data it holds (strings, integer numbers, floating point numbers, etc).

Relationships and data flow between nodes are represented as connections. Connections have a source and a destination. Both can be either a node or a specific attribute of a node. There are no type restrictions for connections in the interface itself. It is acceptable to connect attributes of different types or even attributes to nodes. The validity of such connections depends on the types of the nodes involved.

What we refer to as the ɴsɪ has two major components:

  1. Methods to create nodes, attributes and their connections. These are attached to a rendering Context.

  2. Nodes of different NodeType understood by the renderer.

Much of the complexity and expressiveness of the interface comes from the supported nodes.

The first part was kept deliberately simple to make it easy to support multiple ways of creating nodes.

Modules

arg

Macros

color
colors
double
double_matrices

A macro to create a double precision 4×4 matrix array argument.

double_matrix

A macro to create a double precision 4×4 matrix argument.

doubles
float
floats
integer
integers
matrices
matrix
normal
normals
point
pointer
pointers
points
reference
references
string

A macro to create a string argument.

strings

A macro to create a string array argument.

unsigned
unsigneds
vector
vectors

Structs

Context

An ɴsɪ context.

Enums

NodeType

The type for a node in the ɴsɪ scene graph.

RenderStatus

The status of a interactive render session.