Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

TK_Texture Class Reference

#include <BOpcodeHandler.h>

Inheritance diagram for TK_Texture:

Inheritance graph
[legend]
Collaboration diagram for TK_Texture:

Collaboration graph
[legend]
List of all members.

Detailed Description

Handles the TKE_Texture opcode.

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.

Definition at line 4786 of file BOpcodeHandler.h.

Public Member Functions

 TK_Texture ()
TK_Status Read (BStreamFileToolkit &tk) alter
TK_Status Write (BStreamFileToolkit &tk) alter
void Reset (void) alter
void SetName (char const *name) alter
void SetName (int length) alter
char const * GetName (void) const
char alter * GetName (void) alter
void SetImage (char const *image) alter
void SetImage (int length) alter
char const * GetImage (void) const
char alter * GetImage (void) alter
void SetFlags (int f) alter
int GetFlags (void) const
void SetParameterSource (int p) alter
int GetParameterSource (void) const
void SetInterpolation (int p) alter
int GetInterpolation (void) const
void SetDecimation (int p) alter
int GetDecimation (void) const
void SetRedMapping (int p) alter
int GetRedMapping (void) const
void SetGreenMapping (int p) alter
int GetGreenMapping (void) const
void SetBlueMapping (int p) alter
int GetBlueMapping (void) const
void SetAlphaMapping (int p) alter
int GetAlphaMapping (void) const
void SetParameterFunction (int p) alter
int GetParameterFunction (void) const
void SetLayout (int p) alter
int GetLayout (void) const
void SetTiling (int p) alter
int GetTiling (void) const
void SetValueScale (float v1, float v2) alter
float const * GetValueScale (void) const
void SetTransform (char const *transform) alter
void SetTransform (int length) alter
char const * GetTransform (void) const
char alter * GetTransform (void) alter

Protected Member Functions

void set_name (int length) alter
 for internal use only
void set_name (char const *name) alter
 for internal use only
void set_image (int length) alter
 for internal use only
void set_image (char const *image) alter
 for internal use only
void set_transform (int length) alter
 for internal use only
void set_transform (char const *transform) alter
 for internal use only

Protected Attributes

int m_name_length
int m_image_length
char * m_name
char * m_image
short m_flags
char m_param_source
char m_interpolation
char m_decimation
char m_red_mapping
char m_green_mapping
char m_blue_mapping
char m_alpha_mapping
char m_param_function
char m_layout
char m_tiling
float m_value_scale [2]
char * m_transform


Constructor & Destructor Documentation

TK_Texture::TK_Texture  )  [inline]
 

constructor

Definition at line 4820 of file BOpcodeHandler.h.


Member Function Documentation

int TK_Texture::GetAlphaMapping void   )  const [inline]
 

Returns the alpha channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4886 of file BOpcodeHandler.h.

int TK_Texture::GetBlueMapping void   )  const [inline]
 

Returns the blue channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4881 of file BOpcodeHandler.h.

int TK_Texture::GetDecimation void   )  const [inline]
 

Returns the decimation filter. Filter types are defined in TKO_Texture_Filters.

Definition at line 4866 of file BOpcodeHandler.h.

int TK_Texture::GetFlags void   )  const [inline]
 

Returns the mask indicating which texture options are specified. Options are defined in TKO_Texture_Option_Bits.

Definition at line 4851 of file BOpcodeHandler.h.

int TK_Texture::GetGreenMapping void   )  const [inline]
 

Returns the green channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4876 of file BOpcodeHandler.h.

char alter* TK_Texture::GetImage void   )  [inline]
 

Returns the image name buffer, which can be modified directly

Definition at line 4846 of file BOpcodeHandler.h.

char const* TK_Texture::GetImage void   )  const [inline]
 

Returns the image name

Definition at line 4844 of file BOpcodeHandler.h.

int TK_Texture::GetInterpolation void   )  const [inline]
 

Returns the interpolation filter. Filter types are defined in TKO_Texture_Filters.

Definition at line 4861 of file BOpcodeHandler.h.

