/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ // MGConstructionPlane.h : MGConstructionPlane クラスの宣言およびインターフェイスの定義をします。 #ifndef _MGConstructionPlane_HH_ #define _MGConstructionPlane_HH_ class MGBox; class MGPosition; class MGContext; #include "mg/Plane.h" #include "mgGL/Color.h" #include "mgGL/VBO.h" /** @file */ /** @addtogroup DisplayHandling * @{ */ ///MGConstructionPlane defines a construction plane ton input 3D data. ///MGConstructionPlane provides a local working 2D coordinate system and ///a local 3D coordinate system. ///MGConstructionPlane has the right hand coordinate system (U,V,N), where ///U=uspan*m_plane.uderiv(), V=uspan*m_plane.vderiv(), and N=m_nspan*m_plane.normal(). ///m_plane.uderiv(), m_plane.vderiv(), and m_plane.normal() are set to length one ///on the construction. ///MGConstructionPlane has the cplane coordinate system such that the coordinate (x, y, z) is ///the normal world coordinate (R+x*U, R+y*V, R+z*N). The cplane coordinate conversion ///utilities are provided as convert_to_world() or convert_from_world(). class MG_DLL_DECLR MGConstructionPlane: public mgVBO{ public: //////////Constructor///////// MGConstructionPlane(); MGConstructionPlane( double origin[3], ///0;}; const MGPlane& plane()const{return m_plane;}; //MGPlane& plane(){return m_plane;}; double uspan()const{return m_uspan;}; double vspan()const{return m_vspan;}; int vnum()const{return m_vnum;}; int unum()const{return m_unum;}; ///set line, u-axis, and v-axis colors. void set_colors(const MGColor colors[3]);///< [0]=line, [1]=u-axis, [2]=vaxis ///set colors by VID. colors[0] is the one of grid lines. ///colors[i] are the ones for axis lines for 1<=i<=3. ///As a standard one, colors[1]=x-axis, [2]=y-axis, [3]=z-axis. ///When 2<=vid<=4, (u,v) colors are: ///vid=2:(u,v)=(x,y), vid=3:(u,v)=(y,z), vid=4:(u,v)=(z,x). ///Other vid is treated as vid=2. void set_colorsByViewID( int vid, const MGColor colors[4] ); /////set the colors to default ones. //void set_default_colors(); ///set grid line color. void set_line_color(const MGColor& color); ///set uaxis color. void set_uaxis_color(const MGColor& color); ///set vaxis color. void set_vaxis_color(const MGColor& color); void set_disable(){m_disabled=true;}; void set_enable(){m_disabled=false;}; void set_span(double span); void set_uspan(double span); void set_vspan(double span); void set_num(int line_num); void set_unum(int unum); void set_vnum(int vnum); void set_plane(const MGPlane& plane); private: bool m_disabled;///> (MGIfstream& buf, MGConstructionPlane& cpl); }; /** @} */ // end of DisplayHandling group #endif