TK_PBR

Functions

TK_PBR

~TK_PBR

TK_Status

Read

TK_Status

Write

TK_Status

Clone

TK_Status

ReadAscii

TK_Status

WriteAscii

void

Reset

void

SetOptions

int

GetOptions

void

SetBaseColorMap

void

SetBaseColorMap

char const *

GetBaseColorMap

char *

GetBaseColorMap

void

SetNormalMap

void

SetNormalMap

char const *

GetNormalMap

char *

GetNormalMap

void

SetEmissiveMap

void

SetEmissiveMap

char const *

GetEmissiveMap

char *

GetEmissiveMap

void

SetMetalnessMap

void

SetMetalnessMap

char const *

GetMetalnessMap

char *

GetMetalnessMap

void

SetRoughnessMap

void

SetRoughnessMap

char const *

GetRoughnessMap

char *

GetRoughnessMap

void

SetOcclusionMap

void

SetOcclusionMap

char const *

GetOcclusionMap

char *

GetOcclusionMap

void

SetBaseColorFactor

void

SetBaseColorFactor

float const *

GetBaseColorFactor

void

SetNormalFactor

float

GetNormalFactor

void

SetMetalnessFactor

float

GetMetalnessFactor

void

SetRoughnessFactor

float

GetRoughnessFactor

void

SetOcclusionFactor

float

GetOcclusionFactor

void

SetAlphaFactor

float

GetAlphaFactor

void

SetMetalnessMapChannel

int

GetMetalnessMapChannel

void

SetRoughnessMapChannel

int

GetRoughnessMapChannel

void

SetOcclusionMapChannel

int

GetOcclusionMapChannel

Detailed Description

class TK_PBR : public BBaseOpcodeHandler

Handles the TKE_PBR opcode.

TK_Color provides support for writing/reading the TKE_PBR opcode object to/from an HSF file.

The HOOPS/3dGS scene-graph segments can have a Physically Based Rendering material definition

Public Functions

TK_PBR()
~TK_PBR()
virtual TK_Status Read(BStreamFileToolkit &tk)

Reads data from the toolkit buffer, decodes/decompresses it, and maps it to the opcode handlers data members. User-defined classes which need to write out custom data should utilize one of the available GetData() methods.

Parameters

tk – A reference to the BStreamFileToolkit object.

Returns

The result of the function call.

virtual TK_Status Write(BStreamFileToolkit &tk)

Encodes/compresses data and writes data to the toolkit buffer. User-defined classes which need to write out custom data should utilize one of the available PutData() methods, and first write out the opcode associated with the group of binary data followed by the data itself.

Parameters

tk – A reference to the BStreamFileToolkit object.

Returns

The result of the function call.

virtual TK_Status Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const

Copies the opcode handler

Parameters
  • tk – A reference to the BStreamFileToolkit object.

  • handler – A pointer to the opcode handler object. Passed by reference.

Returns

The result of the function call.

TK_Status ReadAscii(BStreamFileToolkit &tk)

Deprecated.

TK_Status WriteAscii(BStreamFileToolkit &tk)

Deprecated.

virtual void Reset()

Resets the current opcode handler. This is called by the toolkit when it is done processing an opcode. This method reinitializes any opcode handler variables and frees up temporary data.

inline void SetOptions(int m)

Sets the options flags. Option types are specified by TKO_PBR_Options.

inline int GetOptions() const

Returns the options flags. Option types are specified by TKO_PBR_Options.

inline void SetBaseColorMap(char const *name)

Sets the base color map as a string value. Allocates the buffer and copies the string

inline void SetBaseColorMap(int length)

Sets the base color map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetBaseColorMap() const

Returns the address of the base color map string.

inline char *GetBaseColorMap()

Returns the address of the base color map buffer, which may be modified directly.

inline void SetNormalMap(char const *name)

Sets the normal map as a string value. Allocates the buffer and copies the string

inline void SetNormalMap(int length)

Sets the normal map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetNormalMap() const

Returns the address of the normal map string.

inline char *GetNormalMap()

Returns the address of the normal map buffer, which may be modified directly.

inline void SetEmissiveMap(char const *name)

Sets the emissive map as a string value. Allocates the buffer and copies the string

inline void SetEmissiveMap(int length)

Sets the emissive map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetEmissiveMap() const

Returns the address of the emissive map string.

inline char *GetEmissiveMap()

Returns the address of the emissive map buffer, which may be modified directly.

inline void SetMetalnessMap(char const *name)

Sets the metalness map as a string value. Allocates the buffer and copies the string

inline void SetMetalnessMap(int length)

Sets the metalness map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetMetalnessMap() const

Returns the address of the metalness map string.

inline char *GetMetalnessMap()

Returns the address of the metalness map buffer, which may be modified directly.

inline void SetRoughnessMap(char const *name)

Sets the roughness map as a string value. Allocates the buffer and copies the string

inline void SetRoughnessMap(int length)

Sets the roughness map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetRoughnessMap() const

Returns the address of the roughness map string.

inline char *GetRoughnessMap()

Returns the address of the roughness map buffer, which may be modified directly.

inline void SetOcclusionMap(char const *name)

Sets the occlusion map as a string value. Allocates the buffer and copies the string

inline void SetOcclusionMap(int length)

Sets the occlusion map string buffer. Allocates a buffer to hold a string of ‘length’ characters

inline char const *GetOcclusionMap() const

Returns the address of the occlusion map string.

inline char *GetOcclusionMap()

Returns the address of the occlusion map buffer, which may be modified directly.

inline void SetBaseColorFactor(float r, float g, float b, float a)

Sets the base color factor using discrete rgba values

inline void SetBaseColorFactor(float const rgba[])

Sets the base color factor using a float quad

inline float const *GetBaseColorFactor() const

Returns the base color factor as the address of a float quad

inline void SetNormalFactor(float f)

Sets the normal factor

inline float GetNormalFactor() const

Returns the normal factor

inline void SetMetalnessFactor(float f)

Sets the metalness factor

inline float GetMetalnessFactor() const

Returns the metalness factor

inline void SetRoughnessFactor(float f)

Sets the roughness factor

inline float GetRoughnessFactor() const

Returns the roughness factor

inline void SetOcclusionFactor(float f)

Sets the occlusion factor

inline float GetOcclusionFactor() const

Returns the occlusion factor

inline void SetAlphaFactor(float f)

Sets the alpha factor

inline float GetAlphaFactor() const

Returns the alpha factor

inline void SetMetalnessMapChannel(int c)

Sets the metalness map channel

inline int GetMetalnessMapChannel() const

Returns the metalness map channel

inline void SetRoughnessMapChannel(int c)

Sets the roughness map channel

inline int GetRoughnessMapChannel() const

Returns the roughness map channel

inline void SetOcclusionMapChannel(int c)

Sets the occlusion map channel

inline int GetOcclusionMapChannel() const

Returns the occlusion map channel