comparison libinterp/corefcn/graphics.in.h @ 30040:805357e6b058

maint: use "m_" prefix for member variables of graphics objects. * graphics.in.h (patch::properties): Rename variables to "m_bad_data_msg" and "m_coplanar_last_idx". * graphics.in.h (scatter::properties): Rename variable to "m_bad_data_msg". * graphics.in.h (uicontextmenu::properties): Rename variable to "m_dependent_obj_list". * gl-render.cc: Rename occurrences of "coplanar_last_idx". * graphics.cc: Rename occurrences of "bad_data_msg", "coplanar_last_idx".
author Rik <rik@octave.org>
date Wed, 25 Aug 2021 09:17:48 -0700
parents b5fae48ad807
children 0b67964031be
comparison
equal deleted inserted replaced
30039:f16cfb2d7d1b 30040:805357e6b058
4944 4944
4945 // Matlab allows incoherent data to be stored into patch properties. 4945 // Matlab allows incoherent data to be stored into patch properties.
4946 // The patch should then be ignored by the renderer. 4946 // The patch should then be ignored by the renderer.
4947 bool has_bad_data (std::string& msg) const 4947 bool has_bad_data (std::string& msg) const
4948 { 4948 {
4949 msg = bad_data_msg; 4949 msg = m_bad_data_msg;
4950 return ! msg.empty (); 4950 return ! msg.empty ();
4951 } 4951 }
4952 4952
4953 bool is_aliminclude (void) const 4953 bool is_aliminclude (void) const
4954 { return (m_aliminclude.is_on () && m_alphadatamapping.is ("scaled")); } 4954 { return (m_aliminclude.is_on () && m_alphadatamapping.is ("scaled")); }
4960 std::string get_climinclude (void) const 4960 std::string get_climinclude (void) const
4961 { return m_climinclude.current_value (); } 4961 { return m_climinclude.current_value (); }
4962 4962
4963 OCTINTERP_API bool get_do_lighting (void) const; 4963 OCTINTERP_API bool get_do_lighting (void) const;
4964 4964
4965 std::vector<std::vector<octave_idx_type>> coplanar_last_idx; 4965 std::vector<std::vector<octave_idx_type>> m_coplanar_last_idx;
4966 4966
4967 // See the genprops.awk script for an explanation of the 4967 // See the genprops.awk script for an explanation of the
4968 // properties declarations. 4968 // properties declarations.
4969 // Programming note: Keep property list sorted if new ones are added. 4969 // Programming note: Keep property list sorted if new ones are added.
4970 4970
5069 update_vertex_normals (reset, force); 5069 update_vertex_normals (reset, force);
5070 } 5070 }
5071 5071
5072 5072
5073 private: 5073 private:
5074 std::string bad_data_msg; 5074 std::string m_bad_data_msg;
5075 5075
5076 void update_faces (void) { update_data ();} 5076 void update_faces (void) { update_data ();}
5077 5077
5078 void update_vertices (void) { update_data ();} 5078 void update_vertices (void) { update_data ();}
5079 5079
5217 5217
5218 // Matlab allows incoherent data to be stored in scatter properties. 5218 // Matlab allows incoherent data to be stored in scatter properties.
5219 // The scatter object should then be ignored by the renderer. 5219 // The scatter object should then be ignored by the renderer.
5220 bool has_bad_data (std::string& msg) const 5220 bool has_bad_data (std::string& msg) const
5221 { 5221 {
5222 msg = bad_data_msg; 5222 msg = m_bad_data_msg;
5223 return ! msg.empty (); 5223 return ! msg.empty ();
5224 } 5224 }
5225 5225
5226 bool is_aliminclude (void) const 5226 bool is_aliminclude (void) const
5227 { return m_aliminclude.is_on (); } 5227 { return m_aliminclude.is_on (); }
5326 5326
5327 public: 5327 public:
5328 OCTINTERP_API void update_color (void); 5328 OCTINTERP_API void update_color (void);
5329 5329
5330 private: 5330 private:
5331 std::string bad_data_msg; 5331 std::string m_bad_data_msg;
5332 5332
5333 void update_xdata (void) 5333 void update_xdata (void)
5334 { 5334 {
5335 if (get_xdata ().isempty ()) 5335 if (get_xdata ().isempty ())
5336 { 5336 {
5818 class OCTINTERP_API properties : public base_properties 5818 class OCTINTERP_API properties : public base_properties
5819 { 5819 {
5820 public: 5820 public:
5821 5821
5822 void add_dependent_obj (graphics_handle gh) 5822 void add_dependent_obj (graphics_handle gh)
5823 { dependent_obj_list.push_back (gh); } 5823 { m_dependent_obj_list.push_back (gh); }
5824 5824
5825 // FIXME: the list may contain duplicates. 5825 // FIXME: the list may contain duplicates.
5826 // Should we return only unique elements? 5826 // Should we return only unique elements?
5827 const std::list<graphics_handle> get_dependent_obj_list (void) 5827 const std::list<graphics_handle> get_dependent_obj_list (void)
5828 { return dependent_obj_list; } 5828 { return m_dependent_obj_list; }
5829 5829
5830 // See the genprops.awk script for an explanation of the 5830 // See the genprops.awk script for an explanation of the
5831 // properties declarations. 5831 // properties declarations.
5832 // Programming note: Keep property list sorted if new ones are added. 5832 // Programming note: Keep property list sorted if new ones are added.
5833 5833
5847 m_visible.set (octave_value (false)); 5847 m_visible.set (octave_value (false));
5848 } 5848 }
5849 5849
5850 private: 5850 private:
5851 // List of objects that might depend on this uicontextmenu object 5851 // List of objects that might depend on this uicontextmenu object
5852 std::list<graphics_handle> dependent_obj_list; 5852 std::list<graphics_handle> m_dependent_obj_list;
5853 5853
5854 OCTINTERP_API void update_beingdeleted (void); 5854 OCTINTERP_API void update_beingdeleted (void);
5855 5855
5856 }; 5856 };
5857 5857