This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Stream Class (C++)

Interface for data serialization.

To use this class, include the UnigineStream.h file.

Unigine::Stream Class

Members


virtual ~Stream ()

Virtual destructor.

virtual void grab () =0

Grabs the stream. The stream should not be handled by the engine after this function is called.

virtual void release () =0

Releases the stream. The stream should be handled by the engine after this function is called.

virtual int isOwner () const =0

Returns the "owner" flag.

Return value

The "owner" flag.

virtual Ptr< Stream > getStream () const =0

Returns a stream pointer.

Return value

Stream pointer.

virtual int isOpened () const =0

Returns the status of the stream.

Return value

1 if the stream is opened; otherwise, 0.

virtual int isAvailable () const =0

Returns the status of the stream.

Return value

1 if the stream data is available; otherwise, 0.

virtual int isError () const =0

Returns the status of the stream.

Return value

1 if there is a read/write error; otherwise, 0.

virtual size_t read (void * ptr, size_t size) const =0

Reads the number of bytes from the stream.

Arguments

  • void * ptr - Destination buffer pointer.
  • size_t size - Size of the buffer, in bytes.

Return value

The number of read bytes.

virtual size_t write (const void * ptr, size_t size) const =0

Writes the number of bytes to the stream.

Arguments

  • const void * ptr - Source buffer pointer.
  • size_t size - Size of the buffer in bytes.

Return value

The number of written bytes.

virtual size_t readStream (const Ptr< Stream > & dest, size_t size) const =0

Reads the number of bytes directly from the stream.

Arguments

  • const Ptr< Stream > & dest - Destination stream pointer.
  • size_t size - Size of the data in bytes.

Return value

The number of read bytes.

virtual size_t writeStream (const Ptr< Stream > & src, size_t size) const =0

Writes the number of bytes directly to the stream.

Arguments

  • const Ptr< Stream > & src - Source stream pointer.
  • size_t size - Size of the data in bytes.

Return value

The number of written bytes.

virtual char readChar () const =0

Reads a signed character from the stream.

Return value

Data value.

virtual int writeChar (char value) const =0

Writes a signed character to the stream.

Arguments

  • char value - Data value.

virtual unsigned char readUChar () const =0

Reads an unsigned character from the stream.

Return value

Data value.

virtual int writeUChar (unsigned char value) const =0

Writes an unsigned character to the stream.

Arguments

  • unsigned char value - Data value.

virtual int readInt2 () const =0

Reads a compact signed integer from the stream.

Return value

Data value.

virtual int writeInt2 (int value) const =0

Writes a compact signed integer to the stream.

Arguments

  • int value - Data value.

virtual unsigned int readUInt2 () const =0

Reads a compact unsigned integer from the stream.

Return value

Data value.

virtual int writeUInt2 (unsigned int value) const =0

Writes a compact unsigned integer to the stream.

Arguments

  • unsigned int value - Data value.

virtual short readShortBig () const =0

Reads a signed short integer from the stream in accordance with the big-endian order.

Return value

Data value.

virtual short readShortLittle () const =0

Reads a signed short integer from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE short readShort () const

Reads a signed short integer from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeShortBig (short value) const =0

Writes a signed short integer to the stream in accordance with the big-endian order.

Arguments

  • short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeShortLittle (short value) const =0

Writes a signed short integer to the stream in accordance with the little-endian order.

Arguments

  • short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeShort (short value) const

Writes a signed short integer to the stream in accordance with the little-endian order.

Arguments

  • short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readShortArrayBig (short * dest, int size) const =0

Reads an array of signed short integers from the stream in accordance with the big-endian order.

Arguments

  • short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readShortArrayLittle (short * dest, int size) const =0

Reads an array of signed short integers from the stream in accordance with the little-endian order.

Arguments

  • short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readShortArray (short * dest, int size) const

Reads an array of signed short integers from the stream in accordance with the little-endian order.

Arguments

  • short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeShortArrayBig (const short * src, int size) const =0

Writes an array of signed short integers to the stream in accordance with the big-endian order.

Arguments

  • const short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeShortArrayLittle (const short * src, int size) const =0

Writes an array of signed short integers to the stream in accordance with the little-endian order.

Arguments

  • const short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeShortArray (const short * src, int size) const

Writes an array of signed short integers to the stream in accordance with the little-endian order.

Arguments

  • const short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual unsigned short readUShortBig () const =0

Reads a unsigned short integer from the stream in accordance with the big-endian order.

Return value

Data value.

virtual unsigned short readUShortLittle () const =0

