neuray API Programmer's Manual

Leaf nodes

[Scene elements]

Description

Leaf nodes of the scene graph, for example, geometry, lights, or cameras.

Classes

class 
Interface representing an attribute vector for triangle meshes, polygon meshes, and subdivision surfaces. More...
class 
The camera defines the viewpoint from which the scene is rendered. More...
class 
A curve used by freeform surfaces. More...
class 
A curve segment used by freeform surfaces. More...
class 
Interface representing a collection of fibers. More...
class 
Interface representing a freeform surface. More...
class 
Point, spot, directional and area lighting. More...
class 
Interface representing an on-demand mesh. More...
class 
Abstract interface for callbacks used by on-demand meshes. More...
class 
A scene element that stores scene-specific settings. More...
class 
Interface representing a collection of particles. More...
class 
A connectivity class for polygon mesh geometry and their attributes. More...
class 
Interface representing a polygon mesh. More...
class 
Interface representing the geometry of on-demand meshes. More...
class 
Interface representing a subdivision surface. More...
class 
A surface of a freeform surface. More...
class 
A texture surface associated with freeform surfaces. More...
class 
A connectivity class for triangle mesh geometry and their attributes. More...
class 
Interface representing a triangle mesh. More...
class 
Interface representing a top-level volume. More...
class 
A triangle defined by three point indices, starting at index 0. More...
struct 
A triangle defined by three point indices, starting at index 0. More...

Typedefs

typedef Identifier< HND_CURVE>  mi::neuraylib::Curve_handle
Handle for curve More...
typedef Identifier_struct< HND_CURVE>  mi::neuraylib::Curve_handle_struct
Handle for curves More...
typedef Identifier< HND_CURVE_SEGMENT>  mi::neuraylib::Curve_segment_handle
Handle for curve segments More...
typedef Identifier_struct< HND_CURVE_SEGMENT>  mi::neuraylib::Curve_segment_handle_struct
Handle for curve segments More...
typedef Identifier< HND_FIBER>  mi::neuraylib::Fiber_handle
Handle for fibers More...
typedef Identifier_struct< HND_FIBER, Uint64>  mi::neuraylib::Fiber_handle_struct
Handle for fibers More...
typedef Identifier< HND_POLY>  mi::neuraylib::Polygon_handle
Handle for polygons More...
typedef Identifier_struct< HND_POLY>  mi::neuraylib::Polygon_handle_struct
Handle for polygons More...
typedef Identifier< HND_SURFACE>  mi::neuraylib::Surface_handle
Handle for surfaces More...
typedef Identifier_struct< HND_SURFACE>  mi::neuraylib::Surface_handle_struct
Handle for surfaces More...
typedef Identifier< HND_TEXTURE_SURFACE>  mi::neuraylib::Texture_surface_handle
Handle for texture surfaces More...
typedef Identifier_struct< HND_TEXTURE_SURFACE>  mi::neuraylib::Texture_surface_handle_struct
Handle for texture surfaces More...
typedef Identifier< HND_TRIANGLE>  mi::neuraylib::Triangle_handle
Handle for triangles More...
typedef Identifier_struct< HND_TRIANGLE>  mi::neuraylib::Triangle_handle_struct
Handle for triangles More...

Enumerations

