Rhino C++ API  8.9
Public Member Functions | Static Public Member Functions | List of all members
RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel Class Referenceabstract

Replacement for ON_MappingChannel that actually carries the ON_TextureMapping around with it instead of storing it in a document table - meaning that it can be passed off to non-document threads and still access the data correctly. More...

#include <IRhRdkCustomRenderMeshes.h>

Public Member Functions

virtual ~IMappingChannel ()
 
virtual int Id (void) const =0
 Corresponds to ON_MappingChannel::m_mapping_channel_id More...
 
virtual const ON_XformLocalXform (void) const =0
 The local mapping transform for this particular object - corresponds to ON_MappingChannel::m_object_xform The default value of m_object_xform is the identity. When an object that uses this mapping is transformed by "T", m_object_xform is updated using the formula m_object_xform = T*m_object_xform. If texture coordinates are lost and need to be recalculated and m_object_xform is not the identity, then m_object_xform should be passed to ON_TextureMapping::Evaluate() as the mesh_xform parameter. When validating mapping coordinates, m_object_xform itself be passed to HasMatchingTextureCoordinates() as the object_transform parameter. More...
 
virtual std::shared_ptr< IMappingChannelMakeCopy (void) const =0
 Deep copy More...
 
virtual const ON_TextureMappingMapping (void) const =0
 The full mapping object that would usually be stored in the document mapping table. See ON_TextureMapping More...
 
virtual void Transform (const ON_Xform &xform)=0
 Transforms the mapping channel More...
 

Static Public Member Functions

static std::shared_ptr< IMappingChannelNew (int channel, const ON_TextureMapping &mapping, const ON_Xform &localXform)
 Create a new mapping channel More...
 

Detailed Description

Replacement for ON_MappingChannel that actually carries the ON_TextureMapping around with it instead of storing it in a document table - meaning that it can be passed off to non-document threads and still access the data correctly.

Constructor & Destructor Documentation

◆ ~IMappingChannel()

virtual RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::~IMappingChannel ( )
inlinevirtual

Member Function Documentation

◆ Id()

virtual int RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::Id ( void  ) const
pure virtual

Corresponds to ON_MappingChannel::m_mapping_channel_id

Returns
Channel number > 0 and <= 2147483647 (0x7FFFFFFF)

◆ LocalXform()

virtual const ON_Xform& RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::LocalXform ( void  ) const
pure virtual

The local mapping transform for this particular object - corresponds to ON_MappingChannel::m_object_xform The default value of m_object_xform is the identity. When an object that uses this mapping is transformed by "T", m_object_xform is updated using the formula m_object_xform = T*m_object_xform. If texture coordinates are lost and need to be recalculated and m_object_xform is not the identity, then m_object_xform should be passed to ON_TextureMapping::Evaluate() as the mesh_xform parameter. When validating mapping coordinates, m_object_xform itself be passed to HasMatchingTextureCoordinates() as the object_transform parameter.

Returns
A transform

◆ MakeCopy()

virtual std::shared_ptr<IMappingChannel> RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::MakeCopy ( void  ) const
pure virtual

Deep copy

Returns
A copy of the channel

◆ Mapping()

virtual const ON_TextureMapping& RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::Mapping ( void  ) const
pure virtual

The full mapping object that would usually be stored in the document mapping table. See ON_TextureMapping

Returns
The texture mapping

◆ New()

static std::shared_ptr<IMappingChannel> RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::New ( int  channel,
const ON_TextureMapping mapping,
const ON_Xform localXform 
)
static

Create a new mapping channel

Parameters
channelSee IMappingChannel::
mappingSee IMappingChannel::Mapping
localXformSee IMappingChannel::LocalXform
Returns

◆ Transform()

virtual void RhRdk::CustomRenderMeshes::IRenderMeshes::IMappingChannel::Transform ( const ON_Xform xform)
pure virtual

Transforms the mapping channel

Parameters
xform