Reads a unsigned short integer from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE unsigned short readUShort () const

Reads a unsigned short integer from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeUShortBig (unsigned short value) const =0

Writes a unsigned short integer to the stream in accordance with the big-endian order.

Arguments

  • unsigned short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUShortLittle (unsigned short value) const =0

Writes a unsigned short integer to the stream in accordance with the little-endian order.

Arguments

  • unsigned short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeUShort (unsigned short value) const

Writes a unsigned short integer to the stream in accordance with the little-endian order.

Arguments

  • unsigned short value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readUShortArrayBig (unsigned short * dest, int size) const =0

Reads an array of unsigned short integers from the stream in accordance with the big-endian order.

Arguments

  • unsigned short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readUShortArrayLittle (unsigned short * dest, int size) const =0

Reads an array of unsigned short integers from the stream in accordance with the little-endian order.

Arguments

  • unsigned short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readUShortArray (unsigned short * dest, int size) const

Reads an array of unsigned short integers from the stream in accordance with the little-endian order.

Arguments

  • unsigned short * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUShortArrayBig (const unsigned short * src, int size) const =0

Writes an array of unsigned short integers to the stream in accordance with the big-endian order.

Arguments

  • const unsigned short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUShortArrayLittle (const unsigned short * src, int size) const =0

Writes an array of unsigned short integers to the stream in accordance with the little-endian order.

Arguments

  • const unsigned short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeUShortArray (const unsigned short * src, int size) const

Writes an array of unsigned short integers to the stream in accordance with the little-endian order.

Arguments

  • const unsigned short * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readIntBig () const =0

Reads a signed integer from the stream in accordance with the big-endian order.

Return value

Data value.

virtual int readIntLittle () const =0

Reads a signed integer from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE int readInt () const

Reads a signed integer from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeIntBig (int value) const =0

Writes a signed integer to the stream in accordance with the big-endian order.

Arguments

  • int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIntLittle (int value) const =0

Writes a signed integer to the stream in accordance with the little-endian order.

Arguments

  • int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeInt (int value) const

Writes a signed integer to the stream in accordance with the little-endian order.

Arguments

  • int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readIntArrayBig (int * dest, int size) const =0

Reads an array of signed integers from the stream in accordance with the big-endian order.

Arguments

  • int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readIntArrayLittle (int * dest, int size) const =0

Reads an array of signed integers from the stream in accordance with the little-endian order.

Arguments

  • int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readIntArray (int * dest, int size) const

Reads an array of signed integers from the stream in accordance with the little-endian order.

Arguments

  • int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIntArrayBig (const int * src, int size) const =0

Writes an array of signed integers to the stream in accordance with the big-endian order.

Arguments

  • const int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIntArrayLittle (const int * src, int size) const =0

Writes an array of signed integers to the stream in accordance with the little-endian order.

Arguments

  • const int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeIntArray (const int * src, int size) const

Writes an array of signed integers to the stream in accordance with the little-endian order.

Arguments

  • const int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual unsigned int readUIntBig () const =0

Reads a unsigned integer from the stream in accordance with the big-endian order.

Return value

Data value.

virtual unsigned int readUIntLittle () const =0

Reads a unsigned integer from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE unsigned int readUInt () const

Reads a unsigned integer from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeUIntBig (unsigned int value) const =0

Writes a unsigned integer to the stream in accordance with the big-endian order.

Arguments

  • unsigned int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUIntLittle (unsigned int value) const =0

Writes a unsigned integer to the stream in accordance with the little-endian order.

Arguments

  • unsigned int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeUInt (unsigned int value) const

Writes a unsigned integer to the stream in accordance with the little-endian order.

Arguments

  • unsigned int value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readUIntArrayBig (unsigned int * dest, int size) const =0

Reads an array of unsigned integers from the stream in accordance with the big-endian order.

Arguments

  • unsigned int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readUIntArrayLittle (unsigned int * dest, int size) const =0

Reads an array of unsigned integers from the stream in accordance with the little-endian order.

Arguments

  • unsigned int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readUIntArray (unsigned int * dest, int size) const

Reads an array of unsigned integers from the stream in accordance with the little-endian order.

Arguments

  • unsigned int * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUIntArrayBig (const unsigned int * src, int size) const =0

Writes an array of unsigned integers to the stream in accordance with the big-endian order.

Arguments

  • const unsigned int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeUIntArrayLittle (const unsigned int * src, int size) const =0

Writes an array of unsigned integers to the stream in accordance with the little-endian order.

