neuray API Programmer's Manual

ifreeform_surface.h File Reference

Description

Scene element Freeform_surface.

Code Example

ifreeform_surface.h

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

#ifndef MI_NEURAYLIB_IFREEFORM_SURFACE_H
#define MI_NEURAYLIB_IFREEFORM_SURFACE_H

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

namespace mi {

namespace neuraylib {

class ISurface;
class ICurve;
class ICurve_segment;
class ITexture_surface;


enum Basis_type
{
    BASIS_BEZIER = 0,

    BASIS_BSPLINE = 1,

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

mi_static_assert( sizeof( Basis_type) == sizeof( Uint32));

enum Parameter_space_dimension
{
    DIMENSION_U = 0,

    DIMENSION_V = 1,

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

mi_static_assert( sizeof( Parameter_space_dimension) == sizeof( Uint32));

enum Curve_type
{
    TRIM_CURVE = 0,

    HOLE_CURVE = 1,

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

mi_static_assert( sizeof( Curve_type) == sizeof( Uint32));

class IFreeform_surface :
    public base::Interface_declare<0x5b54fda0,0x1034,0x48a2,0x9d,0xd1,0x4d,0x14,0xaa,0xba,0xa2,0xa7,
                                   neuraylib::IScene_element>
{
public:



    virtual Uint32 
               get_surfaces_size() const = 0;

    virtual ISurface* add_surface() = 0;

    virtual const ISurface* access_surface( Surface_handle_struct s) const = 0;

    virtual ISurface* edit_surface( Surface_handle_struct s) = 0;

    virtual Sint32 
               remove_surface( Surface_handle_struct s) = 0;




    virtual bool has_attribute( Mesh_attribute_name name) const = 0;

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

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

    virtual IAttribute_vector* edit_attribute_vector( Mesh_attribute_name name) = 0;

    virtual Sint32 
               attach_attribute_vector( IAttribute_vector* attribute_vector) = 0;

    virtual Sint32 
               remove_attribute_vector( Mesh_attribute_name name) = 0;




    virtual const Float32_3_struct& get_bbox_min() const = 0;

    virtual const Float32_3_struct& get_bbox_max() const = 0;

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




    virtual void set_maximum_displacement( Float32 displacement) = 0;

    virtual Float32 
               get_maximum_displacement() const = 0;

};

class ISurface :
    public base::Interface_declare<0x8bc55fb4,0x91cb,0x4b0c,0xa2,0x3a,0x1a,0x67,0x71,0x61,0x73,0xf0>
{
public:



    virtual Sint32 
               set_basis_type( Basis_type type) = 0;

    virtual Basis_type 
               get_basis_type() const = 0;

    virtual Sint32 
               set_degree( Parameter_space_dimension dim, Uint32 degree) = 0;

    virtual Uint32 
               get_degree( Parameter_space_dimension dim) const = 0;




    virtual Sint32 
               set_patches_size( Parameter_space_dimension dim, Uint32 count) = 0;

    virtual Uint32 
               get_patches_size( Parameter_space_dimension dim) const = 0;




    virtual Uint32 
               get_parameters_size( Parameter_space_dimension dim) const = 0;

    virtual Sint32 
               set_parameter( Parameter_space_dimension dim, Uint32 index, Float64 value) = 0;

    virtual Float64 
               get_parameter( Parameter_space_dimension dim, Uint32 index) const = 0;




    virtual Uint32 
               get_control_points_size( Parameter_space_dimension dim) const = 0;

    virtual Sint32 
               set_control_point( Uint32 index_u, Uint32 index_v, Float32_3_struct p) = 0;

    virtual Sint32 
               get_control_point(
        Uint32 index_u, Uint32 index_v, Float32_3_struct& p) const = 0;

    virtual Sint32 
               set_control_point( Uint32 index_u, Uint32 index_v, Float64_3_struct p) = 0;

    virtual Sint32 
               get_control_point(
        Uint32 index_u, Uint32 index_v, Float64_3_struct& p) const = 0;

    virtual Sint32 
               set_weight( Uint32 index_u, Uint32 index_v, Float32 weight) = 0;

    virtual Sint32 
               get_weight( Uint32 index_u, Uint32 index_v, Float32& weight) const = 0;

    virtual Sint32 
               set_weight( Uint32 index_u, Uint32 index_v, Float64 weight) = 0;

    virtual Sint32 
               get_weight( Uint32 index_u, Uint32 index_v, Float64& weight) const = 0;

    virtual void set_rational( bool rational) = 0;

    virtual bool get_rational() const = 0;




    virtual Sint32 
               set_range(
        Parameter_space_dimension dim, Float64 range_min, Float64 range_max) = 0;

    virtual Sint32 
               get_range(
        Parameter_space_dimension dim, Float64& range_min, Float64& range_max) const = 0;




    virtual Uint32 
               curves_size() const = 0;

    virtual ICurve* add_curve() = 0;

    virtual const ICurve* access_curve( Curve_handle_struct c) const = 0;

    virtual ICurve* edit_curve( Curve_handle_struct c) = 0;

    virtual Sint32 
               remove_curve( Curve_handle_struct c) = 0;




    virtual Uint32 
               texture_surfaces_size() const = 0;

    virtual ITexture_surface* add_texture_surface() = 0;

    virtual const ITexture_surface* access_texture_surface(
        Texture_surface_handle_struct t) const = 0;

    virtual ITexture_surface* edit_texture_surface( Texture_surface_handle_struct t) const = 0;

    virtual Sint32 
               remove_texture_surface( Texture_surface_handle_struct t) = 0;

};

class ICurve :
    public base::Interface_declare<0xa4e79414,0x6b74,0x422c,0x93,0x83,0x8a,0x08,0x41,0xf9,0x0a,0x27>
{
public:



    virtual Sint32 
               set_type( Curve_type curve_type) = 0;

    virtual Curve_type 
               get_type() const = 0;




    virtual Uint32 
               get_curve_segments_size() const = 0;

    virtual ICurve_segment* add_curve_segment() = 0;

    virtual const ICurve_segment* access_curve_segment( Curve_segment_handle_struct s) const = 0;

    virtual ICurve_segment* edit_curve_segment( Curve_segment_handle_struct s) = 0;

    virtual Sint32 
               remove_curve_segment( Curve_segment_handle_struct s) = 0;

};

class ICurve_segment :
    public base::Interface_declare<0x1aae0632,0xcac0,0x4cab,0xb7,0xb4,0x26,0x6c,0x8a,0xf5,0x44,0x4e>
{
public:



    virtual Sint32 
               set_basis_type( Basis_type type) = 0;

    virtual Basis_type 
               get_basis_type() const = 0;

    virtual Sint32 
               set_degree( Uint32 degree) = 0;

    virtual Uint32 
               get_degree() const = 0;




    virtual Sint32 
               set_patches_size( Uint32 count) = 0;

    virtual Uint32 
               get_patches_size() const = 0;




    virtual Uint32 
               get_parameters_size() const = 0;

    virtual Sint32 
               set_parameter( Uint32 index, Float64 value) = 0;

    virtual Float64 
               get_parameter( Uint32 index) const = 0;




    virtual Uint32 
               get_control_points_size() const = 0;

    virtual Sint32 
               set_control_point( Uint32 index, Float32_2_struct p) = 0;

    virtual Sint32 
               get_control_point( Uint32 index, Float32_2_struct& p) const = 0;

    virtual Sint32 
               set_control_point( Uint32 index, Float64_2_struct p) = 0;

    virtual Sint32 
               get_control_point( Uint32 index, Float64_2_struct& p) const = 0;

    virtual Sint32 
               set_weight( Uint32 index, Float32 weight) = 0;

    virtual Sint32 
               get_weight( Uint32 index, Float32& weight) const = 0;

    virtual Sint32 
               set_weight( Uint32 index, Float64 weight) = 0;

    virtual Sint32 
               get_weight( Uint32 index, Float64& weight) const = 0;

    virtual void set_rational( bool rational) = 0;

    virtual bool get_rational() const = 0;





    virtual Sint32 
               set_range( Float64 range_min, Float64 range_max) = 0;

    virtual void get_range( Float64& range_min, Float64& range_max) const = 0;

};

class ITexture_surface :
    public base::Interface_declare<0x5d39fdcb,0x9a3d,0x42ed,0xb3,0x90,0xc3,0x20,0x3d,0x31,0xa9,0x9d>
{
public:

    virtual Sint32 
               set_texture_coordinates_size( Parameter_space_dimension dim, Uint32 count) = 0;

    virtual Uint32 
               get_texture_coordinates_size( Parameter_space_dimension dim) const = 0;

    virtual Sint32 
               set_texture_coordinate_length( Uint32 
               length) = 0;

    virtual Uint32 
               get_texture_coordinate_length() const = 0;

    virtual Sint32 
               set_texture_coordinate(
        Uint32 index_u, Uint32 index_v, const Float32* f, Uint32 n) = 0;

    virtual Sint32 
               get_texture_coordinate(
        Uint32 index_u, Uint32 index_v, Float32* f, Uint32 n) const = 0;

    virtual Sint32 
               set_texture_coordinate(
        Uint32 index_u, Uint32 index_v, const Float64* d, Uint32 n) = 0;

    virtual Sint32 
               get_texture_coordinate(
        Uint32 index_u, Uint32 index_v, Float64* d, Uint32 n) const = 0;
};
 // end group mi_neuray_leaf_nodes

} // namespace neuraylib

#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::BASIS_BEZIER;
using neuraylib::BASIS_BSPLINE;
using neuraylib::BASIS_TYPE_FORCE_32_BIT;
using neuraylib::Basis_type;
using neuraylib::CURVE_TYPE_FORCE_32_BIT;
using neuraylib::Curve_handle_struct;
using neuraylib::Curve_segment_handle_struct;
using neuraylib::Curve_type;
using neuraylib::DIMENSION_FORCE_32_BIT;
using neuraylib::DIMENSION_U;
using neuraylib::DIMENSION_V;
using neuraylib::HOLE_CURVE;
using neuraylib::IAttribute_vector;
using neuraylib::ICurve;
using neuraylib::ICurve_segment;
using neuraylib::IFreeform_surface;
using neuraylib::IScene_element;
using neuraylib::ISurface;
using neuraylib::ITexture_surface;
using neuraylib::Mesh_attribute_name;
using neuraylib::Parameter_space_dimension;
using neuraylib::Surface_handle_struct;
using neuraylib::TRIM_CURVE;
using neuraylib::Texture_surface_handle_struct;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION

} // namespace mi

#endif // MI_NEURAYLIB_IFREEFORM_SURFACE_H

Namespaces

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

Classes

class 
A curve used by freeform surfaces. More...
class 
A curve segment used by freeform surfaces. More...
class 
Interface representing a freeform surface. More...
class 
A surface of a freeform surface. More...
class 
A texture surface associated with freeform surfaces. More...

Enumerations

enum  {BASIS_BEZIER = 0, BASIS_BSPLINE = 1, BASIS_TYPE_FORCE_32_BIT = 0xffffffffU }
Different basis types that are supported by freeform surfaces. More...
enum  {TRIM_CURVE = 0, HOLE_CURVE = 1, CURVE_TYPE_FORCE_32_BIT = 0xffffffffU }
Different curve types that are supported by freeform surfaces. More...
enum  {DIMENSION_U = 0, DIMENSION_V = 1, DIMENSION_FORCE_32_BIT = 0xffffffffU }
Distinguishes the two dimensions of the parameter space of freeform surfaces. More...