Rhino C++ API  8.13
Public Member Functions | List of all members
CRhRdkTexturedContentField Class Reference

#include <RhRdkContentField.h>

Inheritance diagram for CRhRdkTexturedContentField:
CRhRdkContentField

Public Member Functions

 CRhRdkTexturedContentField (const CRhRdkTexturedContentField &f)
 
 CRhRdkTexturedContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, Filter setFilter=All, Filter getFilter=All, int sectionId=0, bool bDynamic=false, const CRhRdkVariant &vTextureOn=false, const CRhRdkVariant &vTextureAmount=100, const CRhRdkVariant &vTextureAmountMin=0, const CRhRdkVariant &vTextureAmountMax=100, INT_PTR reserved=0)
 
virtual ~CRhRdkTexturedContentField ()
 
virtual void * EVF (const wchar_t *, void *) override
 
virtual CRhRdkContentFieldMakeCopy (CRhRdkContent &) const override
 
RDK_DEPRECATED void SetTextureAmount (int)
 
RDK_DEPRECATED void SetTextureAmountMax (int amountMax)
 
RDK_DEPRECATED void SetTextureAmountMin (int amountMin)
 
void SetTextureDoubleAmount (double amount)
 
void SetTextureDoubleAmountMax (double amountMax)
 
void SetTextureDoubleAmountMin (double amountMin)
 
void SetTextureOn (bool bOn)
 
void SetUseTextureAmount (bool bOn)
 
void SetUseTextureOn (bool bOn)
 
RDK_DEPRECATED int TextureAmount (void) const
 
RDK_DEPRECATED int TextureAmountMax (void) const
 
RDK_DEPRECATED int TextureAmountMin (void) const
 
double TextureDoubleAmount (void) const
 
double TextureDoubleAmountMax (void) const
 
double TextureDoubleAmountMin (void) const
 
bool TextureOn (void) const
 
bool UseTextureAmount (void) const
 
bool UseTextureAmountMax (void) const
 
bool UseTextureAmountMin (void) const
 
bool UseTextureOn (void) const
 
- Public Member Functions inherited from CRhRdkContentField
 CRhRdkContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszFriendlyName, eFilter setFilter=All, eFilter getFilter=All, INT_PTR reserved=0)
 
 CRhRdkContentField (CRhRdkContent &c, const wchar_t *wszInternalName, const wchar_t *wszLocalName, const wchar_t *wszEnglishName, Filter setFilter=All, Filter getFilter=All, int sectionId=0, bool bDynamic=false, INT_PTR reserved=0)
 
virtual ~CRhRdkContentField ()
 
const void * AsBuffer (size_t &sizeOut) const
 
void * AsPointer (void) const
 
virtual CRhRdkContentContent (void) const
 
virtual UINT Conversion (void) const
 
virtual CRhRdkVariant ConvertFromDisplay (const CRhRdkVariant &v) const
 
virtual CRhRdkVariant ConvertToDisplay (const CRhRdkVariant &v) const
 
virtual ON_wString EnglishName (void) const
 
virtual RDK_DEPRECATED ON_wString FriendlyName (void) const
 
virtual Filter GetFilter (void) const
 
virtual bool GetLimits (CRhRdkVariant &vMin, CRhRdkVariant &vMax) const
 
virtual void GetValueFromSection (const IRhRdk_XMLSection &section)
 
void Initialize (const CRhRdkVariant &v)
 
virtual ON_wString InternalName (void) const
 
bool IsDynamic (void) const
 
bool IsHiddenInAutoUI (void) const
 
virtual ON_wString LocalName (void) const
 
 operator bool (void) const
 
 operator const wchar_t * (void) const
 
 operator CRhRdkColor (void) const
 
 operator CRhRdkVariant (void) const
 
 operator double (void) const
 
 operator float (void) const
 
 operator int (void) const
 
 operator ON_2dVector (void) const
 
 operator ON_3dVector (void) const
 
 operator ON_4dPoint (void) const
 
 operator ON_Color (void) const
 
 operator ON_Xform (void) const
 
 operator time_t (void) const
 
 operator UUID (void) const
 
bool operator!= (const CRhRdkContentField &v) const
 
bool operator< (const CRhRdkContentField &v) const
 
const CRhRdkContentFieldoperator= (bool b)
 
const CRhRdkContentFieldoperator= (const char *sz)
 
const CRhRdkContentFieldoperator= (const CRhRdkContentField &f)
 
const CRhRdkContentFieldoperator= (const CRhRdkVariant &v)
 
const CRhRdkContentFieldoperator= (const ON_2dVector &v)
 
