#include <model.h>
Inheritance diagram for Model::OpacityComparator:


Public Member Functions | |
| OpacityComparator (const Model &) | |
| virtual bool | operator() (const Mesh &, const Mesh &) const |
Private Member Functions | |
| float | getOpacity (const Mesh &mesh) const |
Private Attributes | |
| const Model & | model |
Standard usage for this class is: model->sortMeshes(Model::OpacityComparator(*model));
Definition at line 90 of file model.h.
|
|
Definition at line 202 of file model.cpp. 00202 : 00203 model(_model) 00204 { 00205 }
|
|
|
Definition at line 212 of file model.cpp. References Model::getMaterial(), Mesh::PrimitiveGroup::materialIndex, model, and Mesh::Material::opacity. Referenced by operator()(). 00213 {
00214 const Mesh::PrimitiveGroup* group = mesh.getGroup(0);
00215
00216 if (group != NULL)
00217 {
00218 const Mesh::Material* material = model.getMaterial(group->materialIndex);
00219 if (material != NULL)
00220 return material->opacity;
00221 }
00222
00223 return 1.0f;
00224 }
|
|
||||||||||||
|
Implements Model::MeshComparator. Definition at line 228 of file model.cpp. References getOpacity(). 00229 {
00230 return getOpacity(a) > getOpacity(b);
00231 }
|
|
|
Definition at line 100 of file model.h. Referenced by getOpacity(). |
1.4.1