enum mi::neuraylib::Basis_type{ BASIS_BEZIER = 0, BASIS_BSPLINE = 1, BASIS_TYPE_FORCE_32_BIT = 0xffffffffU}
Different basis types that are supported by freeform surfaces.
enum mi::neuraylib::Connectivity_map_type{ CONNECTIVITY_MAP_GENERIC, CONNECTIVITY_FORCE_32_BIT = 0xffffffffU}
Symbolic constants for different connectivity types. More...
enum mi::neuraylib::Curve_type{ TRIM_CURVE = 0, HOLE_CURVE = 1, CURVE_TYPE_FORCE_32_BIT = 0xffffffffU}
Different curve types that are supported by freeform surfaces.
enum mi::neuraylib::Fiber_attribute_type{ FIBER_ATTRIBUTE_PER_PRIMITIVE, FIBER_ATTRIBUTE_PER_VERTEX, FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU}
Different attribute vector types for mi::neuraylib::IFibers.
enum mi::neuraylib::Fiber_type{ FIBER_TYPE_BSPLINE, FIBER_TYPE_CATMULL_ROM, FIBER_TYPE_LINEAR, FIBER_TYPE_FORCE_32_BIT = 0xffffffffU}
Different fiber types of mi::neuraylib::IFibers.
enum mi::neuraylib::Light_area_shape{ AREA_NONE = 0, AREA_RECTANGLE = 1, AREA_DISC = 2, AREA_SPHERE = 3, AREA_CYLINDER = 4, N_AREA_TYPES, AREA_FORCE_32_BIT = 0xffffffffU}
Supported area light shapes. More...
enum mi::neuraylib::Light_type{ LIGHT_POINT = 0, LIGHT_INFINITE = 2, LIGHT_FORCE_32_BIT = 0xffffffffU}
Supported light types. More...
enum mi::neuraylib::Mesh_attribute_name{ ATTR_NONE = 0, ATTR_NORMAL = 1, ATTR_MOTION = 2, ATTR_DERIVATIVES = 3, ATTR_MATERIAL_INDEX = 4, ATTR_TEXTURE = 6, ATTR_TEXTURE_NUM = 256, ATTR_USER = ATTR_TEXTURE+ATTR_TEXTURE_NUM, ATTR_USER_NUM = 4, ATTR_MAX = ATTR_USER+ATTR_USER_NUM, ATTR_FORCE_32_BIT = 0xffffffffU}
Symbolic constants for mesh attributes. More...
enum mi::neuraylib::Parameter_space_dimension{ DIMENSION_U = 0, DIMENSION_V = 1, DIMENSION_FORCE_32_BIT = 0xffffffffU}
Distinguishes the two dimensions of the parameter space of freeform surfaces.
enum mi::neuraylib::Particle_type{ PARTICLE_TYPE_SPHERE, PARTICLE_TYPE_FORCE_32_BIT = 0xffffffffU}
Different particle types of mi::neuraylib::IParticles.
enum mi::neuraylib::Vertex_feature{ SMOOTH_VERTEX = 0, CORNER_VERTEX = 1, VERTEX_FEATURE_FORCE_32_BIT = 0xffffffffU}
Vertex features. More...

Functions

 mi::neuraylib::Identifier::Identifier( Int_type h)
Constructor. Initializes handle with given integer value.
 mi::neuraylib::Identifier::Identifier( Identifier_struct < name , Int_type > h)
Constructor from underlying storage type.
bool  mi::neuraylib::Identifier::is_valid() const
Returns whether the handle is valid.
 mi::neuraylib::Identifier::operator Int_type() const
Conversion operator to underlying integer type.
Int_type mi::neuraylib::Identifier::operator*() const
Dereferences the handle. Returns its integer value.
Identifier& mi::neuraylib::Identifier::operator++()
Pre-increment operator.
Identifier mi::neuraylib::Identifier::operator++( int )
Post-increment operator.
Identifier& mi::neuraylib::Identifier::operator--()
Pre-decrement operator.
Identifier mi::neuraylib::Identifier::operator--( int )
Post-decrement operator.
bool  mi::neuraylib::Identifier::operator<( const Identifier& other) const
Less-than operator.
bool  mi::neuraylib::Identifier::operator<=( const Identifier& other) const
Less-than-or-equal-to operator.
bool  mi::neuraylib::Identifier::operator>( const Identifier& other) const
Greater-than operator.
bool  mi::neuraylib::Identifier::operator>=( const Identifier& other) const
Greater-than-or-equal-to operator.

Typedefs

typedef Identifier< HND_CURVE> mi::neuraylib::Curve_handle

Handle for curve

