NVIDIA Iray API — software examples nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
example_scene.cpp File Reference
#include <iostream>
#include <mi/neuraylib.h>
#include "example_shared.h"
#include "example_render_target_simple.h"

Go to the source code of this file.

Functions

void create_flag (mi::neuraylib::IAttribute_set *attribute_set, const char *name, bool value)
 
mi::neuraylib::IScenecreate_scene (mi::neuraylib::INeuray *neuray, mi::neuraylib::ITransaction *transaction)
 
void configuration (mi::neuraylib::INeuray *neuray, const char *mdl_path)
 
void rendering (mi::neuraylib::INeuray *neuray)
 
int main (int argc, char *argv[])
 

Variables

const mi::Uint32 cube_n_points = 8
 
const mi::Uint32 cube_n_normals = 6
 
const mi::Uint32 cube_n_uvs = 4
 
const mi::Uint32 cube_n_triangles = 12
 
mi::Float32_3 cube_points [cube_n_points]
 
mi::Float32_3 cube_normals [cube_n_normals]
 
mi::Float32_2 cube_uvs [cube_n_uvs]
 
mi::neuraylib::Triangle_point_indices cube_mesh_connectivity [cube_n_triangles]
 
mi::neuraylib::Triangle_point_indices cube_normal_connectivity [cube_n_triangles]
 
mi::neuraylib::Triangle_point_indices cube_uv_connectivity [cube_n_triangles]
 
const mi::Uint32 ground_n_points = 4
 
const mi::Uint32 ground_n_normals = 1
 
const mi::Uint32 ground_n_uvs = 4
 
const mi::Uint32 ground_n_triangles = 2
 
mi::Float32_3 ground_points [ground_n_points]
 
mi::Float32_3 ground_normals [ground_n_normals]
 
mi::Float32_2 ground_uvs [ground_n_uvs]
 
mi::neuraylib::Triangle_point_indices ground_mesh_connectivity [ground_n_triangles]
 
mi::neuraylib::Triangle_point_indices ground_normal_connectivity [ground_n_triangles]
 
mi::neuraylib::Triangle_point_indices ground_uv_connectivity [ground_n_triangles]
 

Function Documentation

void configuration ( mi::neuraylib::INeuray neuray,
const char *  mdl_path 
)

Definition at line 402 of file example_scene.cpp.

void create_flag ( mi::neuraylib::IAttribute_set attribute_set,
const char *  name,
bool  value 
)

Definition at line 133 of file example_scene.cpp.

mi::neuraylib::IScene* create_scene ( mi::neuraylib::INeuray neuray,
mi::neuraylib::ITransaction transaction 
)

Definition at line 141 of file example_scene.cpp.

int main ( int  argc,
char *  argv[] 
)

Definition at line 461 of file example_scene.cpp.

void rendering ( mi::neuraylib::INeuray neuray)

Definition at line 417 of file example_scene.cpp.

Variable Documentation

const mi::Uint32 cube_n_normals = 6

Definition at line 29 of file example_scene.cpp.

const mi::Uint32 cube_n_points = 8

Definition at line 28 of file example_scene.cpp.

const mi::Uint32 cube_n_triangles = 12

Definition at line 31 of file example_scene.cpp.

const mi::Uint32 cube_n_uvs = 4

Definition at line 30 of file example_scene.cpp.

Initial value:
= {
mi::Float32_3( 0.0, 0.0, -1.0),
mi::Float32_3( 0.0, -1.0, 0.0),
mi::Float32_3( -1.0, 0.0, 0.0),
mi::Float32_3( 0.0, 0.0, 1.0),
mi::Float32_3( 0.0, 1.0, 0.0),
mi::Float32_3( 1.0, 0.0, 0.0) }

Definition at line 43 of file example_scene.cpp.

Initial value:
= {
mi::Float32_3( -0.5, -0.5, -0.5),
mi::Float32_3( -0.5, -0.5, 0.5),
mi::Float32_3( -0.5, 0.5, -0.5),
mi::Float32_3( -0.5, 0.5, 0.5),
mi::Float32_3( 0.5, -0.5, -0.5),
mi::Float32_3( 0.5, -0.5, 0.5),
mi::Float32_3( 0.5, 0.5, -0.5),
mi::Float32_3( 0.5, 0.5, 0.5) }

Definition at line 33 of file example_scene.cpp.

Initial value:
= {
mi::Float32_2( 0.0, 0.0),
mi::Float32_2( 1.0, 0.0),
mi::Float32_2( 0.0, 1.0),
mi::Float32_2( 1.0, 1.0) }

Definition at line 51 of file example_scene.cpp.

Initial value:

Definition at line 120 of file example_scene.cpp.

const mi::Uint32 ground_n_normals = 1

Definition at line 101 of file example_scene.cpp.

const mi::Uint32 ground_n_points = 4

Definition at line 100 of file example_scene.cpp.

const mi::Uint32 ground_n_triangles = 2

Definition at line 103 of file example_scene.cpp.

const mi::Uint32 ground_n_uvs = 4

Definition at line 102 of file example_scene.cpp.

Initial value:

Definition at line 124 of file example_scene.cpp.

Initial value:
= {
mi::Float32_3( 0.0, 1.0, 0.0) }

Definition at line 111 of file example_scene.cpp.

Initial value:
= {
mi::Float32_3( -2.0, 0.0, -2.0),
mi::Float32_3( -2.0, 0.0, 2.0),
mi::Float32_3( 2.0, 0.0, 2.0),
mi::Float32_3( 2.0, 0.0, -2.0) }

Definition at line 105 of file example_scene.cpp.

Initial value:

Definition at line 128 of file example_scene.cpp.

Initial value:
= {
mi::Float32_2( 0.0, 1.0),
mi::Float32_2( 0.0, 0.0),
mi::Float32_2( 1.0, 0.0),
mi::Float32_2( 1.0, 1.0) }

Definition at line 114 of file example_scene.cpp.