xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::KotOR2::ObjectDistanceSort Class Reference

A class able to sort objects by distance to a target object. More...

#include <objectcontainer.h>

Public Member Functions

 ObjectDistanceSort (const KotOR2::Object &target)
 
bool operator() (KotOR2::Object *a, KotOR2::Object *b)
 

Private Member Functions

float getDistance (KotOR2::Object &a)
 

Private Attributes

float xt
 
float yt
 
float zt
 

Detailed Description

A class able to sort objects by distance to a target object.

Definition at line 51 of file objectcontainer.h.

Constructor & Destructor Documentation

◆ ObjectDistanceSort()

Engines::KotOR2::ObjectDistanceSort::ObjectDistanceSort ( const KotOR2::Object target)

Definition at line 42 of file objectcontainer.cpp.

References Engines::KotOR2::Object::getPosition(), xt, yt, and zt.

Here is the call graph for this function:

Member Function Documentation

◆ getDistance()

float Engines::KotOR2::ObjectDistanceSort::getDistance ( KotOR2::Object a)
private

Definition at line 50 of file objectcontainer.cpp.

References ABS(), Engines::KotOR2::Object::getPosition(), xt, yt, and zt.

Referenced by operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

bool Engines::KotOR2::ObjectDistanceSort::operator() ( KotOR2::Object a,
KotOR2::Object b 
)

Definition at line 46 of file objectcontainer.cpp.

References getDistance().

Here is the call graph for this function:

Member Data Documentation

◆ xt

float Engines::KotOR2::ObjectDistanceSort::xt
private

Definition at line 58 of file objectcontainer.h.

Referenced by getDistance(), and ObjectDistanceSort().

◆ yt

float Engines::KotOR2::ObjectDistanceSort::yt
private

Definition at line 58 of file objectcontainer.h.

Referenced by getDistance(), and ObjectDistanceSort().

◆ zt

float Engines::KotOR2::ObjectDistanceSort::zt
private

Definition at line 58 of file objectcontainer.h.

Referenced by getDistance(), and ObjectDistanceSort().


The documentation for this class was generated from the following files: