TK_Color
-
class
TK_Color Handles the TKE_Color opcode.
TK_Colorprovides support for writing/reading the TKE_Color opcode object to/from an HSF file.The HOOPS/3dGS scene-graph segments can have a ‘named’ color (i.e. “faces = red, lines = blue”)
Inherits from:
BBaseOpcodeHandlerIndex
Methods
Clone()GetBumpName()GetBumpName()GetChannels()GetDiffuse()GetDiffuseName()GetDiffuseName()GetEmission()GetEmissionName()GetEmissionName()GetEnvironmentName()GetEnvironmentName()GetGeometry()GetGloss()GetIndex()GetMirror()GetMirrorName()GetMirrorName()GetSpecular()GetSpecularName()GetSpecularName()GetTransmission()GetTransmissionName()GetTransmissionName()Read()ReadAscii()Reset()set_channel_name()set_channel_name()set_channel_rgb()SetBumpName()SetBumpName()SetChannels()SetDiffuse()SetDiffuse()SetDiffuseName()SetDiffuseName()SetEmission()SetEmission()SetEmissionName()SetEmissionName()SetEnvironmentName()SetEnvironmentName()SetGeometry()SetGloss()SetIndex()SetMirror()SetMirror()SetMirrorName()SetMirrorName()SetSpecular()SetSpecular()SetSpecularName()SetSpecularName()SetTransmission()SetTransmission()SetTransmissionName()SetTransmissionName()TK_Color()Write()WriteAscii()~TK_Color()
Variables
Classes
Methods
-
void
TK_Color::set_channel_rgb(channel &c, float r, float g, float b, int which_channel = -1) protected
internal use
-
void
TK_Color::set_channel_name(channel &c, char const *name, int which_channel = -1) protected
internal use
-
void
TK_Color::set_channel_name(channel &c, int length, int which_channel = -1) protected
internal use
-
TK_Status
TK_Color::Read(BStreamFileToolkit &tk) virtual
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Color::Write(BStreamFileToolkit &tk) virtual
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 theBStreamFileToolkitobject.Returns
The result of the function call.
-
TK_Status
TK_Color::Clone(BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const const virtual
Copies the opcode handler
Parameters
tk: A reference to the
BStreamFileToolkitobject.handler: A pointer to the opcode handler object. Passed by reference.
Returns
The result of the function call.
-
TK_Status
TK_Color::ReadAscii(BStreamFileToolkit &tk) Deprecated.
-
TK_Status
TK_Color::WriteAscii(BStreamFileToolkit &tk) Deprecated.
-
void
TK_Color::Reset() virtual
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.
-
void
TK_Color::SetGeometry(int m) Sets the mask value which indicates which types of geometry are affected by this color setting. Geometry types are specified by
TKO_Geometry_Bits.
-
int
TK_Color::GetGeometry() const const
Returns the mask value which indicates which types of geometry are affected by this color setting. Geometry types are specified by
TKO_Geometry_Bits.
-
void
TK_Color::SetChannels(int c) Sets the mask indicating which color/material components are valid. Color channels are specified by
TKO_Color_Channels. Note thatTKO_Color_Channelsare NOT bit masks, but rather indices, so you should pass (1<<TKO_Channel_Diffuse) here, for example.
-
int
TK_Color::GetChannels() const const
Returns the mask indicating which color/material components are valid. Color channels are specified by
TKO_Color_Channels.
-
void
TK_Color::SetDiffuse(float r, float g, float b) Sets the diffuse color using discrete rgb values
-
void
TK_Color::SetDiffuseName(char const *name) Sets the diffuse color as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetDiffuseName(int length) Sets the diffuse color string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
float const *
TK_Color::GetDiffuse() const const
Returns the diffuse color as the address of a float triplet
-
char const *
TK_Color::GetDiffuseName() const const
Returns the address of the diffuse color name string.
-
char *
TK_Color::GetDiffuseName() Returns the address of the diffuse color name buffer, which may be modified directly.
-
void
TK_Color::SetSpecular(float r, float g, float b) Sets the specular color using discrete rgb values
-
void
TK_Color::SetSpecularName(char const *name) Sets the specular color as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetSpecularName(int length) Sets the specular color string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
float const *
TK_Color::GetSpecular() const const
Returns the specular color as the address of a float triplet
-
char const *
TK_Color::GetSpecularName() const const
Returns the address of the specular color name string.
-
char *
TK_Color::GetSpecularName() Returns the address of the specular color name buffer, which may be modified directly.
-
void
TK_Color::SetMirror(float r, float g, float b) Sets the mirror color using discrete rgb values
-
void
TK_Color::SetMirrorName(char const *name) Sets the mirror color as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetMirrorName(int length) Sets the mirror color string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
float const *
TK_Color::GetMirror() const const
Returns the mirror color as the address of a float triplet
-
char const *
TK_Color::GetMirrorName() const const
Returns the address of the mirror color name string.
-
char *
TK_Color::GetMirrorName() Returns the address of the mirror color name buffer, which may be modified directly.
-
void
TK_Color::SetTransmission(float r, float g, float b) Sets the transmission color using discrete rgb values
-
void
TK_Color::SetTransmission(float const rgb[]) Sets the transmission color using a float triplet
-
void
TK_Color::SetTransmissionName(char const *name) Sets the transmission color as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetTransmissionName(int length) Sets the transmission color string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
float const *
TK_Color::GetTransmission() const const
Returns the transmission color as the address of a float triplet
-
char const *
TK_Color::GetTransmissionName() const const
Returns the address of the transmission color name string.
-
char *
TK_Color::GetTransmissionName() Returns the address of the transmission color name buffer, which may be modified directly.
-
void
TK_Color::SetEmission(float r, float g, float b) Sets the emission color using discrete rgb values
-
void
TK_Color::SetEmissionName(char const *name) Sets the emission color as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetEmissionName(int length) Sets the emission color string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
float const *
TK_Color::GetEmission() const const
Returns the emission color as the address of a float triplet
-
char const *
TK_Color::GetEmissionName() const const
Returns the address of the emission color name string.
-
char *
TK_Color::GetEmissionName() Returns the address of the emission color name buffer, which may be modified directly.
-
void
TK_Color::SetEnvironmentName(char const *name) Sets the environment texture as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetEnvironmentName(int length) Sets the environment texture string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
char const *
TK_Color::GetEnvironmentName() const const
Returns the address of the environment texture name string.
-
char *
TK_Color::GetEnvironmentName() Returns the address of the environment texture name buffer, which may be modified directly.
-
void
TK_Color::SetBumpName(char const *name) Sets the bump texture as a string value. Allocates the buffer and copies the string
-
void
TK_Color::SetBumpName(int length) Sets the bump texture string buffer. Allocates a buffer to hold a string of ‘length’ characters
-
char const *
TK_Color::GetBumpName() const const
Returns the address of the bump texture name string.
-
char *
TK_Color::GetBumpName() Returns the address of the bump texture name buffer, which may be modified directly.
Variables
-
channel
TK_Color::m_environment protected
internal use; note: environment & bump are never a simple RGB type color