# TK_Window

## Functions

| `TK_Window`
`TK_Status` | `Read`
`TK_Status` | `Write`
`TK_Status` | `Clone`
`TK_Status` | `ReadAscii`
`TK_Status` | `WriteAscii`
void | `SetWindow`
void | `SetWindow`
void | `SetWindow`
void | `SetWindow`
float const * | `GetWindow`
void | `SetOptions`
int | `GetOptions`

## Detailed Description

class TK_Window : public BBaseOpcodeHandler

  Handles the TKE_Window opcode.

  TK_Window provides support for writing/reading the TKE_Window opcode object to/from an HSF file.

  The HOOPS/3dGS scene-graph supports a window attributes, which defines a local viewport with it’s own unique camera.

  Public Functions

  inline TK_Window()

    constructor

  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.

  inline void SetWindow(float l, float r, float b, float t, float lo = 0, float ro = 0, float bo = 0, float to = 0)

    Sets the subwindow region using discrete float values

  inline void SetWindow(float const w[])

    Sets the subwindow region using an array of four floats

  inline void SetWindow(float const w[], float const o[])

    Sets the subwindow region using two arrays of four floats each

  inline void SetWindow(int n, float const w[])

    Sets the subwindow region using a float array (specified length, should be 4 or 8)

  inline float const *GetWindow() const

    Returns the subwindow region as the address of an array of four floats

  inline void SetOptions(int opt)

    Sets the mask indicating which window options are specified.

  inline int GetOptions() const

    Returns the mask indicating which window options are specified.