#include <depthsorter.h>
Public Types | |
enum | EMode { FrontToBack = 0, BackToFront } |
Public Member Functions | |
DepthComparer (EMode mode, const glm::mat4x4 &viewMatrix) | |
bool | operator() (const nap::ComponentInstance *objectA, const nap::ComponentInstance *objectB) |
Helper class that can sort a list of components back to front or front to back.
|
strong |
DepthComparer | ( | EMode | mode, |
const glm::mat4x4 & | viewMatrix | ||
) |
Default constructor
mode | the sort mode to use |
viewMatrix | the camera location in world space |
bool operator() | ( | const nap::ComponentInstance * | objectA, |
const nap::ComponentInstance * | objectB | ||
) |
Compares location of objectA to objectB based on the current sort mode
objectA | the first object to compare against |
objectB | the second object to compare against |