Rhino C++ API  8.14
Public Member Functions | Public Attributes | List of all members
ON_MappingRef Class Reference

#include <opennurbs_mapchan.h>

Public Member Functions

 ON_MappingRef ()
 
bool AddMappingChannel (int mapping_channel_id, const ON_UUID &mapping_id)
 
bool ChangeMappingChannel (int old_mapping_channel_id, int new_mapping_channel_id)
 
int Compare (const ON_MappingRef &other) const
 
void Default ()
 
bool DeleteMappingChannel (const ON_UUID &mapping_id)
 
bool DeleteMappingChannel (int mapping_channel_id)
 
bool IsValid (ON_TextLog *text_log) const
 
const ON_MappingChannelMappingChannel (const ON_UUID &mapping_id) const
 
const ON_MappingChannelMappingChannel (int mapping_channel_id) const
 
bool Read (ON_BinaryArchive &archive)
 
bool Transform (const ON_Xform &xform)
 
bool Write (ON_BinaryArchive &archive) const
 

Public Attributes

ON_SimpleArray< ON_MappingChannelm_mapping_channels
 
ON_UUID m_plugin_id
 Identifies a rendering plugin. More...
 

Detailed Description

Class ON_MaterialRef

Description: ON_3dmObjectAttributes uses ON_MaterialRef to record which rendering material and mappings a rendering plug-in wants to use. This allows different rendering plug-ins to have different materials on the same object. The values of ON_3dmObjectAttributes.m_material_index and ON_3dmObjectAttributes.m_material_source reflect the settings of the renderer that is currently active.

Constructor & Destructor Documentation

◆ ON_MappingRef()

ON_MappingRef::ON_MappingRef ( )

Member Function Documentation

◆ AddMappingChannel()

bool ON_MappingRef::AddMappingChannel ( int  mapping_channel_id,
const ON_UUID mapping_id 
)

Parameters: mapping_channel_id - [in] mapping_id - [in] ON_TextureMapping id Returns: True if the mapping channel was added or a perfect match already existed. False if a mapping channel with a different mapping_id already exists for this plug-in and channel.

◆ ChangeMappingChannel()

bool ON_MappingRef::ChangeMappingChannel ( int  old_mapping_channel_id,
int  new_mapping_channel_id 
)

Parameters: old_mapping_channel_id - [in] new_mapping_channel_id - [in] Returns: True if a matching mapping channel was found and changed.

◆ Compare()

int ON_MappingRef::Compare ( const ON_MappingRef other) const

◆ Default()

void ON_MappingRef::Default ( )

◆ DeleteMappingChannel() [1/2]

bool ON_MappingRef::DeleteMappingChannel ( const ON_UUID mapping_id)

◆ DeleteMappingChannel() [2/2]

bool ON_MappingRef::DeleteMappingChannel ( int  mapping_channel_id)

Parameters: mapping_channel_id - [in] mapping_id - [in] ON_TextureMapping id Returns: True if a matching mapping channel was deleted.

◆ IsValid()

bool ON_MappingRef::IsValid ( ON_TextLog text_log) const

◆ MappingChannel() [1/2]

const ON_MappingChannel* ON_MappingRef::MappingChannel ( const ON_UUID mapping_id) const

◆ MappingChannel() [2/2]

const ON_MappingChannel* ON_MappingRef::MappingChannel ( int  mapping_channel_id) const

Parameters: mapping_channel_id - [in] mapping_id - [in] ON_TextureMapping id Returns: A pointer to the plug-in's mapping channel, if there is one. Otherwise nullptr is returned.

◆ Read()

bool ON_MappingRef::Read ( ON_BinaryArchive archive)

◆ Transform()

bool ON_MappingRef::Transform ( const ON_Xform xform)

◆ Write()

bool ON_MappingRef::Write ( ON_BinaryArchive archive) const

Member Data Documentation

◆ m_mapping_channels

ON_SimpleArray<ON_MappingChannel> ON_MappingRef::m_mapping_channels

Use AddMappingChannel() if you want to add an element to this array.

Every mapping channel in this array must have a distinct value of ON_MappingChannel.m_mapping_channel_id

◆ m_plugin_id

ON_UUID ON_MappingRef::m_plugin_id

Identifies a rendering plugin.