This is the documentation for Enlighten.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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

  • No labels