35 _properties = properties;
42 get_bin_number(
const EggNode *node) {
43 if (node->
is_of_type(EggPolygon::get_class_type())) {
44 return (
int)BN_polyset;
56 nassertr((BinNumber)bin_number == BN_polyset,
false);
61 if ((_properties & (P_has_texture | P_texture)) != 0) {
64 if (a_has_texture != b_has_texture) {
65 return ((
int)a_has_texture < (int)b_has_texture);
68 if ((_properties & (P_texture)) != 0) {
70 for (
int i = 0; i < num_textures; i++) {
73 if (a_texture != b_texture) {
74 return (a_texture->
sorts_less_than(*b_texture, ~EggTexture::E_tref_name));
81 if ((_properties & (P_has_material | P_material)) != 0) {
86 if ((_properties & (P_material)) != 0) {
91 if ((_properties & (P_has_poly_color)) != 0) {
92 if (pa->has_color() != pb->has_color()) {
93 return ((
int)pa->has_color() < (
int)pb->has_color());
96 if ((_properties & (P_poly_color)) != 0) {
101 if ((_properties & (P_has_poly_normal)) != 0) {
102 if (pa->has_normal() != pb->has_normal()) {
103 return ((
int)pa->has_normal() < (
int)pb->has_normal());
106 if ((_properties & (P_has_vertex_normal)) != 0) {
109 if (pa_has_normal != pb_has_normal) {
110 return ((
int)pa_has_normal < (
int)pb_has_normal);
113 if ((_properties & (P_has_vertex_color)) != 0) {
116 if (pa_has_color != pb_has_color) {
117 return ((
int)pa_has_color < (
int)pb_has_color);
120 if ((_properties & (P_bface)) != 0) {