const CRhRdkContentFieldoperator= (const ON_3dVector &v)
 
const CRhRdkContentFieldoperator= (const ON_4dPoint &p)
 
const CRhRdkContentFieldoperator= (const ON_Color &c)
 
const CRhRdkContentFieldoperator= (const ON_Xform &xform)
 
const CRhRdkContentFieldoperator= (const time_t &time)
 
const CRhRdkContentFieldoperator= (const UUID &uuid)
 
const CRhRdkContentFieldoperator= (const wchar_t *wsz)
 
const CRhRdkContentFieldoperator= (double d)
 
const CRhRdkContentFieldoperator= (float f)
 
const CRhRdkContentFieldoperator= (int i)
 
const CRhRdkContentFieldoperator= (void *p)
 
bool operator== (const CRhRdkContentField &v) const
 
bool operator> (const CRhRdkContentField &v) const
 
virtual int SectionId (void) const
 
virtual void SetConversion (UINT uFlags)
 
virtual Filter SetFilter (void) const
 
void SetIsHiddenInAutoUI (bool bHidden)
 
virtual bool SetLimits (const CRhRdkVariant &vMin, const CRhRdkVariant &vMax)
 
virtual bool SetValue (const CRhRdkVariant &vNewValue)
 
virtual RDK_DEPRECATED bool SetValue (const CRhRdkVariant &vNewValue, CRhRdkContent::eChangeContext cc)
 
virtual void SetValueToSection (IRhRdk_XMLSection &section) const
 
virtual ON_wString UndoString (void) const
 
virtual const CRhRdkVariantValue (void) const
 

Additional Inherited Members

- Public Types inherited from CRhRdkContentField
enum  : unsigned int { conv_none = 0x0000, conv_percentile = 0x0001, conv_one_minus = 0x0002, conv_radians = 0x0004 }
 
typedef Filter eFilter
 
enum  Filter : unsigned int {
  None = 0x00, Serialization = 0x01, Harvesting = 0x02, Rendering = 0x04,
  All = 0xFF
}
 
- Protected Member Functions inherited from CRhRdkContentField
CImpl & Impl (void) const
 
CRhRdkContentFieldNewField (CRhRdkContent &c) const
 

Detailed Description

' functionality to a field.

This field is usually static but can be dynamic if necessary. It is useful when your content uses the Automatic UI because it enables the UI to give the field extra 'texturing' controls in the automatic UI. These controls allow assignment of a child content (usually a texture) with an on/off check box and an amount. The amount can be used when rendering to blend between the base color and the texture color at a certain point. The child's child-slot-name is derived from the field name (see CRhRdkContent::ChildSlotNameFromParamName()).

Constructor & Destructor Documentation

◆ CRhRdkTexturedContentField() [1/2]

CRhRdkTexturedContentField::CRhRdkTexturedContentField ( CRhRdkContent c,
const wchar_t *  wszInternalName,
const wchar_t *  wszLocalName,
const wchar_t *  wszEnglishName,
Filter  setFilter = All,
Filter  getFilter = All,
int  sectionId = 0,
bool  bDynamic = false,
const CRhRdkVariant vTextureOn = false,
const CRhRdkVariant vTextureAmount = 100,
const CRhRdkVariant vTextureAmountMin = 0,
const CRhRdkVariant vTextureAmountMax = 100,
INT_PTR  reserved = 0 
)

Textured fields are always constructed the same way. After construction they are null and must be initialized to a type/value before use by calling the Initialize() method.

Parameters
cis the content that the field belongs to.
wszInternalNameis the internal name of the field. Not localized.
wszLocalNameis the localized user-friendly name of the field.
wszEnglishNameis the English user-friendly name of the field.
setFilteris a filter for use during CRhRdkContentFields::SetValuesToSection(). The field is skipped if setFilter does not match at least one item in the call's filter.
getFilteris a filter for use during CRhRdkContentFields::GetValuesFromSection(). The field is skipped if getFilter does not match at least one item in the call's filter.
sectionIdis the id of an automatic section. This is optional and should be zero if not required. It allows field UI controls to automatically be distributed among automatic UI sections.
bDynamicindicates that this field is dynamic.
See also
IsDynamic()
Parameters
vTextureOnis the initial 'on' state. Use vtNull if not required.
vTextureAmountis the initial amount. Use vtNull if not required.
vTextureAmountMinis the amount lower limit. Use vtNull if not required.
vTextureAmountMaxis the amount upper limit. Use vtNull if not required.
reservedis reserved for future use. Must be zero.

◆ CRhRdkTexturedContentField() [2/2]

