Functions | |
void NAPAPI | sortObjectsByDepth (std::vector< RenderableComponentInstance * > &comps, const glm::mat4 &viewMatrix) |
void NAPAPI | sortObjectsByZ (std::vector< RenderableComponentInstance * > &comps) |
void NAPAPI nap::sorter::sortObjectsByDepth | ( | std::vector< RenderableComponentInstance * > & | comps, |
const glm::mat4 & | viewMatrix | ||
) |
Sorts a set of renderable components by layer, then distance to the camera, ie: depth Note that when the object is of a type mesh it will use the material to sort based on opacity If the renderable object is not a mesh the sorting will occur front-to-back regardless of it's type as we don't know the way the object is rendered to screen
comps | the renderable components to sort |
viewMatrix | the camera view matrix used for sorting based on distance |
void NAPAPI nap::sorter::sortObjectsByZ | ( | std::vector< RenderableComponentInstance * > & | comps | ) |
Sorts a set of renderable components by layer, then location on world z-axis (ignores camera view transformation) Note that when the object is of a type mesh it will use the material to sort based on opacity If the renderable object is not a mesh the sorting will occur front-to-back regardless of it's type as we don't know the way the object is rendered to screen
comps | the renderable components to sort |