Arguments

  • const unsigned int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeUIntArray (const unsigned int * src, int size) const

Writes an array of unsigned integers to the stream in accordance with the little-endian order.

Arguments

  • const unsigned int * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual long long readLongBig () const =0

Reads a signed long from the stream in accordance with the big-endian order.

Return value

Data value.

virtual long long readLongLittle () const =0

Reads a signed long from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE long long readLong () const

Reads a signed long from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeLongBig (long long value) const =0

Writes a signed long to the stream in accordance with the big-endian order.

Arguments

  • long long value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeLongLittle (long long value) const =0

Writes a signed long to the stream in accordance with the little-endian order.

Arguments

  • long long value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeLong (long long value) const

Writes a signed long to the stream in accordance with the little-endian order.

Arguments

  • long long value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readLongArrayBig (long long * dest, int size) const =0

Reads an array of signed longs from the stream in accordance with the big-endian order.

Arguments

  • long long * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readLongArrayLittle (long long * dest, int size) const =0

Reads an array of signed longs from the stream in accordance with the little-endian order.

Arguments

  • long long * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readLongArray (long long * dest, int size) const

Reads an array of signed longs from the stream in accordance with the little-endian order.

Arguments

  • long long * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeLongArrayBig (const long long * src, int size) const =0

Writes an array of signed longs to the stream in accordance with the big-endian order.

Arguments

  • const long long * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeLongArrayLittle (const long long * src, int size) const =0

Writes an array of signed longs to the stream in accordance with the little-endian order.

Arguments

  • const long long * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeLongArray (const long long * src, int size) const

Writes an array of signed longs to the stream in accordance with the little-endian order.

Arguments

  • const long long * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual float readFloatBig () const =0

Reads a floating-point number from the stream in accordance with the big-endian order.

Return value

Data value.

virtual float readFloatLittle () const =0

Reads a floating-point number from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE float readFloat () const

Reads a floating-point number from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeFloatBig (float value) const =0

Writes a floating-point number to the stream in accordance with the big-endian order.

Arguments

  • float value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeFloatLittle (float value) const =0

Writes a floating-point number to the stream in accordance with the little-endian order.

Arguments

  • float value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeFloat (float value) const

Writes a floating-point number to the stream in accordance with the little-endian order.

Arguments

  • float value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readFloatArrayBig (float * dest, int size) const =0

Reads an array of floating-point numbers from the stream in accordance with the big-endian order.

Arguments

  • float * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readFloatArrayLittle (float * dest, int size) const =0

Reads an array of floating-point numbers from the stream in accordance with the little-endian order.

Arguments

  • float * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readFloatArray (float * dest, int size) const

Reads an array of floating-point numbers from the stream in accordance with the little-endian order.

Arguments

  • float * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeFloatArrayBig (const float * src, int size) const =0

Writes an array of floating-point numbers to the stream in accordance with the big-endian order.

Arguments

  • const float * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeFloatArrayLittle (const float * src, int size) const =0

Writes an array of floating-point numbers to the stream in accordance with the little-endian order.

Arguments

  • const float * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeFloatArray (const float * src, int size) const

Writes an array of floating-point numbers to the stream in accordance with the little-endian order.

Arguments

  • const float * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual double readDoubleBig () const =0

Reads a double floating-point number from the stream in accordance with the big-endian order.

Return value

Data value.

virtual double readDoubleLittle () const =0

Reads a double floating-point number from the stream in accordance with the little-endian order.

Return value

Data value.

UNIGINE_INLINE double readDouble () const

Reads a double floating-point number from the stream in accordance with the little-endian order.

Return value

Data value.

virtual int writeDoubleBig (double value) const =0

Writes a double floating-point number to the stream in accordance with the big-endian order.

Arguments

  • double value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDoubleLittle (double value) const =0

Writes a double floating-point number to the stream in accordance with the little-endian order.

Arguments

  • double value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDouble (double value) const

Writes a double floating-point number to the stream in accordance with the little-endian order.

Arguments

  • double value - Data value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readDoubleArrayBig (double * dest, int size) const =0

Reads an array of double floating-point numbers from the stream in accordance with the big-endian order.

Arguments

  • double * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int readDoubleArrayLittle (double * dest, int size) const =0

Reads an array of double floating-point numbers from the stream in accordance with the little-endian order.

Arguments

  • double * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int readDoubleArray (double * dest, int size) const

Reads an array of double floating-point numbers from the stream in accordance with the little-endian order.

