neuray API Programmer's Manual

ivolume.h File Reference

Description

Scene element Volume.

Code Example

ivolume.h

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

#ifndef MI_NEURAYLIB_IVOLUME_H
#define MI_NEURAYLIB_IVOLUME_H

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

namespace mi {

typedef math::Bbox_struct< Sint32, 3> 
               Voxel_block_struct;
typedef math::Bbox< Sint32, 3> 
               Voxel_block;

class IArray;

namespace neuraylib {

class IReader;






class IVolume :
    public base::Interface_declare<0xdc35e746,0x3410,0x46b4,0x91,0x31,0xba,0xde,0x70,0x7d,0xa1,0xe3,
                                   neuraylib::IScene_element>
{
public:
    virtual void set_bounds(
            const Bbox3_struct& box,
            const Float32_4_4_struct& tf=Float32_4_4(1)) = 0;

    virtual Bbox3_struct 
               get_bounds() const = 0;

    virtual Float32_4_4_struct 
               get_transform() const = 0;

    inline void set_bounds(
            const Bbox3& box,
            const Float32_4_4_struct& tf=Float32_4_4(1))
    {
        const Bbox3_struct box_struct = box;
        set_bounds( box_struct, tf);
    }
};
 // end group mi_neuray_leaf_nodes






class IVolume_data :
    public base::Interface_declare<0xe0ce059f,0x51cf,0x4fef,0x8c,0x87,0x91,0x93,0x16,0x59,0xa5,0x44,
                                   neuraylib::IScene_element>
{
public:

    virtual Sint32 
               reset_file( const char* filename, const char* selector=0) = 0;

    virtual Sint32 
               reset_reader(
        IReader* reader, const char* format, const char* selector = 0) = 0;

    virtual const char* get_filename() const = 0;

    virtual const char* get_original_filename() const = 0;

    virtual const char* get_selector() const = 0;

    virtual Voxel_block_struct 
               get_data_bounds() const = 0;

    virtual Float32_4_4_struct 
               get_transform() const = 0;

    virtual const IArray* list_contents(const char* path) = 0;

    virtual const IArray* list_contents(IReader* reader, const char* format) = 0;

    virtual Sint32 
               export_file(const char* filename, const char* selector = 0) const = 0;
};


class IVolume_info :
    public base::Interface_declare<0xe0ce059f,0x51cf,0x4fef,0x8c,0x87,0x91,0x93,0x16,0x59,0xa5,0x45>
{
public:
    virtual const char* get_name() const = 0;

    virtual const char* get_value_type() const = 0;

    virtual const Voxel_block_struct& get_data_bounds() const = 0;

    virtual const Float32_4_4_struct& get_transform() const = 0;
};

 // end group mi_neuray_misc

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IVOLUME_H

Namespaces

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

Classes

class 
Interface representing a top-level volume. More...
class 
Interface representing a volume data set. More...
class 
Basic information about one of the data sets contained in a volume data file. More...

Typedefs

typedef math::Bbox<Sint32, 3> 
Integer bounding box for voxel grids. More...
typedef math::Bbox_struct<Sint32, 3> 
Storage format for grid space volume bounding boxes. More...