// Filename: eggAttributes.I // Created by: drose (16Jan99) // //////////////////////////////////////////////////////////////////// #include //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Constructor // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE EggAttributes:: EggAttributes() { _flags = 0; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::Copy constructor // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE EggAttributes:: EggAttributes(const EggAttributes ©) { (*this) = copy; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_normal // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_normal() const { return (_flags & F_has_normal) != 0; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_normal // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE const Normald &EggAttributes:: get_normal() const { nassertr(has_normal(), _normal); return _normal; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::set_normal // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_normal(const Normald &normal) { _normal = normal; _flags |= F_has_normal; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::clear_normal // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_normal() { _flags &= ~F_has_normal; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_uv // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_uv() const { return (_flags & F_has_uv) != 0; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_uv // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE const TexCoordd &EggAttributes:: get_uv() const { nassertr(has_uv(), _uv); return _uv; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::set_uv // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_uv(const TexCoordd &uv) { _uv = uv; _flags |= F_has_uv; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::clear_uv // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_uv() { _flags &= ~F_has_uv; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::has_color // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE bool EggAttributes:: has_color() const { return (_flags & F_has_color) != 0; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes::get_color // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE const Colorf &EggAttributes:: get_color() const { nassertr(has_color(), _color); return _color; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes:: // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: set_color(const Colorf &color) { _color = color; _flags |= F_has_color; } //////////////////////////////////////////////////////////////////// // Function: EggAttributes:: // Access: Public // Description: //////////////////////////////////////////////////////////////////// INLINE void EggAttributes:: clear_color() { _flags &= ~F_has_color; }