neuray API Programmer's Manual

iinstance.h File Reference

Description

Scene element Instance.

Code Example

iinstance.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_IINSTANCE_H
#define MI_NEURAYLIB_IINSTANCE_H

#include <mi/neuraylib/iscene_element.h>
#include <mi/neuraylib/typedefs.h>

namespace mi {

namespace neuraylib {




enum Transformation_type {
    SCALING,     
    ROTATION,    
    TRANSLATION, 
    MATRIX,      
    TRANSFORMATION_TYPE_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Transformation_type) == sizeof( Uint32));

class IInstance :
    public base::Interface_declare<0x11b46e5a,0x577b,0x4767,0x8b,0x35,0x88,0xd5,0xa3,0x3e,0xd0,0xe9,
                                   neuraylib::IScene_element>
{
public:
    virtual Sint32 
               attach( const char* scene_element) = 0;

    virtual void detach() = 0;

    virtual const char* get_item() const = 0;



    virtual bool srt_mode() const = 0;




    virtual void set_matrix( const Float64_4_4_struct& matrix) = 0;

    virtual const Float64_4_4_struct& get_matrix() const = 0;




    virtual void resize_time_slots( Size count) = 0;

    virtual Size 
               time_slots_size() const = 0;

    virtual Sint32 
               set_time_value( Size time_index, Float64 value) = 0;

    virtual Sint32 
               get_time_value( Size time_index, Float64& value) const = 0;

    virtual void resize_transformation_sequences( Size count) = 0;

    virtual Size 
               transformation_sequences_size() const = 0;

    virtual Sint32 
               set_transformation_type( Size sequence_index, Transformation_type type) = 0;

    virtual Sint32 
               get_transformation_type(
        Size sequence_index, Transformation_type& type) const = 0;

    virtual Sint32 
               set_transformation_data(
        Size time_index, Size sequence_index, const Float64* data) = 0;

    virtual Sint32 
               get_transformation_data(
        Size time_index, Size sequence_index, Float64* data) const = 0;




    virtual Float64_4_4_struct 
               evaluate( Float64 time = 0.0) const = 0;

};
 // end group mi_neuray_scene_graph_structure

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IINSTANCE_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
An instance is a scene element that adds a transformation and attributes to another scene element. More...

Enumerations

enum  {SCALING, ROTATION, TRANSLATION, MATRIX, TRANSFORMATION_TYPE_FORCE_32_BIT = 0xffffffffU }
The four different types of elementary transformations. More...