/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGObject_HH_ #define _MGObject_HH_ #include "mg/MGCL.h" #include "mg/Pvector.h" #include "mg/drawParam.h" #include "mg/Plist.h" #include "mg/Position.h" #include "mg/isects.h" #include "mg/AttribedGel.h" // //Define MGObject Class. class MGIfstream; class MGOfstream; class MGBox; class MGVector; class MGMatrix; class MGTransf; class MGObject; class MGGeometry; class MGTopology; class MGPoint; class MGStraight; class MGCurve; class MGFSurface; class MGSurface; class MGFace; class MGShell; class mgTL2Triangles; /** @defgroup MGObjectRelated Object Related class * MGObject is top abstract class for MGPoint, MGCurve, and MGSurface. * @{ */ ///Is an abstract class which represents a whole geometry and a topology. class MG_DLL_DECLR MGObject:public MGAttribedGel{ public: ////////////Constructor//////////// ///Void constructor(初期化なしでオブジェクトを作成する。) MGObject(); ///Copy constructor. MGObject(const MGObject& obj2); ///Virtual Destructor virtual ~MGObject(); ///Assignment. ///When the leaf object of this and gel2 are not equal, this assignment ///does nothing. virtual MGObject& operator=(const MGObject& obj2){return set_object(obj2);}; ///Object transformation. virtual MGObject& operator+=(const MGVector& v)=0; virtual MGObject& operator-=(const MGVector& v)=0; virtual MGObject& operator*=(double scale)=0; virtual MGObject& operator*=(const MGMatrix& mat)=0; virtual MGObject& operator*=(const MGTransf& tr)=0; ////////////Member Function//////////// /// Output virtual function. virtual std::ostream& out(std::ostream&) const; ///Get the MGAppearance pointer of this object. If not defined, null will be ///returned. ///See ensure_appearance(). MGAppearance* appearance(){return m_appearance;}; const MGAppearance* appearance()const{return m_appearance;}; ///Get the box of the object. virtual const MGBox& box() const=0; ///Construct new object by copying to newed area. ///User must delete this copied object by "delete". virtual MGObject* clone() const=0; ///Draw the object in wire mode, in the world coordinates. ///The object is converted to curve(s) and is drawn. virtual void drawWire( mgVBO& vbo,///