int TK_Texture::GetLayout void   )  const [inline]
 

Returns the layout of the data in the image. Layouts are specified in TKO_Texture_Layouts.

Definition at line 4896 of file BOpcodeHandler.h.

char alter* TK_Texture::GetName void   )  [inline]
 

Returns the texture name buffer, which can be modified directly

Definition at line 4837 of file BOpcodeHandler.h.

char const* TK_Texture::GetName void   )  const [inline]
 

Returns the texture name

Definition at line 4835 of file BOpcodeHandler.h.

int TK_Texture::GetParameterFunction void   )  const [inline]
 

Returns the parameterization function. Functions are defined in TKO_Texture_Param_Functions.

Definition at line 4891 of file BOpcodeHandler.h.

int TK_Texture::GetParameterSource void   )  const [inline]
 

Returns the parameterization source. Options are defined in TKO_Texture_Param_Sources

Definition at line 4856 of file BOpcodeHandler.h.

int TK_Texture::GetRedMapping void   )  const [inline]
 

Returns the red channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4871 of file BOpcodeHandler.h.

int TK_Texture::GetTiling void   )  const [inline]
 

Returns the texture tiling mode. Tiling modes are specified in TKO_Texture_Tilings.

Definition at line 4901 of file BOpcodeHandler.h.

char alter* TK_Texture::GetTransform void   )  [inline]
 

Returns the transform segment name buffer, which may be modified directly

Definition at line 4921 of file BOpcodeHandler.h.

char const* TK_Texture::GetTransform void   )  const [inline]
 

Returns the transform segment name

Definition at line 4919 of file BOpcodeHandler.h.

float const* TK_Texture::GetValueScale void   )  const [inline]
 

Returns the value scale & offset factors

Definition at line 4906 of file BOpcodeHandler.h.

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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.

void TK_Texture::Reset void   )  [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.

void TK_Texture::SetAlphaMapping int  p  )  [inline]
 

Sets the alpha channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4884 of file BOpcodeHandler.h.

void TK_Texture::SetBlueMapping int  p  )  [inline]
 

Sets the blue channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4879 of file BOpcodeHandler.h.

void TK_Texture::SetDecimation int  p  )  [inline]
 

Sets the decimation filter. Filter types are defined in TKO_Texture_Filters.

Definition at line 4864 of file BOpcodeHandler.h.

void TK_Texture::SetFlags int  f  )  [inline]
 

Sets the mask indicating which texture options are specified. Options are defined in TKO_Texture_Option_Bits.

Definition at line 4849 of file BOpcodeHandler.h.

void TK_Texture::SetGreenMapping int  p  )  [inline]
 

Sets the green channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4874 of file BOpcodeHandler.h.

void TK_Texture::SetImage int  length  )  [inline]
 

Sets the image name buffer. Allocates a buffer large enough to hold a string of 'length' characters

Definition at line 4842 of file BOpcodeHandler.h.

void TK_Texture::SetImage char const *  image  )  [inline]
 

Sets the image name. Allocates the buffer and copies the name string

Definition at line 4840 of file BOpcodeHandler.h.

void TK_Texture::SetInterpolation int  p  )  [inline]
 

Sets the interpolation filter. Filter types are defined in TKO_Texture_Filters.

Definition at line 4859 of file BOpcodeHandler.h.

void TK_Texture::SetLayout int  p  )  [inline]
 

Sets the layout of the data in the image. Layouts are specified in TKO_Texture_Layouts.

Definition at line 4894 of file BOpcodeHandler.h.

void TK_Texture::SetName int  length  )  [inline]
 

Sets the texture name buffer. Allocates a buffer large enough to hold a string of 'length' characters

Definition at line 4833 of file BOpcodeHandler.h.

void TK_Texture::SetName char const *  name  )  [inline]
 

Sets the texture name. Allocates the buffer and copies the name string

Definition at line 4831 of file BOpcodeHandler.h.

void TK_Texture::SetParameterFunction int  p  )  [inline]
 

