17 INLINE EggGroup::GroupType EggGroup::
18 get_group_type()
const {
19 return (GroupType)(_flags & F_group_type);
34 (get_group_type() == GT_instance) ||
35 (get_billboard_type() != BT_none && !has_billboard_center());
41 INLINE
void EggGroup::
42 set_billboard_type(BillboardType type) {
44 nassertv((type & ~F_billboard_type)==0);
45 _flags = (_flags & ~F_billboard_type) | type;
53 INLINE EggGroup::BillboardType EggGroup::
54 get_billboard_type()
const {
55 return (BillboardType)(_flags & F_billboard_type);
75 _billboard_center = billboard_center;
76 _flags2 |= F2_billboard_center;
84 INLINE
void EggGroup::
85 clear_billboard_center() {
86 _flags2 &= ~F2_billboard_center;
94 INLINE
bool EggGroup::
95 has_billboard_center()
const {
96 return (_flags2 & F2_billboard_center) != 0;
102 INLINE
const LPoint3d &EggGroup::
103 get_billboard_center()
const {
104 nassertr(has_billboard_center(), _billboard_center);
105 return _billboard_center;
111 INLINE
void EggGroup::
112 set_cs_type(CollisionSolidType type) {
114 nassertv((type & ~F_cs_type)==0);
115 _flags = (_flags & ~F_cs_type) | type;
121 INLINE EggGroup::CollisionSolidType EggGroup::
122 get_cs_type()
const {
123 return (CollisionSolidType)(_flags & F_cs_type);
129 INLINE
void EggGroup::
130 set_collision_name(
const std::string &collision_name) {
131 _collision_name = collision_name;
137 INLINE
void EggGroup::
138 clear_collision_name() {
139 _collision_name =
"";
145 INLINE
bool EggGroup::
146 has_collision_name()
const {
147 return !_collision_name.empty();
153 INLINE
const std::string &EggGroup::
154 get_collision_name()
const {
155 return _collision_name;
161 INLINE
void EggGroup::
162 set_collide_flags(
int flags) {
164 nassertv((flags & ~F_collide_flags)==0);
165 _flags = (_flags & ~F_collide_flags) | flags;
171 INLINE EggGroup::CollideFlags EggGroup::
172 get_collide_flags()
const {
173 return (EggGroup::CollideFlags)(_flags & F_collide_flags);
179 INLINE
void EggGroup::
180 set_dcs_type(EggGroup::DCSType type) {
182 nassertv((type & ~F2_dcs_type)==0);
183 _flags2 = (_flags2 & ~F2_dcs_type) | type;
189 INLINE EggGroup::DCSType EggGroup::
190 get_dcs_type()
const {
191 return (DCSType)(_flags2 & F2_dcs_type);
200 DCSType type = get_dcs_type();
201 return (type != DC_none && type != DC_unspecified);
207 INLINE
void EggGroup::
208 set_dart_type(EggGroup::DartType type) {
210 nassertv((type & ~F_dart_type)==0);
211 _flags = (_flags & ~F_dart_type) | type;
217 INLINE EggGroup::DartType EggGroup::
218 get_dart_type()
const {
219 return (DartType)(_flags & F_dart_type);
225 INLINE
void EggGroup::
226 set_switch_flag(
bool flag) {
228 _flags |= F_switch_flag;
230 _flags &= ~F_switch_flag;
237 INLINE
bool EggGroup::
238 get_switch_flag()
const {
239 return ((_flags & F_switch_flag) != 0);
245 INLINE
void EggGroup::
246 set_switch_fps(
double fps) {
253 INLINE
double EggGroup::
254 get_switch_fps()
const {
261 INLINE
void EggGroup::
262 add_object_type(
const std::string &object_type) {
263 _object_types.push_back(object_type);
269 INLINE
void EggGroup::
270 clear_object_types() {
271 _object_types.clear();
277 INLINE
int EggGroup::
278 get_num_object_types()
const {
279 return _object_types.size();
285 INLINE std::string EggGroup::
286 get_object_type(
int index)
const {
287 nassertr(index >= 0 && index < (
int)_object_types.size(), std::string());
288 return _object_types[index];
294 INLINE
void EggGroup::
295 set_model_flag(
bool flag) {
297 _flags |= F_model_flag;
299 _flags &= ~F_model_flag;
306 INLINE
bool EggGroup::
307 get_model_flag()
const {
308 return ((_flags & F_model_flag) != 0);
314 INLINE
void EggGroup::
315 set_texlist_flag(
bool flag) {
317 _flags |= F_texlist_flag;
319 _flags &= ~F_texlist_flag;
326 INLINE
bool EggGroup::
327 get_texlist_flag()
const {
328 return ((_flags & F_texlist_flag) != 0);
334 INLINE
void EggGroup::
335 set_nofog_flag(
bool flag) {
337 _flags |= F_nofog_flag;
339 _flags &= ~F_nofog_flag;
346 INLINE
bool EggGroup::
347 get_nofog_flag()
const {
348 return ((_flags & F_nofog_flag) != 0);
354 INLINE
void EggGroup::
355 set_decal_flag(
bool flag) {
357 _flags |= F_decal_flag;
359 _flags &= ~F_decal_flag;
366 INLINE
bool EggGroup::
367 get_decal_flag()
const {
368 return ((_flags & F_decal_flag) != 0);
374 INLINE
void EggGroup::
375 set_direct_flag(
bool flag) {
377 _flags |= F_direct_flag;
379 _flags &= ~F_direct_flag;
386 INLINE
bool EggGroup::
387 get_direct_flag()
const {
388 return ((_flags & F_direct_flag) != 0);
395 INLINE
void EggGroup::
396 set_portal_flag(
bool flag) {
398 _flags2 |= F2_portal_flag;
400 _flags2 &= ~F2_portal_flag;
407 INLINE
bool EggGroup::
408 get_portal_flag()
const {
409 return ((_flags2 & F2_portal_flag) != 0);
415 INLINE
void EggGroup::
416 set_occluder_flag(
bool flag) {
418 _flags2 |= F2_occluder_flag;
420 _flags2 &= ~F2_occluder_flag;
427 INLINE
bool EggGroup::
428 get_occluder_flag()
const {
429 return ((_flags2 & F2_occluder_flag) != 0);
435 INLINE
void EggGroup::
436 set_polylight_flag(
bool flag) {
438 _flags2 |= F2_polylight_flag;
440 _flags2 &= ~F2_polylight_flag;
447 INLINE
bool EggGroup::
448 get_polylight_flag()
const {
449 return ((_flags2 & F2_polylight_flag) != 0);
459 _flags2 |= F2_indexed_flag;
461 _flags2 &= ~F2_indexed_flag;
463 _flags2 |= F2_has_indexed_flag;
469 INLINE
void EggGroup::
470 clear_indexed_flag() {
471 _flags2 &= ~(F2_indexed_flag | F2_has_indexed_flag);
477 INLINE
bool EggGroup::
478 has_indexed_flag()
const {
479 return (_flags2 & F2_has_indexed_flag) != 0;
485 INLINE
bool EggGroup::
486 get_indexed_flag()
const {
487 nassertr(has_indexed_flag(),
false);
488 return ((_flags2 & F2_indexed_flag) != 0);
494 INLINE
void EggGroup::
496 _collide_mask = mask;
497 _flags2 |= F2_collide_mask;
503 INLINE
void EggGroup::
504 clear_collide_mask() {
505 _flags2 &= ~F2_collide_mask;
512 INLINE
bool EggGroup::
513 has_collide_mask()
const {
514 return (_flags2 & F2_collide_mask) != 0;
521 get_collide_mask()
const {
522 return _collide_mask;
528 INLINE
void EggGroup::
530 _from_collide_mask = mask;
531 _flags2 |= F2_from_collide_mask;
537 INLINE
void EggGroup::
538 clear_from_collide_mask() {
539 _flags2 &= ~F2_from_collide_mask;
546 INLINE
bool EggGroup::
547 has_from_collide_mask()
const {
548 return (_flags2 & F2_from_collide_mask) != 0;
555 get_from_collide_mask()
const {
556 return _from_collide_mask;
562 INLINE
void EggGroup::
564 _into_collide_mask = mask;
565 _flags2 |= F2_into_collide_mask;
571 INLINE
void EggGroup::
572 clear_into_collide_mask() {
573 _flags2 &= ~F2_into_collide_mask;
580 INLINE
bool EggGroup::
581 has_into_collide_mask()
const {
582 return (_flags2 & F2_into_collide_mask) != 0;
589 get_into_collide_mask()
const {
590 return _into_collide_mask;
596 INLINE
void EggGroup::
597 set_blend_mode(EggGroup::BlendMode blend_mode) {
598 _blend_mode = blend_mode;
604 INLINE EggGroup::BlendMode EggGroup::
605 get_blend_mode()
const {
612 INLINE
void EggGroup::
613 set_blend_operand_a(EggGroup::BlendOperand blend_operand_a) {
614 _blend_operand_a = blend_operand_a;
620 INLINE EggGroup::BlendOperand EggGroup::
621 get_blend_operand_a()
const {
622 return _blend_operand_a;
628 INLINE
void EggGroup::
629 set_blend_operand_b(EggGroup::BlendOperand blend_operand_b) {
630 _blend_operand_b = blend_operand_b;
636 INLINE EggGroup::BlendOperand EggGroup::
637 get_blend_operand_b()
const {
638 return _blend_operand_b;
644 INLINE
void EggGroup::
645 set_blend_color(
const LColor &blend_color) {
646 _blend_color = blend_color;
647 _flags2 |= F2_has_blend_color;
653 INLINE
void EggGroup::
654 clear_blend_color() {
655 _blend_color = LColor::zero();
656 _flags2 &= ~F2_has_blend_color;
662 INLINE
bool EggGroup::
663 has_blend_color()
const {
664 return (_flags2 & F2_has_blend_color) != 0;
671 INLINE
const LColor &EggGroup::
672 get_blend_color()
const {
679 INLINE
void EggGroup::
681 _lod = lod.make_copy();
687 INLINE
void EggGroup::
695 INLINE
bool EggGroup::
697 return (_lod !=
nullptr);
720 set_tag(
const std::string &key,
const std::string &value) {
721 _tag_data[key] = value;
731 TagData::const_iterator ti;
732 ti = _tag_data.find(key);
733 if (ti != _tag_data.end()) {
736 return std::string();
746 TagData::const_iterator ti;
747 ti = _tag_data.find(key);
748 return (ti != _tag_data.end());
757 _tag_data.erase(key);
768 get_default_pose()
const {
769 return _default_pose;
781 return _default_pose;
810 INLINE EggGroup::TagData::const_iterator
EggGroup:: 812 return _tag_data.begin();
822 INLINE EggGroup::TagData::const_iterator
EggGroup:: 824 return _tag_data.end();
832 INLINE EggGroup::TagData::size_type
EggGroup:: 834 return _tag_data.size();
844 INLINE EggGroup::VertexRef::const_iterator
EggGroup:: 846 return _vref.begin();
856 INLINE EggGroup::VertexRef::const_iterator
EggGroup:: 866 INLINE EggGroup::VertexRef::size_type
EggGroup:: 871 INLINE
void EggGroup::
872 set_scroll_u(
const double u_speed) {
876 INLINE
void EggGroup::
877 set_scroll_v(
const double v_speed) {
881 INLINE
void EggGroup::
882 set_scroll_w(
const double w_speed) {
886 INLINE
void EggGroup::
887 set_scroll_r(
const double r_speed) {
891 INLINE
double EggGroup::
892 get_scroll_u()
const {
896 INLINE
double EggGroup::
897 get_scroll_v()
const {
901 INLINE
double EggGroup::
902 get_scroll_w()
const {
906 INLINE
double EggGroup::
907 get_scroll_r()
const {
912 INLINE
bool EggGroup::
913 has_scrolling_uvs() {
914 return (_u_speed != 0) || (_v_speed != 0) || (_w_speed != 0) || (_r_speed != 0);
TagData::const_iterator tag_begin() const
Returns an iterator that can, in conjunction with tag_end(), be used to traverse the entire set of ta...
void transform(const LMatrix4d &mat)
Applies the indicated transformation to the node and all of its descendants.
set_indexed_flag
If this flag is true, geometry at this node and below will be generated as indexed geometry.
set_default_pose
Replaces the initial pose transform.
VertexRef::const_iterator vref_begin() const
Returns an iterator that can, in conjunction with vref_end(), be used to traverse the entire set of r...
TagData::const_iterator tag_end() const
Returns an iterator that can, in conjunction with tag_begin(), be used to traverse the entire set of ...
void clear_tag(const std::string &key)
Removes the value defined for this key on this particular node.
static BitMask< WType, nbits > all_off()
Returns a BitMask whose bits are all off.
TagData::size_type tag_size() const
Returns the number of elements between tag_begin() and tag_end().
EggTransform & modify_default_pose()
Returns a writable accessor to the initial pose transform.
bool has_tag(const std::string &key) const
Returns true if a value has been defined on this node for the particular key (even if that value is t...
bool is_instance_type() const
Returns true if this group is an instance type node; i.e.
VertexRef::size_type vref_size() const
Returns the number of elements between vref_begin() and vref_end().
set_billboard_center
Sets the point around which the billboard will rotate, if this node contains a billboard specificatio...
bool has_dcs_type() const
Returns true if the specified DCS type is not DC_none and not DC_unspecified.
std::string get_tag(const std::string &key) const
Retrieves the user-defined value that was previously set on this node for the particular key,...
void set_tag(const std::string &key, const std::string &value)
Associates a user-defined value with a user-defined key which is stored on the node.
This corresponds to a <SwitchCondition> entry within a group.
void clear_default_pose()
Removes the initial pose transform.
VertexRef::const_iterator vref_end() const
Returns an iterator that can, in conjunction with vref_begin(), be used to traverse the entire set of...