#include <BOpcodeHandler.h>
Public Member Functions | |
TK_Status | Clone (BStreamFileToolkit &tk, BBaseOpcodeHandler **handler) const |
int | GetAlphaMapping () const |
int | GetApplicationMode () const |
int | GetBlueMapping () const |
char alter * | GetCamera () alter |
char const * | GetCamera () const |
int | GetDecimation () const |
int | GetFlags () const |
int | GetGreenMapping () const |
char alter * | GetImage () alter |
char const * | GetImage () const |
int | GetInterpolation () const |
int | GetLayout () const |
char alter * | GetName () alter |
char const * | GetName () const |
int | GetParameterFunction () const |
int | GetParameterOffset () const |
int | GetParameterSource () const |
int | GetRedMapping () const |
char alter * | GetShaderSource () alter |
char const * | GetShaderSource () const |
int | GetTiling () const |
char alter * | GetTransform () alter |
char const * | GetTransform () const |
float const * | GetValueScale () const |
TK_Status | Read (BStreamFileToolkit &tk) alter |
TK_Status | ReadAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
void | Reset () alter |
void | SetAlphaMapping (int p) alter |
void | SetApplicationMode (int p) alter |
void | SetBlueMapping (int p) alter |
void | SetCamera (int length) alter |
void | SetCamera (char const *camera) alter |
void | SetDecimation (int p) alter |
void | SetFlags (int f) alter |
void | SetGreenMapping (int p) alter |
void | SetImage (int length) alter |
void | SetImage (char const *image) alter |
void | SetInterpolation (int p) alter |
void | SetLayout (int p) alter |
void | SetName (int length) alter |
void | SetName (char const *name) alter |
void | SetParameterFunction (int p) alter |
void | SetParameterOffset (int p) alter |
void | SetParameterSource (int p) alter |
void | SetRedMapping (int p) alter |
void | SetShaderSource (int length) alter |
void | SetShaderSource (char const *shader_source) alter |
void | SetTiling (int p) alter |
void | SetTransform (int length) alter |
void | SetTransform (char const *transform) alter |
void | SetValueScale (float v1, float v2) alter |
TK_Texture () | |
TK_Status | Write (BStreamFileToolkit &tk) alter |
TK_Status | WriteAscii (BStreamFileToolkit &tk) alter |
Deprecated. | |
Protected Member Functions | |
void | set_image (char const *image) alter |
for internal use only | |
void | set_image (int length) alter |
for internal use only | |
void | set_name (char const *name) alter |
for internal use only | |
void | set_name (int length) alter |
for internal use only | |
void | set_transform (char const *transform) alter |
for internal use only | |
void | set_transform (int length) alter |
for internal use only | |
Protected Attributes | |
char | m_alpha_mapping |
char | m_apply_mode |
char | m_blue_mapping |
char * | m_camera |
int | m_camera_length |
char | m_decimation |
int | m_flags |
char | m_green_mapping |
char * | m_image |
int | m_image_length |
char | m_interpolation |
char | m_layout |
char * | m_name |
int | m_name_length |
char | m_param_function |
char | m_param_offset |
char | m_param_source |
char | m_red_mapping |
char * | m_shader_source |
int | m_shader_source_length |
int | m_source_dimensions [3] |
int | m_substage |
char | m_tiling |
char * | m_transform |
float | m_value_scale [2] |
TK_Texture provides support for writing/reading the TKE_Texture opcode object to/from an HSF file.
The HOOPS/3dGS scene-graph supports 'textures', which define an image that can be applied to a HOOPS/3dGS shell or mesh primitive.
TK_Texture::TK_Texture | ( | ) | [inline] |
constructor
TK_Status TK_Texture::Clone | ( | BStreamFileToolkit & | tk, | |
BBaseOpcodeHandler ** | handler | |||
) | const [virtual] |
Copies the opcode handler
tk | A reference to the BStreamFileToolkit object. | |
handler | A pointer to the opcode handler object. Passed by reference. |
Reimplemented from BBaseOpcodeHandler.
Reimplemented in HTK_Texture.
int TK_Texture::GetAlphaMapping | ( | ) | const [inline] |
Returns the alpha channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
int TK_Texture::GetApplicationMode | ( | ) | const [inline] |
Returns the decal & modulate mode. Tiling modes are specified in TKO_Texture_Application_Modes.
int TK_Texture::GetBlueMapping | ( | ) | const [inline] |
Returns the blue channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
char alter* TK_Texture::GetCamera | ( | ) | [inline] |
Returns the camera segment name buffer, which can be modified directly
char const* TK_Texture::GetCamera | ( | ) | const [inline] |
Returns the camera segment name
int TK_Texture::GetDecimation | ( | ) | const [inline] |
Returns the decimation filter. Filter types are defined in TKO_Texture_Filters.
int TK_Texture::GetFlags | ( | void | ) | const [inline] |
Returns the mask indicating which texture options are specified. Options are defined in TKO_Texture_Option_Bits.
int TK_Texture::GetGreenMapping | ( | ) | const [inline] |
Returns the green channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
char alter* TK_Texture::GetImage | ( | ) | [inline] |
Returns the image name buffer, which can be modified directly
char const* TK_Texture::GetImage | ( | ) | const [inline] |
Returns the image name
int TK_Texture::GetInterpolation | ( | ) | const [inline] |
Returns the interpolation filter. Filter types are defined in TKO_Texture_Filters.
int TK_Texture::GetLayout | ( | ) | const [inline] |
Returns the layout of the data in the image. Layouts are specified in TKO_Texture_Layouts.
char alter* TK_Texture::GetName | ( | ) | [inline] |
Returns the texture name buffer, which can be modified directly
char const* TK_Texture::GetName | ( | ) | const [inline] |
Returns the texture name
int TK_Texture::GetParameterFunction | ( | ) | const [inline] |
Returns the parameterization function. Functions are defined in TKO_Texture_Param_Functions.
int TK_Texture::GetParameterOffset | ( | ) | const [inline] |
Returns the parameter offset.
int TK_Texture::GetParameterSource | ( | ) | const [inline] |
Returns the parameterization source. Options are defined in TKO_Texture_Param_Sources
int TK_Texture::GetRedMapping | ( | ) | const [inline] |
Returns the red channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
char alter* TK_Texture::GetShaderSource | ( | ) | [inline] |
Returns the texture shader source buffer, which can be modified directly
char const* TK_Texture::GetShaderSource | ( | ) | const [inline] |
Returns the texture shader source
int TK_Texture::GetTiling | ( | ) | const [inline] |
Returns the texture tiling mode. Tiling modes are specified in TKO_Texture_Tilings.
char alter* TK_Texture::GetTransform | ( | ) | [inline] |
Returns the transform segment name buffer, which may be modified directly
char const* TK_Texture::GetTransform | ( | ) | const [inline] |
Returns the transform segment name
float const* TK_Texture::GetValueScale | ( | ) | const [inline] |
Returns the value scale & offset factors
TK_Status TK_Texture::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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
void TK_Texture::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.
Reimplemented from BBaseOpcodeHandler.
Reimplemented in HTK_Texture.
void TK_Texture::SetAlphaMapping | ( | int | p | ) | [inline] |
Sets the alpha channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
void TK_Texture::SetApplicationMode | ( | int | p | ) | [inline] |
Sets the decal & modulate modes. Modes are specified in TKO_Texture_Application_Modes.
void TK_Texture::SetBlueMapping | ( | int | p | ) | [inline] |
Sets the blue channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
void TK_Texture::SetCamera | ( | int | length | ) |
Sets the camera segment name buffer. Allocates a buffer large enough to hold a string of 'length' characters
void TK_Texture::SetCamera | ( | char const * | camera | ) |
Sets the camera segment name. Allocates the buffer and copies the name string
void TK_Texture::SetDecimation | ( | int | p | ) | [inline] |
Sets the decimation filter. Filter types are defined in TKO_Texture_Filters.
void TK_Texture::SetFlags | ( | int | f | ) | [inline] |
Sets the mask indicating which texture options are specified. Options are defined in TKO_Texture_Option_Bits.
References TKO_Texture_Extended.
void TK_Texture::SetGreenMapping | ( | int | p | ) | [inline] |
Sets the green channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
void TK_Texture::SetImage | ( | int | length | ) | [inline] |
Sets the image name buffer. Allocates a buffer large enough to hold a string of 'length' characters
void TK_Texture::SetImage | ( | char const * | image | ) | [inline] |
Sets the image name. Allocates the buffer and copies the name string
void TK_Texture::SetInterpolation | ( | int | p | ) | [inline] |
Sets the interpolation filter. Filter types are defined in TKO_Texture_Filters.
void TK_Texture::SetLayout | ( | int | p | ) | [inline] |
Sets the layout of the data in the image. Layouts are specified in TKO_Texture_Layouts.
void TK_Texture::SetName | ( | int | length | ) | [inline] |
Sets the texture name buffer. Allocates a buffer large enough to hold a string of 'length' characters
void TK_Texture::SetName | ( | char const * | name | ) | [inline] |
Sets the texture name. Allocates the buffer and copies the name string
void TK_Texture::SetParameterFunction | ( | int | p | ) | [inline] |
Sets the parameterization function. Functions are defined in TKO_Texture_Param_Functions.
void TK_Texture::SetParameterOffset | ( | int | p | ) | [inline] |
Sets the parameter offset.
void TK_Texture::SetParameterSource | ( | int | p | ) | [inline] |
Sets the parameterization source. Options are defined in TKO_Texture_Param_Sources
void TK_Texture::SetRedMapping | ( | int | p | ) | [inline] |
Sets the red channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.
void TK_Texture::SetShaderSource | ( | int | length | ) |
Sets the texture shader source buffer. Allocates a buffer large enough to hold a string of 'length' characters
void TK_Texture::SetShaderSource | ( | char const * | shader_source | ) |
Sets the texture shader source. Allocates the buffer and copies the shader source string
void TK_Texture::SetTiling | ( | int | p | ) | [inline] |
Sets the texture tiling mode. Tiling modes are specified in TKO_Texture_Tilings.
void TK_Texture::SetTransform | ( | int | length | ) | [inline] |
Sets the buffer to contain the name of a transform segment. Allocates a buffer large enough to hold 'length' characters
void TK_Texture::SetTransform | ( | char const * | transform | ) | [inline] |
Sets the name of the segment containing a texture transform matrix. Allocates the buffer and copies the string
void TK_Texture::SetValueScale | ( | float | v1, | |
float | v2 | |||
) | [inline] |
Sets the value scale & offset factors
TK_Status TK_Texture::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.
tk | A reference to the BStreamFileToolkit object. |
Implements BBaseOpcodeHandler.
Reimplemented in HTK_Texture.
char TK_Texture::m_alpha_mapping [protected] |
internal use; Method for remapping alpha channel value
char TK_Texture::m_apply_mode [protected] |
internal use; bits showing setting of decal and/or modulate
char TK_Texture::m_blue_mapping [protected] |
internal use; Method for remapping blue channel value
char* TK_Texture::m_camera [protected] |
internal use; Camera segment name
int TK_Texture::m_camera_length [protected] |
internal use; camera name length
char TK_Texture::m_decimation [protected] |
internal use; Method of pixel decimation (pixel covers large portion of texture)
int TK_Texture::m_flags [protected] |
internal use; Flags indicating presence of optional values
char TK_Texture::m_green_mapping [protected] |
internal use; Method for remapping green channel value
char* TK_Texture::m_image [protected] |
internal use; Source image name
int TK_Texture::m_image_length [protected] |
internal use; Current image name length
char TK_Texture::m_interpolation [protected] |
internal use; Method of pixel interpolation (pixel falls between texture samples)
char TK_Texture::m_layout [protected] |
internal use; Format of "picture" within source image
char* TK_Texture::m_name [protected] |
internal use; Texture name
int TK_Texture::m_name_length [protected] |
internal use; current name length
char TK_Texture::m_param_function [protected] |
internal use; Basic parameter remapping methods
char TK_Texture::m_param_offset [protected] |
internal use; offset into parameter value array
char TK_Texture::m_param_source [protected] |
internal use; Source of parameters used for texture lookup
char TK_Texture::m_red_mapping [protected] |
internal use; Method for remapping red channel value
char* TK_Texture::m_shader_source [protected] |
internal use; Shader source code (null if not a shader)
int TK_Texture::m_shader_source_length [protected] |
internal use; Shader source code length
int TK_Texture::m_source_dimensions[3] [protected] |
internal use; The number of images in each direction (e.g. for 3d textures)
int TK_Texture::m_substage [protected] |
internal use: write/read progress
char TK_Texture::m_tiling [protected] |
internal use; Handling of parametric values outside 0 to 1 range
char* TK_Texture::m_transform [protected] |
internal use; Segment containing transform matrix
float TK_Texture::m_value_scale[2] [protected] |
internal use; "Brightness & Contrast" scaling of texture values