/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGGel_HH_ #define _MGGel_HH_ #include "MGCLStdAfx.h" #include "mg/MGCL.h" #include "mg/AbstractGels.h" #include "mg/Vector.h" #include "mg/Matrix.h" #include "mg/Pvector.h" #include "mg/Transf.h" class MGDrawParam; class MGAttribedGel; class MGAttrib; class MGIfstream; class MGOfstream; class MGAttrib; class MGGroup; class MGObject; class MGGeometry; class MGPoint; class MGCurve; class MGSurface; class MGTopology; class MGFace; class MGShell; class MGOpenGLView; class MGIgesOfstream; class mgSysGL; class mgVBO; ; /** @defgroup GelRelated Gel Related class * MGGel is top abstract class for MGObject, MGGroup, and MGGLAttrib. * @{ */ //Define MGGel Class. ///MGGel is an abstract class which represents a group element. ///Gel is the abbreviation of group element, is designed to store ///in MGGroup as an element. ///Subclasses of MGGel are: ///(1) MGAttribedGel(whose sub are MGObject, MGGroup), or (2) MGAttrib. ///MGGel provides functions of serialization of objects. ///All the objects of MGGel subclasses can be serialized using ///MGGroup::make_file(), and MGGroup constructor. class MG_DLL_DECLR MGGel{ ///string stream function MG_DLL_DECLR friend std::ostream& operator<< (std::ostream& ostrm, const MGGel& gel); #ifdef FALSE__UNICODE MG_DLL_DECLR friend std::wostream& operator<< (std::wostream& ostrm, const MGGel& gel); #endif public: ////////////Constructor//////////// //Void constructor(初期化なしでオブジェクトを作成する。) //MGGel(); //Copy constructor. //MGGel(const MGGel& obj2); ///Virtual Destructor virtual ~MGGel(); ///Assignment. ///When the leaf objects of this and gel2 are not equal, this assignment ///does nothing. virtual MGGel& operator=(const MGGel& gel2){return *this;}; ///Comparison. virtual bool operator==(const MGGel& gel2)const{return false;}; virtual bool operator!=(const MGGel& gel2)const{return !(operator==(gel2));}; virtual bool operator<(const MGGel& gel2)const; virtual bool operator>(const MGGel& gel2)const{return gel2<(*this);}; ////////////Member Function//////////// /// Output virtual function. virtual std::ostream& out(std::ostream&) const=0; ///IGES output function ///(Default function is no operation to output) ///Function's return value is the directory entry id created. virtual int out_to_IGES( MGIgesOfstream& igesfile, int SubordinateEntitySwitch=0 )const{return 0;}; ///Generate copied gel of this gel. ///Returned is a newed object. User must delete the object. virtual MGGel* clone()const=0; ///Obtain display list name. 0(null) means this gel need not to be displayed. virtual mgVBO* dlist_name()const{return 0;}; ///draw attribute data. virtual void drawAttrib( mgVBO& vbo,///