/********************************************************************/ /* Copyright (c) 2017 System fugen G.K. and Yuzi Mizuno */ /* All rights reserved. */ /********************************************************************/ #ifndef _MGPoint_HH_ #define _MGPoint_HH_ #include "mg/Geometry.h" #include "mg/Position.h" #include "mg/isects.h" class MGIfstream; class MGOfstream; class MGInterval; class MGBox; class MGVector; class MGPosition_list; class MGMatrix; class MGTransf; /** @addtogroup GEO * @{ */ ///MGPoint represents one dimensional manifold, a point in a space. ///See MGPosition class, which is recommended to use usually. class MG_DLL_DECLR MGPoint:public MGGeometry{ public: //////////// Constructor //////////// ///Void constructor(初期化なしでオブジェクトを作成する。) MGPoint(); ///Construct a point from a position. MGPoint(const MGPosition& P); ///Construct a point by changing the space dimension or ordering ///the space dimension element. MGPoint( int sdim, ///(*this);}; ////////// Member Function //////////// ///Return minimum box that includes the geometry of parameter interval. /// 入力のパラメータ範囲の曲線部分を囲むボックスを返す。 /*MGBox box( const MGBox& bx /// Parameter Range of the geometry. ///bx's space dimension is manifold dimension ///of the geometry. ) const; */ ///Obtain ceter coordinate of the geometry. MGPosition center() const{return m_point;}; ///Obtain ceter parameter value of the geometry. MGPosition center_param() const{ return MGPosition();}; ///Changing this object's space dimension. MGPoint& change_dimension( int sdim, ///< new space dimension int start1=0, ///< Destination order of new object. int start2=0 ///< Source order of this object. ); ///Construct new geometry object by copying to newed area. ///User must delete this copied object by "delete". MGPoint* clone() const; ///Construct new geometry object by changing ///the original object's space dimension. ///User must delete this copied object by "delete". MGPoint* copy_change_dimension( int sdim, ///< new space dimension int start1=0, ///< Destination order of new line. int start2=0 ///< Source order of this line. )const; ///Compute direction unit vector of the geometry. ///For the point, this is undefined. MGUnit_vector direction(const MGPosition& param) const; ///Draw 3D curve in world coordinates. ///The object is converted to curve(s) and is drawn. void drawWire( mgVBO& vbo,///0 if the point is on the geometry, /// and 0 if the point is not on the geometry. bool on( const MGPosition& P,///