neuray API Programmer's Manual

isubdivision_surface.h File Reference

Description

Scene element Subdivision_surface.

Code Example

isubdivision_surface.h

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

#ifndef MI_NEURAYLIB_ISUBDIVISION_SURFACE_H
#define MI_NEURAYLIB_ISUBDIVISION_SURFACE_H

#include <mi/neuraylib/ipolygon_mesh.h>

namespace mi {

class IArray;

namespace neuraylib {







enum Vertex_feature {
    SMOOTH_VERTEX               = 0, 
    CORNER_VERTEX               = 1, 
    VERTEX_FEATURE_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Vertex_feature) == sizeof( Uint32));

class ISubdivision_surface :
    public base::Interface_declare<0x6a65666a,0x849d,0x4081,0xaa,0x32,0xb3,0xa1,0xeb,0xa0,0x6f,0xe2,
                                   neuraylib::IPolygon_mesh>
{
public:


    virtual Uint32 
               triangles_size() const = 0;

    virtual Uint32 
               triangles_capacity() const = 0;

    virtual void reserve_triangles( Uint32 n) = 0;

    virtual Uint32 
               quads_size() const = 0;

    virtual Uint32 
               quads_capacity() const = 0;

    virtual void reserve_quads( Uint32 n) = 0;




    virtual Sint32 
               set_crease_value( Polygon_handle_struct p, Uint32 index, Float32 value) = 0;

    virtual Float32 
               get_crease_value( Polygon_handle_struct p, Uint32 index) const = 0;

    virtual Sint32 
               set_crease_values( Polygon_handle_struct p, const Float32* values) = 0;

    virtual const Float32* get_crease_values( Polygon_handle_struct p) const = 0;

    virtual IArray* get_inconsistent_crease_values() const = 0;




    virtual Sint32 
               set_vertex_feature( Uint32 index, Vertex_feature feature) = 0;

    virtual Vertex_feature 
               get_vertex_feature( Uint32 index) const = 0;

};
 // end group mi_neuray_leaf_nodes

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_ISUBDIVISION_SURFACE_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 subdivision surface. More...

Enumerations

enum  {SMOOTH_VERTEX = 0, CORNER_VERTEX = 1, VERTEX_FEATURE_FORCE_32_BIT = 0xffffffffU }
Vertex features. More...