neuray API Programmer's Manual

mi::neuraylib::IProjector Class Reference

[Miscellaneous]

Description

Projectors are functions that generate texture coordinates for a particular texture space. Note that projectors are not independent scene objects like geometry objects. Projectors are always applied to other scene objects. To reflect this, projectors are not placed into the scene by adding them (or instances of them) to groups. Instead, projectors are attached to other scene nodes via the attribute projector. See mi::neuraylib::IAttribute_set for details.

Public Member Functions

virtual const char* get_projector() const =0
Returns the name of the projector, or NULL if no projector is set.
virtual Uint32 get_texture_space() const =0
Returns the index of the texture space to be used by the projector. More...
virtual Sint32 set_projector( const char* name) =0
Sets the projector. More...
virtual void set_texture_space( Uint32 index) =0
Sets the index of the texture space to be used by the projector.

Member Functions

virtual const char* mi::​neuraylib::​IProjector::get_projector() const [pure virtual]

Returns the name of the projector, or NULL if no projector is set.

virtual Uint32 mi::​neuraylib::​IProjector::get_texture_space() const [pure virtual]

Returns the index of the texture space to be used by the projector. The default index is 0.

virtual Sint32 mi::​neuraylib::​IProjector::set_projector( const char* name) [pure virtual]

Sets the projector. This is the actual projector, i.e., the MDL function call that represents the mapping.

Parameters

name
The name of the projector, or NULL to remove the current projector.

Returns

  • 0: Success.
  • -2: There is no element with that name.
  • -3: The projector can not be attached to this DB element because it is in a more private scope than the DB element.
  • -4: The projector does not have the correct type mi::neuraylib::IFunction_call.
  • -5: The projector does not have the correct return type "::base::texture_coordinate_info".

virtual void mi::​neuraylib::​IProjector::set_texture_space( Uint32 index) [pure virtual]

Sets the index of the texture space to be used by the projector.