Arguments

  • double * dest - Destination buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDoubleArrayBig (const double * src, int size) const =0

Writes an array of double floating-point numbers to the stream in accordance with the big-endian order.

Arguments

  • const double * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDoubleArrayLittle (const double * src, int size) const =0

Writes an array of double floating-point numbers to the stream in accordance with the little-endian order.

Arguments

  • const double * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDoubleArray (const double * src, int size) const

Writes an array of double floating-point numbers to the stream in accordance with the little-endian order.

Arguments

  • const double * src - Source buffer pointer.
  • int size - The number of elements.

Return value

1 if the operation was successful; otherwise, 0.

virtual vec2 readVec2Big () const =0

Reads a 2 component vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual vec2 readVec2Little () const =0

Reads a 2 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE vec2 readVec2 () const

Reads a 2 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeVec2Big (const vec2 & value) const =0

Writes a 2 component vector to the stream in accordance with the big-endian order.

Arguments

  • const vec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeVec2Little (const vec2 & value) const =0

Writes a 2 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeVec2 (const vec2 & value) const

Writes a 2 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual vec3 readVec3Big () const =0

Reads a 3 component vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual vec3 readVec3Little () const =0

Reads a 3 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE vec3 readVec3 () const

Reads a 3 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeVec3Big (const vec3 & value) const =0

Writes a 3 component vector to the stream in accordance with the big-endian order.

Arguments

  • const vec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeVec3Little (const vec3 & value) const =0

Writes a 3 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeVec3 (const vec3 & value) const

Writes a 3 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual vec4 readVec4Big () const =0

Reads a 4 component vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual vec4 readVec4Little () const =0

Reads a 4 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE vec4 readVec4 () const

Reads a 4 component vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeVec4Big (const vec4 & value) const =0

Writes a 4 component vector to the stream in accordance with the big-endian order.

Arguments

  • const vec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeVec4Little (const vec4 & value) const =0

Writes a 4 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeVec4 (const vec4 & value) const

Writes a 4 component vector to the stream in accordance with the little-endian order.

Arguments

  • const vec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual dvec2 readDVec2Big () const =0

Reads a 2 component double vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual dvec2 readDVec2Little () const =0

Reads a 2 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE dvec2 readDVec2 () const

Reads a 2 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeDVec2Big (const dvec2 & value) const =0

Writes a 2 component double vector to the stream in accordance with the big-endian order.

Arguments

  • const dvec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDVec2Little (const dvec2 & value) const =0

Writes a 2 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDVec2 (const dvec2 & value) const

Writes a 2 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual dvec3 readDVec3Big () const =0

Reads a 3 component double vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual dvec3 readDVec3Little () const =0

Reads a 3 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE dvec3 readDVec3 () const

Reads a 3 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeDVec3Big (const dvec3 & value) const =0

Writes a 3 component double vector to the stream in accordance with the big-endian order.

Arguments

  • const dvec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDVec3Little (const dvec3 & value) const =0

Writes a 3 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDVec3 (const dvec3 & value) const

Writes a 3 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual dvec4 readDVec4Big () const =0

Reads a 4 component double vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual dvec4 readDVec4Little () const =0

Reads a 4 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE dvec4 readDVec4 () const

Reads a 4 component double vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeDVec4Big (const dvec4 & value) const =0

Writes a 4 component double vector to the stream in accordance with the big-endian order.

Arguments

  • const dvec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDVec4Little (const dvec4 & value) const =0

Writes a 4 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDVec4 (const dvec4 & value) const

Writes a 4 component double vector to the stream in accordance with the little-endian order.

Arguments

  • const dvec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual ivec2 readIVec2Big () const =0

Reads a 2 component integer vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual ivec2 readIVec2Little () const =0

Reads a 2 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE ivec2 readIVec2 () const

Reads a 2 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeIVec2Big (const ivec2 & value) const =0

Writes a 2 component integer vector to the stream in accordance with the big-endian order.

Arguments

  • const ivec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIVec2Little (const ivec2 & value) const =0

Writes a 2 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeIVec2 (const ivec2 & value) const

Writes a 2 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec2 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual ivec3 readIVec3Big () const =0

Reads a 3 component integer vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual ivec3 readIVec3Little () const =0

Reads a 3 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE ivec3 readIVec3 () const

Reads a 3 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeIVec3Big (const ivec3 & value) const =0

Writes a 3 component integer vector to the stream in accordance with the big-endian order.

Arguments

  • const ivec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIVec3Little (const ivec3 & value) const =0

