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