See also:

the underlying POD type mi::neuraylib::Curve_handle_struct

typedef Identifier_struct< HND_CURVE> mi::neuraylib::Curve_handle_struct

Handle for curves This POD type is the underlying storage class for mi::neuraylib::Curve_handle.

typedef Identifier< HND_CURVE_SEGMENT> mi::neuraylib::Curve_segment_handle

Handle for curve segments

See also:

the underlying POD type mi::neuraylib::Curve_segment_handle_struct

typedef Identifier_struct< HND_CURVE_SEGMENT> mi::neuraylib::Curve_segment_handle_struct

Handle for curve segments This POD type is the underlying storage class for mi::neuraylib::Curve_segment_handle.

typedef Identifier< HND_FIBER> mi::neuraylib::Fiber_handle

Handle for fibers

See also:

the underlying POD type mi::neuraylib::Fiber_handle_struct

typedef Identifier_struct< HND_FIBER, Uint64> mi::neuraylib::Fiber_handle_struct

Handle for fibers This POD type is the underlying storage class for mi::neuraylib::Fiber_handle.

typedef Identifier< HND_POLY> mi::neuraylib::Polygon_handle

Handle for polygons

See also:

the underlying POD type mi::neuraylib::Polygon_handle_struct

typedef Identifier_struct< HND_POLY> mi::neuraylib::Polygon_handle_struct

Handle for polygons This POD type is the underlying storage class for mi::neuraylib::Polygon_handle.

typedef Identifier< HND_SURFACE> mi::neuraylib::Surface_handle

Handle for surfaces

See also:

the underlying POD type mi::neuraylib::Surface_handle_struct

typedef Identifier_struct< HND_SURFACE> mi::neuraylib::Surface_handle_struct

Handle for surfaces This POD type is the underlying storage class for mi::neuraylib::Surface_handle.

typedef Identifier< HND_TEXTURE_SURFACE> mi::neuraylib::Texture_surface_handle

Handle for texture surfaces

See also:

the underlying POD type mi::neuraylib::Texture_surface_handle_struct

typedef Identifier_struct< HND_TEXTURE_SURFACE> mi::neuraylib::Texture_surface_handle_struct

Handle for texture surfaces This POD type is the underlying storage class for mi::neuraylib::Texture_surface_handle.

typedef Identifier< HND_TRIANGLE> mi::neuraylib::Triangle_handle

Handle for triangles

See also:

the underlying POD type mi::neuraylib::Triangle_handle_struct

typedef Identifier_struct< HND_TRIANGLE> mi::neuraylib::Triangle_handle_struct

Handle for triangles This POD type is the underlying storage class for mi::neuraylib::Triangle_handle.

Enums

enum mi::neuraylib::Basis_type

Different basis types that are supported by freeform surfaces.

Enumerator:

BASIS_BEZIER = 0
Represents a Bezier basis.
BASIS_BSPLINE = 1
Represents a B-spline basis.
BASIS_TYPE_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Connectivity_map_type

Symbolic constants for different connectivity types. Connectivities may come in different types. Currently, there is only one type.

See also:

mi::neuraylib::ITriangle_mesh::create_connectivity()

mi::neuraylib::IPolygon_mesh::create_connectivity()

Enumerator:

CONNECTIVITY_MAP_GENERIC
A generic connectivity allows to map the vertices of every polygon to arbitrary indices. These indices either represents points (for the mesh connectivity) or elements of the attribute vector (for custom connectivities).
CONNECTIVITY_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Curve_type

Different curve types that are supported by freeform surfaces.

Enumerator:

TRIM_CURVE = 0
A trim curve cuts away all parts of the surface outside the curve.
HOLE_CURVE = 1
A hole curve cuts away all parts of the surface inside the curve.
CURVE_TYPE_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Fiber_attribute_type

Different attribute vector types for mi::neuraylib::IFibers.

Enumerator:

