neuray API Programmer's Manual

ifibers.h File Reference

Description

Scene element Fibers.

Code Example

ifibers.h

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

#ifndef MI_NEURAYLIB_IFIBERS_H
#define MI_NEURAYLIB_IFIBERS_H

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

namespace mi {

namespace neuraylib {


enum Fiber_type
{
    FIBER_TYPE_BSPLINE,                   
    FIBER_TYPE_CATMULL_ROM,               
    FIBER_TYPE_LINEAR,                    
    FIBER_TYPE_BEZIER,                    
    FIBER_TYPE_FORCE_32_BIT = 0xffffffffU //   Undocumented, for alignment only.
};

enum Fiber_attribute_type
{
    FIBER_ATTRIBUTE_PER_PRIMITIVE,              
    FIBER_ATTRIBUTE_PER_VERTEX,                 
    FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU  // Undocumented, for alignment only.
};


mi_static_assert( sizeof( Fiber_type) == sizeof( Uint32));
mi_static_assert( sizeof( Fiber_attribute_type) == sizeof( Uint32));


class IFibers :
    public base::Interface_declare<0x1e24b118,0xa99a,0x4721,0x98,0x1b,0xae,0x5e,0x25,0x00,0xc7,0x62,
                                   neuraylib::IScene_element>
{
public:



    virtual Sint32 
               set_type( Fiber_type fiber_type) = 0;
    
    virtual Fiber_type 
               get_type() const = 0;

    virtual Size 
               get_fibers_size() const = 0;




    virtual Fiber_handle_struct 
               add_fiber( Size vertices) = 0;

    virtual Sint32 
               set_radius( Fiber_handle_struct s, Float32 radius) = 0;

    virtual Sint32 
               set_radius( Fiber_handle_struct s, Float64 radius) = 0;
    



    virtual Size 
               get_vertices_size( Fiber_handle_struct s) const = 0;

    virtual Sint32 
               set_control_point( Fiber_handle_struct s, Size index, Float32_3_struct p) = 0;

    virtual Sint32 
               get_control_point(
        Fiber_handle_struct s, Size index, Float32_3_struct& p) const = 0;

    virtual Sint32 
               set_control_point( Fiber_handle_struct s, Size index, Float64_3_struct p) = 0;

    virtual Sint32 
               get_control_point(
        Fiber_handle_struct s, Size index, Float64_3_struct& p) const = 0;

    virtual Sint32 
               set_radius( Fiber_handle_struct s, Size index, Float32 radius) = 0;

    virtual Sint32 
               get_radius( Fiber_handle_struct s, Size index, Float32& radius) const = 0;

    virtual Sint32 
               set_radius( Fiber_handle_struct s, Size index, Float64 radius) = 0;

    virtual Sint32 
               get_radius( Fiber_handle_struct s, Size index, Float64& radius) const = 0;
    




    virtual bool has_attribute(
        Fiber_attribute_type type, Mesh_attribute_name name) const = 0;

    virtual IAttribute_vector* create_attribute_vector(
        Fiber_attribute_type type, Mesh_attribute_name name, Uint32 dim = 1) = 0;

    virtual const IAttribute_vector* access_attribute_vector(
        Fiber_attribute_type type, Mesh_attribute_name name) const = 0;

    virtual IAttribute_vector* edit_attribute_vector(
        Fiber_attribute_type type, Mesh_attribute_name name) = 0;

    virtual Sint32 
               attach_attribute_vector(
        IAttribute_vector* attribute_vector) = 0;

    virtual Sint32 
               remove_attribute_vector(
        Fiber_attribute_type type, Mesh_attribute_name name) = 0;




    virtual Bbox3_struct 
               get_bbox() const = 0;

    virtual Bbox3_struct 
               get_tight_bbox(
        const Float64_4_4_struct& transformation_matrix) const = 0;



        
    virtual Sint32 
               set_fiber_data(
        Fiber_handle_struct s, Size index, const Float32_4_struct* data, Size n) = 0;

    virtual Sint32 
               set_data(
        const Uint32* fibers, Size n, const Float32_4_struct* data, Size m) = 0;

    virtual Sint32 
               set_data(const Float32_4_struct* data, Size n) = 0;

};
 // end group mi_neuray_leaf_nodes

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IFIBERS_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 collection of fibers. More...

Enumerations

enum  {FIBER_ATTRIBUTE_PER_PRIMITIVE, FIBER_ATTRIBUTE_PER_VERTEX, FIBER_ATTRIBUTE_FORCE_32_BIT = 0xffffffffU }
Different attribute vector types for mi::neuraylib::IFibers. More...
enum  {FIBER_TYPE_BSPLINE, FIBER_TYPE_CATMULL_ROM, FIBER_TYPE_LINEAR, FIBER_TYPE_BEZIER, FIBER_TYPE_FORCE_32_BIT = 0xffffffffU }
Different fiber types of mi::neuraylib::IFibers. More...