21 INLINE EggGroup::GroupType EggGroup::
22 get_group_type()
const {
23 return (GroupType)(_flags & F_group_type);
41 (get_group_type() == GT_instance) ||
42 (get_billboard_type() != BT_none && !has_billboard_center());
50 INLINE
void EggGroup::
51 set_billboard_type(BillboardType type) {
53 nassertv((type & ~F_billboard_type)==0);
54 _flags = (_flags & ~F_billboard_type) | type;
64 INLINE EggGroup::BillboardType EggGroup::
65 get_billboard_type()
const {
66 return (BillboardType)(_flags & F_billboard_type);
92 _billboard_center = billboard_center;
93 _flags2 |= F2_billboard_center;
103 INLINE
void EggGroup::
104 clear_billboard_center() {
105 _flags2 &= ~F2_billboard_center;
115 INLINE
bool EggGroup::
116 has_billboard_center()
const {
117 return (_flags2 & F2_billboard_center) != 0;
126 get_billboard_center()
const {
127 nassertr(has_billboard_center(), _billboard_center);
128 return _billboard_center;
136 INLINE
void EggGroup::
137 set_cs_type(CollisionSolidType type) {
139 nassertv((type & ~F_cs_type)==0);
140 _flags = (_flags & ~F_cs_type) | type;
148 INLINE EggGroup::CollisionSolidType EggGroup::
149 get_cs_type()
const {
150 return (CollisionSolidType)(_flags & F_cs_type);
158 INLINE
void EggGroup::
159 set_collision_name(
const string &collision_name) {
160 _collision_name = collision_name;
168 INLINE
void EggGroup::
169 clear_collision_name() {
170 _collision_name =
"";
178 INLINE
bool EggGroup::
179 has_collision_name()
const {
180 return !_collision_name.empty();
188 INLINE
const string &EggGroup::
189 get_collision_name()
const {
190 return _collision_name;
198 INLINE
void EggGroup::
199 set_collide_flags(
int flags) {
201 nassertv((flags & ~F_collide_flags)==0);
202 _flags = (_flags & ~F_collide_flags) | flags;
210 INLINE EggGroup::CollideFlags EggGroup::
211 get_collide_flags()
const {
212 return (EggGroup::CollideFlags)(_flags & F_collide_flags);
220 INLINE
void EggGroup::
221 set_dcs_type(EggGroup::DCSType type) {
223 nassertv((type & ~F2_dcs_type)==0);
224 _flags2 = (_flags2 & ~F2_dcs_type) | type;
232 INLINE EggGroup::DCSType EggGroup::
233 get_dcs_type()
const {
234 return (DCSType)(_flags2 & F2_dcs_type);
245 DCSType type = get_dcs_type();
246 return (type != DC_none && type != DC_unspecified);
254 INLINE
void EggGroup::
255 set_dart_type(EggGroup::DartType type) {
257 nassertv((type & ~F_dart_type)==0);
258 _flags = (_flags & ~F_dart_type) | type;
266 INLINE EggGroup::DartType EggGroup::
267 get_dart_type()
const {
268 return (DartType)(_flags & F_dart_type);
276 INLINE
void EggGroup::
277 set_switch_flag(
bool flag) {
279 _flags |= F_switch_flag;
281 _flags &= ~F_switch_flag;
290 INLINE
bool EggGroup::
291 get_switch_flag()
const {
292 return ((_flags & F_switch_flag) != 0);
300 INLINE
void EggGroup::
301 set_switch_fps(
double fps) {
310 INLINE
double EggGroup::
311 get_switch_fps()
const {
320 INLINE
void EggGroup::
321 add_object_type(
const string &object_type) {
322 _object_types.push_back(object_type);
330 INLINE
void EggGroup::
331 clear_object_types() {
332 _object_types.clear();
340 INLINE
int EggGroup::
341 get_num_object_types()
const {
342 return _object_types.size();
350 INLINE
string EggGroup::
351 get_object_type(
int index)
const {
352 nassertr(index >= 0 && index < (
int)_object_types.size(), string());
353 return _object_types[index];
361 INLINE
void EggGroup::
362 set_model_flag(
bool flag) {
364 _flags |= F_model_flag;
366 _flags &= ~F_model_flag;
375 INLINE
bool EggGroup::
376 get_model_flag()
const {
377 return ((_flags & F_model_flag) != 0);
385 INLINE
void EggGroup::
386 set_texlist_flag(
bool flag) {
388 _flags |= F_texlist_flag;
390 _flags &= ~F_texlist_flag;
399 INLINE
bool EggGroup::
400 get_texlist_flag()
const {
401 return ((_flags & F_texlist_flag) != 0);
409 INLINE
void EggGroup::
410 set_nofog_flag(
bool flag) {
412 _flags |= F_nofog_flag;
414 _flags &= ~F_nofog_flag;
423 INLINE
bool EggGroup::
424 get_nofog_flag()
const {
425 return ((_flags & F_nofog_flag) != 0);
433 INLINE
void EggGroup::
434 set_decal_flag(
bool flag) {
436 _flags |= F_decal_flag;
438 _flags &= ~F_decal_flag;
447 INLINE
bool EggGroup::
448 get_decal_flag()
const {
449 return ((_flags & F_decal_flag) != 0);
457 INLINE
void EggGroup::
458 set_direct_flag(
bool flag) {
460 _flags |= F_direct_flag;
462 _flags &= ~F_direct_flag;
471 INLINE
bool EggGroup::
472 get_direct_flag()
const {
473 return ((_flags & F_direct_flag) != 0);
482 INLINE
void EggGroup::
483 set_portal_flag(
bool flag) {
485 _flags2 |= F2_portal_flag;
487 _flags2 &= ~F2_portal_flag;
496 INLINE
bool EggGroup::
497 get_portal_flag()
const {
498 return ((_flags2 & F2_portal_flag) != 0);
506 INLINE
void EggGroup::
507 set_occluder_flag(
bool flag) {
509 _flags2 |= F2_occluder_flag;
511 _flags2 &= ~F2_occluder_flag;
520 INLINE
bool EggGroup::
521 get_occluder_flag()
const {
522 return ((_flags2 & F2_occluder_flag) != 0);
530 INLINE
void EggGroup::
531 set_polylight_flag(
bool flag) {
533 _flags2 |= F2_polylight_flag;
535 _flags2 &= ~F2_polylight_flag;
544 INLINE
bool EggGroup::
545 get_polylight_flag()
const {
546 return ((_flags2 & F2_polylight_flag) != 0);
558 _flags2 |= F2_indexed_flag;
560 _flags2 &= ~F2_indexed_flag;
562 _flags2 |= F2_has_indexed_flag;
570 INLINE
void EggGroup::
571 clear_indexed_flag() {
572 _flags2 &= ~(F2_indexed_flag | F2_has_indexed_flag);
580 INLINE
bool EggGroup::
581 has_indexed_flag()
const {
582 return (_flags2 & F2_has_indexed_flag) != 0;
590 INLINE
bool EggGroup::
591 get_indexed_flag()
const {
592 nassertr(has_indexed_flag(),
false);
593 return ((_flags2 & F2_indexed_flag) != 0);
601 INLINE
void EggGroup::
603 _collide_mask = mask;
604 _flags2 |= F2_collide_mask;
612 INLINE
void EggGroup::
613 clear_collide_mask() {
614 _flags2 &= ~F2_collide_mask;
623 INLINE
bool EggGroup::
624 has_collide_mask()
const {
625 return (_flags2 & F2_collide_mask) != 0;
634 get_collide_mask()
const {
635 return _collide_mask;
643 INLINE
void EggGroup::
645 _from_collide_mask = mask;
646 _flags2 |= F2_from_collide_mask;
654 INLINE
void EggGroup::
655 clear_from_collide_mask() {
656 _flags2 &= ~F2_from_collide_mask;
665 INLINE
bool EggGroup::
666 has_from_collide_mask()
const {
667 return (_flags2 & F2_from_collide_mask) != 0;
676 get_from_collide_mask()
const {
677 return _from_collide_mask;
685 INLINE
void EggGroup::
687 _into_collide_mask = mask;
688 _flags2 |= F2_into_collide_mask;
696 INLINE
void EggGroup::
697 clear_into_collide_mask() {
698 _flags2 &= ~F2_into_collide_mask;
707 INLINE
bool EggGroup::
708 has_into_collide_mask()
const {
709 return (_flags2 & F2_into_collide_mask) != 0;
718 get_into_collide_mask()
const {
719 return _into_collide_mask;
727 INLINE
void EggGroup::
728 set_blend_mode(EggGroup::BlendMode blend_mode) {
729 _blend_mode = blend_mode;
737 INLINE EggGroup::BlendMode EggGroup::
738 get_blend_mode()
const {
747 INLINE
void EggGroup::
748 set_blend_operand_a(EggGroup::BlendOperand blend_operand_a) {
749 _blend_operand_a = blend_operand_a;
757 INLINE EggGroup::BlendOperand EggGroup::
758 get_blend_operand_a()
const {
759 return _blend_operand_a;
767 INLINE
void EggGroup::
768 set_blend_operand_b(EggGroup::BlendOperand blend_operand_b) {
769 _blend_operand_b = blend_operand_b;
777 INLINE EggGroup::BlendOperand EggGroup::
778 get_blend_operand_b()
const {
779 return _blend_operand_b;
787 INLINE
void EggGroup::
788 set_blend_color(
const LColor &blend_color) {
789 _blend_color = blend_color;
790 _flags2 |= F2_has_blend_color;
801 _flags2 &= ~F2_has_blend_color;
812 return (_flags2 & F2_has_blend_color) != 0;
831 INLINE
void EggGroup::
833 _lod = lod.make_copy();
841 INLINE
void EggGroup::
851 INLINE
bool EggGroup::
883 set_tag(
const string &key,
const string &value) {
884 _tag_data[key] = value;
897 TagData::const_iterator ti;
898 ti = _tag_data.find(key);
899 if (ti != _tag_data.end()) {
914 TagData::const_iterator ti;
915 ti = _tag_data.find(key);
916 return (ti != _tag_data.end());
928 _tag_data.erase(key);
943 return _default_pose;
958 return _default_pose;
998 INLINE EggGroup::TagData::const_iterator
EggGroup:: 1000 return _tag_data.begin();
1014 INLINE EggGroup::TagData::const_iterator
EggGroup:: 1016 return _tag_data.end();
1028 INLINE EggGroup::TagData::size_type
EggGroup:: 1030 return _tag_data.size();
1044 INLINE EggGroup::VertexRef::const_iterator
EggGroup:: 1046 return _vref.begin();
1060 INLINE EggGroup::VertexRef::const_iterator
EggGroup:: 1074 INLINE EggGroup::VertexRef::size_type
EggGroup:: 1076 return _vref.size();
1079 INLINE
void EggGroup::
1080 set_scroll_u(
const double u_speed) {
1084 INLINE
void EggGroup::
1085 set_scroll_v(
const double v_speed) {
1089 INLINE
void EggGroup::
1090 set_scroll_w(
const double w_speed) {
1094 INLINE
void EggGroup::
1095 set_scroll_r(
const double r_speed) {
1099 INLINE
double EggGroup::
1100 get_scroll_u()
const {
1104 INLINE
double EggGroup::
1105 get_scroll_v()
const {
1109 INLINE
double EggGroup::
1110 get_scroll_w()
const {
1114 INLINE
double EggGroup::
1115 get_scroll_r()
const {
1120 INLINE
bool EggGroup::
1121 has_scrolling_uvs() {
1122 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...
const EggTransform & get_default_pose() const
Returns a read-only accessor to the initial pose transform.
void transform(const LMatrix4d &mat)
Applies the indicated transformation to the node and all of its descendants.
void set_indexed_flag(bool flag)
If this flag is true, geometry at this node and below will be generated as indexed geometry...
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_blend_color()
Removes the blend color specification.
static BitMask< PN_uint32, 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().
void set_billboard_center(const LPoint3d &billboard_center)
Sets the point around which the billboard will rotate, if this node contains a billboard specificatio...
EggTransform & modify_default_pose()
Returns a writable accessor to the initial pose transform.
bool is_instance_type() const
Returns true if this group is an instance type node; i.e.
const LColor & get_blend_color() const
Returns the blend color if one has been specified, or (0, 0, 0, 0) if one has not.
VertexRef::size_type vref_size() const
Returns the number of elements between vref_begin() and vref_end().
void set_tag(const string &key, const string &value)
Associates a user-defined value with a user-defined key which is stored on the node.
This is the base class for all three-component vectors and points.
bool has_tag(const 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 has_blend_color() const
Returns true if the blend color has been specified, false otherwise.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
string get_tag(const string &key) const
Retrieves the user-defined value that was previously set on this node for the particular key...
bool has_dcs_type() const
Returns true if the specified DCS type is not DC_none and not DC_unspecified.
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...
static const LVecBase4f & zero()
Returns a zero-length vector.
void set_default_pose(const EggTransform &transform)
Replaces the initial pose transform.
void clear_tag(const string &key)
Removes the value defined for this key on this particular node.