FIBER_ATTRIBUTE_PER_PRIMITIVE
Per-fiber attribute.
FIBER_ATTRIBUTE_PER_VERTEX
Per-control point attribute.
FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Fiber_type

Different fiber types of mi::neuraylib::IFibers.

Enumerator:

FIBER_TYPE_BSPLINE
Uses cubic uniform B-Splines.
FIBER_TYPE_CATMULL_ROM
Uses Catmull-Rom splines.
FIBER_TYPE_LINEAR
Uses linear curves.
FIBER_TYPE_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Light_area_shape

Enumerator:

AREA_NONE = 0
Not an area light.
AREA_RECTANGLE = 1
Rectangular shape.
AREA_DISC = 2
Disc shape.
AREA_SPHERE = 3
Sphere shape.
AREA_CYLINDER = 4
Cylinder shape.
N_AREA_TYPES
AREA_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Light_type

Enumerator:

LIGHT_POINT = 0
Point light: emits rays in all directions from the origin.
LIGHT_INFINITE = 2
Directional light: no origin, all light rays parallel.
LIGHT_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Mesh_attribute_name

Symbolic constants for mesh attributes. Mesh attributes are an extension of the regular attributes (see mi::neuraylib::IAttribute_set). They are only supported for scene elements that represent geometry, namely triangle meshes, polygon meshes, subdivision surfaces, and freeform surfaces. In contrast to regular attributes which exist only once per object, mesh attributes are always a vector of values with one vector element per primitive, per point, or per vertex. Note that a vector element in itself can be an array.

Mesh attributes are identified by the symbolic names of this enum. Note that there are mi::neuraylib::ATTR_TEXTURE_NUM mesh attributes for texture spaces, but not all values exist as explicit enum values. In order to use these textures spaces, you need to cast the corresponding integer in the range mi::neuraylib::ATTR_TEXTURE to mi::neuraylib::ATTR_TEXTURE + mi::neuraylib::ATTR_TEXTURE_NUM - 1 to mi::neuraylib::Mesh_attribute_name.

One mesh attribute, mi::neuraylib::ATTR_MATERIAL_INDEX, stores one vector element per primitive. That is, there is one material index for each triangle, quad, or polygon of the mesh. This attribute can be created, accessed, and edited directly from the corresponding mesh interfaces.

The remaining attributes store one vector element either per point or per vertex of the mesh. These attributes cannot be created, accessed, and edited directly from the corresponding mesh interfaces, only from a connectivity (either from the mesh connectivity, or from a custom connectivity). The connectivity maps each vertex of the mesh to an index which is used to look up the corresponding vector element. If the mesh connectivity is used, the attribute vector stores one element per point (since the mesh connectivity already defines the mapping of vertices to points). For a custom connectivity, the attribute vector allows to store one element per vertex (possibly sharing values between vertices as defined by the connectivity).

See also:

mi::neuraylib::ITriangle_mesh::create_attribute_vector()

mi::neuraylib::IPolygon_mesh::create_attribute_vector()

mi::neuraylib::ITriangle_connectivity::create_attribute_vector()

mi::neuraylib::IPolygon_connectivity::create_attribute_vector()

mi::neuraylib::IFreeform_surface::create_attribute_vector()

mi::neuraylib::IFibers::create_attribute_vector()

mi::neuraylib::IAttribute_vector

Enumerator:

