neuray API Programmer's Manual

iattribute_vector.h File Reference

Description

Attribute vectors, used for triangle and polygon meshes.

Code Example

iattribute_vector.h

‎//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
//*****************************************************************************
//*****************************************************************************

#ifndef MI_NEURAYLIB_IATTRIBUTE_VECTOR_H
#define MI_NEURAYLIB_IATTRIBUTE_VECTOR_H

#include <mi/base/interface_declare.h>
#include <mi/neuraylib/typedefs.h>
#include <mi/neuraylib/version.h>

namespace mi {

namespace neuraylib {





































enum Mesh_attribute_name
{
    //  Tag used to indicate no attribute.
    ATTR_NONE = 0,

    ATTR_NORMAL = 1,

    ATTR_MOTION = 2,

    ATTR_DERIVATIVES = 3,

    ATTR_MATERIAL_INDEX = 4,

    ATTR_TEXTURE = 6,

    ATTR_TEXTURE_NUM = 256,

    ATTR_MAX = ATTR_TEXTURE + ATTR_TEXTURE_NUM,

    //  Undocumented, for alignment only.
    ATTR_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Mesh_attribute_name) == sizeof( Uint32));

enum Connectivity_map_type {

    CONNECTIVITY_MAP_GENERIC,

    //  Undocumented, for alignment only.
    CONNECTIVITY_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Connectivity_map_type) == sizeof( Uint32));


class IAttribute_vector :
    public base::Interface_declare<0xfbe79601,0x3c89,0x4a8d,0xbf,0x0d,0xae,0x21,0x59,0x9a,0xbf,0x80>
{
public:


    virtual Uint32 
               size() const = 0;

    virtual Uint32 
               capacity() const = 0;

    virtual void resize( Uint32 
               size) = 0;

    virtual void reserve( Uint32 size) = 0;

    virtual void clear() = 0;

    virtual bool is_valid_attribute() const = 0;

    virtual Uint32 
               array_size() const = 0;




    virtual Uint32 
               get_uint32( Uint32 index) const = 0;

    virtual Sint32 
               append_uint32( Uint32 u) = 0;

    virtual Sint32 
               set_uint32( Uint32 index, Uint32 u) = 0;




    virtual const Float32_3_struct& get_vector3( Uint32 index) const = 0;

    virtual Sint32 
               append_vector3( const Float32_3_struct& v) = 0;

    virtual Sint32 
               set_vector3( Uint32 index, const Float32_3_struct& v) = 0;




    virtual const Float32_3_struct* get_vector3( Uint32 index, Uint32 n) const = 0;

    virtual Sint32 
               append_vector3( const Float32_3_struct* v, Uint32 n) = 0;

    virtual Sint32 
               set_vector3(
        Uint32 index, const Float32_3_struct* v, Uint32 n) = 0;




    virtual const Float32* get_float32( Uint32 index, Uint32 n) const = 0;

    virtual Sint32 
               append_float32( const Float32* f, Uint32 n) = 0;

    virtual Sint32 
               set_float32( Uint32 index, const Float32* f, Uint32 n) = 0;

};
 // end group mi_neuray_leaf_nodes

} // namespace neuraylib

#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::ATTR_DERIVATIVES;
using neuraylib::ATTR_FORCE_32_BIT;
using neuraylib::ATTR_MATERIAL_INDEX;
using neuraylib::ATTR_MAX;
using neuraylib::ATTR_MOTION;
using neuraylib::ATTR_NONE;
using neuraylib::ATTR_NORMAL;
using neuraylib::ATTR_TEXTURE;
using neuraylib::ATTR_TEXTURE_NUM;
using neuraylib::CONNECTIVITY_FORCE_32_BIT;
using neuraylib::CONNECTIVITY_MAP_GENERIC;
using neuraylib::Connectivity_map_type;
using neuraylib::IAttribute_vector;
using neuraylib::Mesh_attribute_name;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION

} // namespace mi

#endif // MI_NEURAYLIB_IATTRIBUTE_VECTOR_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 an attribute vector for triangle meshes, polygon meshes, and subdivision surfaces. More...

Enumerations

enum  {CONNECTIVITY_MAP_GENERIC, CONNECTIVITY_FORCE_32_BIT = 0xffffffffU }
Symbolic constants for different connectivity types. More...
enum  {ATTR_NONE = 0, ATTR_NORMAL = 1, ATTR_MOTION = 2, ATTR_DERIVATIVES = 3, ATTR_MATERIAL_INDEX = 4, ATTR_TEXTURE = 6, ATTR_TEXTURE_NUM = 256, ATTR_MAX = ATTR_TEXTURE+ATTR_TEXTURE_NUM, ATTR_FORCE_32_BIT = 0xffffffffU }
Symbolic constants for mesh attributes. More...