This is the documentation for Enlighten.

class Geo IdentDataCompare

class Geo::IdentDataCompare

Comparison class for std::sort.

Compares the data in the DataArray byte by byte (one DataStride chunk at the time), ignoring bytes that have a value of 0 in the DataByteMask.

Variables

Name Description
const u8 * m_DataArray

Array with data buffer.

const u8 * m_DataByteMask

Byte mask array with size of at least m_DataStride. Any non-zero value.

s32 m_DataStride

Size of a data element in bytes.

Functions

Name Description
operator()(s32, s32)

Sort comparison predicate.

OrderData(s32, s32)

Order two indices.


bool Geo::IdentDataCompare::operator()


public: bool operator()
(
    s32 i0,
    s32 i1
) const


Sort comparison predicate.

std::sort compliant comparison operator


s32 Geo::IdentDataCompare::OrderData


public: s32 OrderData
(
    s32 i0,
    s32 i1
) const


Order two indices.

Given two indices, return -1 if v[i0]<v[i1], 0 if v[i0]==v[i1] and 1 if v[i0]>v[u1]. This is the same as the C qsort comparison function. If allows us to identify == explicitly