ATTR_NONE = 0
ATTR_NORMAL = 1
Surface normals of type mi::Float32_3 per point or per vertex.
ATTR_MOTION = 2
Motion vectors of type mi::Float32_3[] per point or per vertex. The array size is chosen when the attribute vector is created.An array size of N splits the time interval \[0, 1\] into N segments of equal length where the motion vector at the beginning of the first segment is not explicitly given here, but zero everywhere by convention. The N motion vectors (per point or vertex) define the position of the vertices at the end of the N segments. Intermediate positions are obtained by linear interpolation. Positions outside the interval \[0, 1\] are obtained by linear extrapolation.If the entire mesh is transformed uniformly, then time-dependent transformations on instances are more efficient than motion vectors (see mi::neuraylib::IInstance).mi::neuraylib::IOptions::get_shutter_open(), mi::neuraylib::IOptions::get_shutter_close(), mi::neuraylib::IInstance
ATTR_DERIVATIVES = 3
Surface derivatives of type mi::Float32_3[2] per point or per vertex.
ATTR_MATERIAL_INDEX = 4
Material index of type mi::Uint32 per primitive. For best performance it is recommended to sort the primitives by their material index such that when looping over all primitives the material index changes as infrequently as possible.
ATTR_TEXTURE = 6
Texture coordinates of type mi::Float32[] per point or per vertex (also called texture space). The array size is chosen when the attribute vector is created.Texture spaces need to use consecutive mesh attribute IDs starting with mi::neuraylib::ATTR_TEXTURE.
ATTR_TEXTURE_NUM = 256
Total number of supported texture spaces.
ATTR_USER = ATTR_TEXTURE+ATTR_TEXTURE_NUM
User data values of type mi::Float32[] per point or per vertex. The array size is chosen when the attribute vector is created.User data arrays need to use consecutive mesh attribute IDs starting with mi::neuraylib::ATTR_USER.
ATTR_USER_NUM = 4
Total number of supported user data arrays.
ATTR_MAX = ATTR_USER+ATTR_USER_NUM
Maximum legal attribute number + 1.
ATTR_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Parameter_space_dimension

Distinguishes the two dimensions of the parameter space of freeform surfaces.

Enumerator:

DIMENSION_U = 0
Represents the U-dimension of the parameter space.
DIMENSION_V = 1
Represents the V-dimension of the parameter space.
DIMENSION_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Particle_type

Different particle types of mi::neuraylib::IParticles.

Enumerator:

PARTICLE_TYPE_SPHERE
Sphere.
PARTICLE_TYPE_FORCE_32_BIT = 0xffffffffU
enum mi::neuraylib::Vertex_feature

Vertex features. Currently, two vertex features are supported, smooth vertices (the default) and corners.

See also:

mi::neuraylib::ISubdivision_surface::set_vertex_feature()

mi::neuraylib::ISubdivision_surface::get_vertex_feature()

Enumerator:

SMOOTH_VERTEX = 0
the vertex is smooth (the default)
CORNER_VERTEX = 1
the vertex is a corner
VERTEX_FEATURE_FORCE_32_BIT = 0xffffffffU

Functions

mi::neuraylib::Identifier::Identifier( Int_type h) [inline]

Constructor. Initializes handle with given integer value.

mi::neuraylib::Identifier::Identifier( Identifier_struct < name , Int_type > h) [inline]

Constructor from underlying storage type.

bool mi::neuraylib::Identifier::is_valid() const [inline]

Returns whether the handle is valid.

mi::neuraylib::Identifier::operator Int_type() const [inline]

Conversion operator to underlying integer type.

Int_type mi::neuraylib::Identifier::operator*() const [inline]

Dereferences the handle. Returns its integer value.

Identifier& mi::neuraylib::Identifier::operator++() [inline]

Pre-increment operator.

Identifier mi::neuraylib::Identifier::operator++( int ) [inline]

Post-increment operator.

Identifier& mi::neuraylib::Identifier::operator--() [inline]

Pre-decrement operator.

Identifier mi::neuraylib::Identifier::operator--( int ) [inline]

Post-decrement operator.

bool mi::neuraylib::Identifier::operator<( const Identifier& other) const [inline]

Less-than operator.

bool mi::neuraylib::Identifier::operator<=( const Identifier& other) const [inline]

Less-than-or-equal-to operator.

bool mi::neuraylib::Identifier::operator>( const Identifier& other) const [inline]

Greater-than operator.

bool mi::neuraylib::Identifier::operator>=( const Identifier& other) const [inline]

Greater-than-or-equal-to operator.