Writes a 3 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeIVec3 (const ivec3 & value) const

Writes a 3 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec3 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual ivec4 readIVec4Big () const =0

Reads a 4 component integer vector from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual ivec4 readIVec4Little () const =0

Reads a 4 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE ivec4 readIVec4 () const

Reads a 4 component integer vector from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeIVec4Big (const ivec4 & value) const =0

Writes a 4 component integer vector to the stream in accordance with the big-endian order.

Arguments

  • const ivec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeIVec4Little (const ivec4 & value) const =0

Writes a 4 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeIVec4 (const ivec4 & value) const

Writes a 4 component integer vector to the stream in accordance with the little-endian order.

Arguments

  • const ivec4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual mat4 readMat4Big () const =0

Reads a matrix from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual mat4 readMat4Little () const =0

Reads a matrix from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE mat4 readMat4 () const

Reads a matrix from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeMat4Big (const mat4 & value) const =0

Writes a matrix to the stream in accordance with the big-endian order.

Arguments

  • const mat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeMat4Little (const mat4 & value) const =0

Writes a matrix to the stream in accordance with the little-endian order.

Arguments

  • const mat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeMat4 (const mat4 & value) const

Writes a matrix to the stream in accordance with the little-endian order.

Arguments

  • const mat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual dmat4 readDMat4Big () const =0

Reads a double matrix from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual dmat4 readDMat4Little () const =0

Reads a double matrix from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE dmat4 readDMat4 () const

Reads a double matrix from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeDMat4Big (const dmat4 & value) const =0

Writes a double matrix to the stream in accordance with the big-endian order.

Arguments

  • const dmat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeDMat4Little (const dmat4 & value) const =0

Writes a double matrix to the stream in accordance with the little-endian order.

Arguments

  • const dmat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeDMat4 (const dmat4 & value) const

Writes a double matrix to the stream in accordance with the little-endian order.

Arguments

  • const dmat4 & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual quat readQuatBig () const =0

Reads a quaternion from the stream in accordance with the big-endian order.

Return value

Vector value.

virtual quat readQuatLittle () const =0

Reads a quaternion from the stream in accordance with the little-endian order.

Return value

Vector value.

UNIGINE_INLINE quat readQuat () const

Reads a quaternion from the stream in accordance with the little-endian order.

Return value

Vector value.

virtual int writeQuatBig (const quat & value) const =0

Writes a quaternion to the stream in accordance with the big-endian order.

Arguments

  • const quat & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeQuatLittle (const quat & value) const =0

Writes a quaternion to the stream in accordance with the little-endian order.

Arguments

  • const quat & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

UNIGINE_INLINE int writeQuat (const quat & value) const

Writes a quaternion to the stream in accordance with the little-endian order.

Arguments

  • const quat & value - Vector value.

Return value

1 if the operation was successful; otherwise, 0.

virtual String readString () const =0

Reads a string from the stream in accordance with the big-endian order.

Return value

Returns string.

virtual int readString (char * str, int size) const =0

Reads a string from the stream in accordance with the big-endian order.

Arguments

  • char * str - String pointer.
  • int size - Size of the buffer in bytes.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeString (const char * str) const =0

Writes a string to the stream in accordance with the big-endian order.

Arguments

  • const char * str - String pointer.

Return value

1 if the operation was successful; otherwise, 0.

virtual String readString2 () const =0

Reads a string from the stream in accordance with the big-endian order.

Return value

Returns string.

virtual int readString2 (char * str, int size) const =0

Reads a string from the stream in accordance with the big-endian order.

Arguments

  • char * str - String pointer.
  • int size - Size of the buffer in bytes.

Return value

1 if the operation was successful; otherwise, 0.

virtual int writeString2 (const char * str) const =0

Writes a string to the stream in accordance with the big-endian order.

Arguments

  • const char * str - String pointer.

Return value

1 if the operation was successful; otherwise, 0.

virtual String readLine () const =0

Reads a line from the stream.

Return value

Returns string.

virtual int readLine (char * str, int size) const =0

Reads a line from the stream.

Arguments

  • char * str - String pointer.
  • int size - Size of the buffer in bytes.

Return value

1 if the operation was successful; otherwise, 0.

virtual String gets () const =0

Reads the stream data from the current position

Return value

Returns string.

virtual int puts (const char * str) const =0

Writes a string of characters to the stream.

Arguments

  • const char * str - String pointer.

Return value

1 if the operation was successful; otherwise, 0.
Last update: 2017-07-03
Build: ()