00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 INLINE RenderEffects::Effect::
00022 Effect(const RenderEffect *effect) :
00023 _type(effect->get_type()),
00024 _effect(effect)
00025 {
00026 }
00027
00028
00029
00030
00031
00032
00033
00034
00035 INLINE RenderEffects::Effect::
00036 Effect() {
00037 }
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 INLINE RenderEffects::Effect::
00048 Effect(TypeHandle type) :
00049 _type(type),
00050 _effect(NULL)
00051 {
00052 }
00053
00054
00055
00056
00057
00058
00059 INLINE RenderEffects::Effect::
00060 Effect(const Effect ©) :
00061 _type(copy._type),
00062 _effect(copy._effect)
00063 {
00064 }
00065
00066
00067
00068
00069
00070
00071 INLINE void RenderEffects::Effect::
00072 operator = (const Effect ©) {
00073 _type = copy._type;
00074 _effect = copy._effect;
00075 }
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 INLINE bool RenderEffects::Effect::
00086 operator < (const Effect &other) const {
00087 return _type < other._type;
00088 }
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100 INLINE int RenderEffects::Effect::
00101 compare_to(const Effect &other) const {
00102 if (_type != other._type) {
00103 return _type.get_index() - other._type.get_index();
00104 }
00105 if (_effect != other._effect) {
00106 return _effect < other._effect ? -1 : 1;
00107 }
00108 return 0;
00109 }
00110
00111
00112
00113
00114
00115
00116 INLINE bool RenderEffects::
00117 is_empty() const {
00118 return _effects.empty();
00119 }
00120
00121
00122
00123
00124
00125
00126
00127 INLINE int RenderEffects::
00128 get_num_effects() const {
00129 return _effects.size();
00130 }
00131
00132
00133
00134
00135
00136
00137 INLINE const RenderEffect *RenderEffects::
00138 get_effect(int n) const {
00139 nassertr(n >= 0 && n < (int)_effects.size(), NULL);
00140 return _effects[n]._effect;
00141 }
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154 INLINE bool RenderEffects::
00155 has_decal() const {
00156 if ((_flags & F_checked_decal) == 0) {
00157
00158
00159 ((RenderEffects *)this)->determine_decal();
00160 }
00161 return ((_flags & F_has_decal) != 0);
00162 }
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175 INLINE bool RenderEffects::
00176 has_show_bounds() const {
00177 if ((_flags & F_checked_show_bounds) == 0) {
00178
00179
00180 ((RenderEffects *)this)->determine_show_bounds();
00181 }
00182 return ((_flags & F_has_show_bounds) != 0);
00183 }
00184
00185
00186
00187
00188
00189
00190
00191
00192 INLINE bool RenderEffects::
00193 has_show_tight_bounds() const {
00194 if ((_flags & F_checked_show_bounds) == 0) {
00195
00196
00197 ((RenderEffects *)this)->determine_show_bounds();
00198 }
00199 return ((_flags & F_has_show_tight_bounds) != 0);
00200 }
00201
00202
00203
00204
00205
00206
00207
00208
00209 INLINE bool RenderEffects::
00210 has_cull_callback() const {
00211 if ((_flags & F_checked_cull_callback) == 0) {
00212
00213
00214 ((RenderEffects *)this)->determine_cull_callback();
00215 }
00216 return ((_flags & F_has_cull_callback) != 0);
00217 }
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227 INLINE bool RenderEffects::
00228 has_adjust_transform() const {
00229 if ((_flags & F_checked_adjust_transform) == 0) {
00230
00231
00232 ((RenderEffects *)this)->determine_adjust_transform();
00233 }
00234 return ((_flags & F_has_adjust_transform) != 0);
00235 }