CRhRdkTexturedContentField::CRhRdkTexturedContentField ( const CRhRdkTexturedContentField f)

◆ ~CRhRdkTexturedContentField()

virtual CRhRdkTexturedContentField::~CRhRdkTexturedContentField ( )
virtual

Member Function Documentation

◆ EVF()

virtual void* CRhRdkTexturedContentField::EVF ( const wchar_t *  ,
void *   
)
overridevirtual

Emergency virtual function for future expansion.

Reimplemented from CRhRdkContentField.

◆ MakeCopy()

virtual CRhRdkContentField* CRhRdkTexturedContentField::MakeCopy ( CRhRdkContent ) const
overridevirtual

Return an exact copy of this field, with the same value and type.

Reimplemented from CRhRdkContentField.

◆ SetTextureAmount()

RDK_DEPRECATED void CRhRdkTexturedContentField::SetTextureAmount ( int  )

Set the texture amount. This is deprecated in favor of SetTextureDoubleAmount() which provides more accuracy.

◆ SetTextureAmountMax()

RDK_DEPRECATED void CRhRdkTexturedContentField::SetTextureAmountMax ( int  amountMax)

Set the maximum texture amount.

◆ SetTextureAmountMin()

RDK_DEPRECATED void CRhRdkTexturedContentField::SetTextureAmountMin ( int  amountMin)

Set the minimum texture amount.

◆ SetTextureDoubleAmount()

void CRhRdkTexturedContentField::SetTextureDoubleAmount ( double  amount)

Set the texture amount. The typical range is 0.0 to 100.0 but the value is allowed to have any range, positive or negative.

◆ SetTextureDoubleAmountMax()

void CRhRdkTexturedContentField::SetTextureDoubleAmountMax ( double  amountMax)

Set the maximum texture amount. The typical range is 0.0 to 100.0 but the value is allowed to ave any range, positive or negative.

◆ SetTextureDoubleAmountMin()

void CRhRdkTexturedContentField::SetTextureDoubleAmountMin ( double  amountMin)

Set the minimum texture amount. The typical range is 0.0 to 100.0 but the value is allowed to have any range, positive or negative.

◆ SetTextureOn()

void CRhRdkTexturedContentField::SetTextureOn ( bool  bOn)

Turns the texture on or off.

◆ SetUseTextureAmount()

void CRhRdkTexturedContentField::SetUseTextureAmount ( bool  bOn)

Turns 'texture amount is in use' on or off

◆ SetUseTextureOn()

void CRhRdkTexturedContentField::SetUseTextureOn ( bool  bOn)

Turns the 'texture on' is in use on or off

◆ TextureAmount()

RDK_DEPRECATED int CRhRdkTexturedContentField::TextureAmount ( void  ) const
Returns
The texture amount. The typical range is 0 to 100. This is deprecated in favor of TextureDoubleAmount() which provides more accuracy.

◆ TextureAmountMax()

RDK_DEPRECATED int CRhRdkTexturedContentField::TextureAmountMax ( void  ) const
Returns
The maximum texture amount. The default is 100.

◆ TextureAmountMin()

RDK_DEPRECATED int CRhRdkTexturedContentField::TextureAmountMin ( void  ) const
Returns
The minimum texture amount. The default is 0.

◆ TextureDoubleAmount()

double CRhRdkTexturedContentField::TextureDoubleAmount ( void  ) const
Returns
The texture amount as a double. The typical range is 0.0 to 100.0 but the value is allowed to have any range, positive or negative.

◆ TextureDoubleAmountMax()

double CRhRdkTexturedContentField::TextureDoubleAmountMax ( void  ) const
Returns
The maximum texture amount. The default is 100.

◆ TextureDoubleAmountMin()

double CRhRdkTexturedContentField::TextureDoubleAmountMin ( void  ) const
Returns
The minimum texture amount. The default is 0.

◆ TextureOn()

bool CRhRdkTexturedContentField::TextureOn ( void  ) const
Returns
true if the texture is turned on, else false.

◆ UseTextureAmount()

bool CRhRdkTexturedContentField::UseTextureAmount ( void  ) const
Returns
true if 'texture amount' is in use, else false.

◆ UseTextureAmountMax()

bool CRhRdkTexturedContentField::UseTextureAmountMax ( void  ) const
Returns
true if 'texture amount max' is in use, else false.

◆ UseTextureAmountMin()

bool CRhRdkTexturedContentField::UseTextureAmountMin ( void  ) const
Returns
true if 'texture amount min' is in use, else false.

◆ UseTextureOn()

bool CRhRdkTexturedContentField::UseTextureOn ( void  ) const
Returns
true if 'texture on' is in use, else false.