Sets the parameterization function. Functions are defined in TKO_Texture_Param_Functions.

Definition at line 4889 of file BOpcodeHandler.h.

void TK_Texture::SetParameterSource int  p  )  [inline]
 

Sets the parameterization source. Options are defined in TKO_Texture_Param_Sources

Definition at line 4854 of file BOpcodeHandler.h.

void TK_Texture::SetRedMapping int  p  )  [inline]
 

Sets the red channel mapping. Mappings are defined in TKO_Texture_Channel_Mappings.

Definition at line 4869 of file BOpcodeHandler.h.

void TK_Texture::SetTiling int  p  )  [inline]
 

Sets the texture tiling mode. Tiling modes are specified in TKO_Texture_Tilings.

Definition at line 4899 of file BOpcodeHandler.h.

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

Definition at line 4917 of file BOpcodeHandler.h.

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

Definition at line 4912 of file BOpcodeHandler.h.

void TK_Texture::SetValueScale float  v1,
float  v2
[inline]
 

Sets the value scale & offset factors

Definition at line 4904 of file BOpcodeHandler.h.

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.

Parameters:
tk A reference to the BStreamFileToolkit object.
Returns:
The result of the function call.

Implements BBaseOpcodeHandler.


Member Data Documentation

char TK_Texture::m_alpha_mapping [protected]
 

internal use; Method for remapping alpha channel value

Definition at line 4804 of file BOpcodeHandler.h.

char TK_Texture::m_blue_mapping [protected]
 

internal use; Method for remapping blue channel value

Definition at line 4803 of file BOpcodeHandler.h.

char TK_Texture::m_decimation [protected]
 

internal use; Method of pixel decimation (pixel covers large portion of texture)

Definition at line 4800 of file BOpcodeHandler.h.

short TK_Texture::m_flags [protected]
 

internal use; Flags indicating presence of optional values

Definition at line 4796 of file BOpcodeHandler.h.

char TK_Texture::m_green_mapping [protected]
 

internal use; Method for remapping green channel value

Definition at line 4802 of file BOpcodeHandler.h.

char* TK_Texture::m_image [protected]
 

internal use; Source image name

Definition at line 4795 of file BOpcodeHandler.h.

int TK_Texture::m_image_length [protected]
 

internal use; Current image name length

Definition at line 4793 of file BOpcodeHandler.h.

char TK_Texture::m_interpolation [protected]
 

internal use; Method of pixel interpolation (pixel falls between texture samples)

Definition at line 4799 of file BOpcodeHandler.h.

char TK_Texture::m_layout [protected]
 

internal use; Format of "picture" within source image

Definition at line 4806 of file BOpcodeHandler.h.

char* TK_Texture::m_name [protected]
 

internal use; Texture name

Definition at line 4794 of file BOpcodeHandler.h.

int TK_Texture::m_name_length [protected]
 

internal use; current name length

Definition at line 4792 of file BOpcodeHandler.h.

char TK_Texture::m_param_function [protected]
 

internal use; Basic parameter remapping methods

Definition at line 4805 of file BOpcodeHandler.h.

char TK_Texture::m_param_source [protected]
 

internal use; Source of parameters used for texture lookup

Definition at line 4798 of file BOpcodeHandler.h.

char TK_Texture::m_red_mapping [protected]
 

internal use; Method for remapping red channel value

Definition at line 4801 of file BOpcodeHandler.h.

char TK_Texture::m_tiling [protected]
 

internal use; Handling of parametric values outside 0 to 1 range

Definition at line 4807 of file BOpcodeHandler.h.

char* TK_Texture::m_transform [protected]
 

internal use; Segment containing transform matrix

Definition at line 4809 of file BOpcodeHandler.h.

float TK_Texture::m_value_scale[2] [protected]
 

internal use; "Brightness & Contrast" scaling of texture values

Definition at line 4808 of file BOpcodeHandler.h.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:06:16 2005 for Autodesk DWF 3D Toolkit by  doxygen 1.4.1