Panda3D
geomTransformer.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file geomTransformer.I
10  * @author drose
11  * @date 2002-03-14
12  */
13 
14 /**
15  * Returns the maximum number of vertices that may be put into a single
16  * GeomVertexData as a result of collecting multiple objects in
17  * collect_vertex_data().
18  */
19 INLINE int GeomTransformer::
21  return _max_collect_vertices;
22 }
23 
24 /**
25  * Specifies the maximum number of vertices that may be put into a single
26  * GeomVertexData as a result of collecting multiple objects in
27  * collect_vertex_data().
28  */
29 INLINE void GeomTransformer::
30 set_max_collect_vertices(int max_collect_vertices) {
31  _max_collect_vertices = max_collect_vertices;
32 }
33 
34 /**
35  *
36  */
37 INLINE bool GeomTransformer::SourceVertices::
38 operator < (const GeomTransformer::SourceVertices &other) const {
39  if (_vertex_data != other._vertex_data) {
40  return _vertex_data < other._vertex_data;
41  }
42  return (_mat.compare_to(other._mat) < 0);
43 }
44 
45 /**
46  *
47  */
48 INLINE bool GeomTransformer::SourceTexCoords::
49 operator < (const GeomTransformer::SourceTexCoords &other) const {
50  if (_vertex_data != other._vertex_data) {
51  return _vertex_data < other._vertex_data;
52  }
53  if (_from != other._from) {
54  return _from < other._from;
55  }
56  if (_to != other._to) {
57  return _to < other._to;
58  }
59  return (_mat.compare_to(other._mat) < 0);
60 }
61 
62 /**
63  *
64  */
65 INLINE bool GeomTransformer::SourceColors::
66 operator < (const GeomTransformer::SourceColors &other) const {
67  if (_vertex_data != other._vertex_data) {
68  return _vertex_data < other._vertex_data;
69  }
70  return (_color.compare_to(other._color) < 0);
71 }
72 
73 /**
74  *
75  */
76 INLINE bool GeomTransformer::SourceTextureColors::
77 operator < (const GeomTransformer::SourceTextureColors &other) const {
78  if (_vertex_data != other._vertex_data) {
79  return _vertex_data < other._vertex_data;
80  }
81  if (_tex != other._tex) {
82  return _tex < other._tex;
83  }
84  if (_ts != other._ts) {
85  return _ts < other._ts;
86  }
87  if (_tma != other._tma) {
88  return _tma < other._tma;
89  }
90  if (_keep_vertex_color != other._keep_vertex_color) {
91  return (int)_keep_vertex_color < (int)other._keep_vertex_color;
92  }
93  return (_base_color.compare_to(other._base_color) < 0);
94 }
95 
96 /**
97  *
98  */
99 INLINE bool GeomTransformer::SourceFormat::
100 operator < (const GeomTransformer::SourceFormat &other) const {
101  if (_format != other._format) {
102  return _format < other._format;
103  }
104  return _vertex_data < other._vertex_data;
105 }
106 
107 /**
108  *
109  */
110 INLINE bool GeomTransformer::NewCollectedKey::
111 operator < (const GeomTransformer::NewCollectedKey &other) const {
112  if (_format != other._format) {
113  return _format < other._format;
114  }
115  if (_usage_hint != other._usage_hint) {
116  return (int)_usage_hint < (int)other._usage_hint;
117  }
118  if (_animation_type != other._animation_type) {
119  return (int)_animation_type < (int)other._animation_type;
120  }
121  return _name < other._name;
122 }
123 
124 /**
125  *
126  */
127 INLINE GeomTransformer::VertexDataAssoc::
128 VertexDataAssoc() {
129  _might_have_unused = false;
130 }
void set_max_collect_vertices(int max_collect_vertices)
Specifies the maximum number of vertices that may be put into a single GeomVertexData as a result of ...
int get_max_collect_vertices() const
Returns the maximum number of vertices that may be put into a single GeomVertexData as a result of co...