Rhino C++ API  8.7
Public Types | Public Member Functions | Protected Member Functions | List of all members
IRhRdkCurrentEnvironment Class Referenceabstract

#include <IRhRdkCurrentEnvironment.h>

Public Types

enum  Purpose : unsigned int { Purpose::Render = 0, Purpose::Simple = 1 }
enum  Usage : unsigned int { Usage::Background = 0x01, Usage::Reflection = 0x02, Usage::Skylighting = 0x04, Usage::Any = Background | Reflection | Skylighting }

Public Member Functions

virtual IRhRdkCurrentEnvironmentBeginChange (RhRdkChangeContext cc) const =0
virtual void CopyFrom (const IRhRdkCurrentEnvironment &ce)=0
virtual bool EndChange (void)=0
virtual void * EVF (const wchar_t *, void *)=0
virtual UUID Get (Usage usage, Purpose p) const =0
virtual const class CRhRdkEnvironmentGetEnv (Usage usage, Purpose p) const =0
virtual bool On (Usage usage) const =0
virtual bool Set (Usage usage, const UUID &uuidInstance)=0
virtual void SetOn (Usage usage, bool bOn)=0

Protected Member Functions

virtual ~IRhRdkCurrentEnvironment ()

Detailed Description

This is the interface to the current environments for background, skylighting and reflection / refraction.

Ideally this interface would be deprecated and replaced by ON_3dmRenderSettings but we can't do that as the latter has no current environment interface.

The Usage and Purpose enums have the same meaning as those in ON_3dmRenderSettings::EnvironmentUsage but the values are different so be careful about the possible need to convert between them.

Member Enumeration Documentation

◆ Purpose

enum IRhRdkCurrentEnvironment::Purpose : unsigned int

◆ Usage

enum IRhRdkCurrentEnvironment::Usage : unsigned int

Constructor & Destructor Documentation

◆ ~IRhRdkCurrentEnvironment()

virtual IRhRdkCurrentEnvironment::~IRhRdkCurrentEnvironment ( )

Member Function Documentation

◆ BeginChange()

virtual IRhRdkCurrentEnvironment& IRhRdkCurrentEnvironment::BeginChange ( RhRdkChangeContext  cc) const
pure virtual

Call this method to get a non-const object upon which you can call non-const methods. Calls to this method are counted; you must call EndChange() once for every call to BeginChange(). Please do not use const_cast or any other means of circumventing this requirement.

◆ CopyFrom()

virtual void IRhRdkCurrentEnvironment::CopyFrom ( const IRhRdkCurrentEnvironment ce)
pure virtual

Copy this current environment from another one.

◆ EndChange()

virtual bool IRhRdkCurrentEnvironment::EndChange ( void  )
pure virtual

◆ EVF()

virtual void* IRhRdkCurrentEnvironment::EVF ( const wchar_t *  ,
void *   
pure virtual

Emergency virtual function for future expansion.

◆ Get()

virtual UUID IRhRdkCurrentEnvironment::Get ( Usage  usage,
Purpose  p 
) const
pure virtual

Get the current environment instance id. If there is no current environment, the function returns the default environment's instance id.

◆ GetEnv()

virtual const class CRhRdkEnvironment* IRhRdkCurrentEnvironment::GetEnv ( Usage  usage,
Purpose  p 
) const
pure virtual

Get the current environment. If there is no current environment, the function returns the default environment.

◆ On()

virtual bool IRhRdkCurrentEnvironment::On ( Usage  usage) const
pure virtual

Get if the current environment is 'on' for a particular usage.

◆ Set()

virtual bool IRhRdkCurrentEnvironment::Set ( Usage  usage,
const UUID &  uuidInstance 
pure virtual

Set the current environment instance id for a specific usage. Note that passing ON_nil_uuid for a usage will remove that specialization. If a usage is ON_nil_uuid, that usage will revert to the same as the background usage.

◆ SetOn()

virtual void IRhRdkCurrentEnvironment::SetOn ( Usage  usage,
bool  bOn 
pure virtual

Set if the current environment is 'on' for a particular usage.