This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Landscape Tool
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine::BitStream Class

Header: #include <UnigineMathLibCommon.h>

This class represents an auxiliary structure for the fixed-size buffer and it's bitwise read/write operations. You can specify the size for the structure (template class). The default size is 128 bits.

BitStream Class

Members


static BitStreamPtr create ( ) #

Constructor. Initializes the bit buffer.

const unsigned char * get ( ) const#

Returns the pointer to the constant bit buffer.

Return value

Pointer to the constant bit buffer.

unsigned char * get ( ) #

Returns the pointer to the bit buffer.

Return value

Pointer to the bit buffer.

int size ( ) const#

Returns the size of the structure in bytes.

Return value

Size of the structure in bytes.

void clear ( ) #

Clears the buffer.

void align ( ) #

Aligns the buffer.

int readUBits ( int num ) #

Returns the unsigned data from the buffer.

Arguments

  • int num - Number of bits to return.

Return value

Unsigned data.

void writeUBits ( int value, int num ) #

Sets the unsigned data to the buffer.

Arguments

  • int value - Data to set.
  • int num - Number of bits to set.

int readBits ( int num ) #

Returns the signed data from the buffer.

Arguments

  • int num - Number of bits to return.

Return value

Signed data.

void writeBits ( int value, int num ) #

Sets the signed data to the buffer.

Arguments

  • int value - Data to set.
  • int num - Number of bits to set.
Last update: 2021-12-13
Build: ()