MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGSnapPositions クラス

MGSnapPositions is a class to store array(vector) of MGPosition's. [詳解]

MGSnapPositions の継承関係図
mgVBO mgVBOElement

公開型

enum  snap_kind {
  DELETE_POINT =-1, nopos =0, endpos, knotpos,
  vertexpos, nearpos, centerpos, ON_SURFACE
}
 
typedef std::vector
< MGPosition >::const_iterator 
const_iterator
 
typedef std::vector
< MGPosition >::iterator 
iterator
 
typedef std::pair< const
MGObject *, int > 
obj_num
 
- 基底クラス mgVBO に属する継承公開型
enum  ELEMENT_TARGET { WIRE =0, SHADING =1, BOTH }
 
typedef MGPvector< mgVBOElementcontainer_type
 
typedef container_type::iterator iterator
 
typedef
container_type::const_iterator 
const_iterator
 

公開メンバ関数

 MGSnapPositions (snap_kind kind=nopos)
 Void constructor. [詳解]
 
 MGSnapPositions (const MGSnapPositions &sp)
 Copy constructor. [詳解]
 
virtual ~MGSnapPositions ()
 Virtual Destructor. [詳解]
 
void append_position_data (std::vector< MGPosition > &points) const
 append this positions in m_positions into points. [詳解]
 
MGSnapPositionsoperator= (const MGSnapPositions &sp)
 Assignment. [詳解]
 
void extract (const MGCurve &crv)
 Extract position data. [詳解]
 
void extract (const MGSurface &srf)
 
void extract (const MGPoint &point)
 
void extract (const MGFace &face)
 
void extract (const MGShell &shell)
 
void extract (const std::list< const MGGel * > &gel_list)
 
void extract (const MGGel &gel)
 
void extract (const MGPickObjects &pobjs)
 
virtual void make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE)
 
void selectionDraw (MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
 
void get_pick_data (const std::set< unsigned > &selected, MGPosition &point, const MGObject *&obj, double &t) const
 
snap_kind get_snap_kind () const
 Get and set the snap_kind. [詳解]
 
void set_snap_kind (snap_kind kind)
 
const MGPositionback () const
 
MGPositionback ()
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
const MGObjectobject (int posID) const
 Get the object of the position posID of m_positions. [詳解]
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
const MGPositionfront () const
 
MGPositionfront ()
 
const MGPositionoperator[] (int i) const
 
MGPositionoperator[] (int i)
 
void pop_back ()
 
void push_back (const MGPosition &pos)
 
size_t size ()
 
const std::vector< MGPosition > & points () const
 Get the point data array. [詳解]
 
std::vector< MGPosition > & points ()
 
- 基底クラス mgVBO に属する継承公開メンバ関数
 mgVBO ()
 非MGAttribedGel用のconstructor. [詳解]
 
 mgVBO (const MGAttribedGel &gel)
 MGAttribedGel用のconstructor. [詳解]
 
 mgVBO (const mgVBO &vbo)
 MGAttribedGel用のconstructor. [詳解]
 
mgVBOoperator= (const mgVBO &vbo)
 Assignment. [詳解]
 
virtual ~mgVBO ()
 
void initializeVBO (MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
 
bool buildVBOHierarchy (mgVBO &parent, std::vector< mgVBO * > &vbos)
 
virtual void draw (MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
 
virtual void redraw (MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
 
void highlight ()
 highlight属性で表示する [詳解]
 
virtual void clearElements (mgVBO::ELEMENT_TARGET target=BOTH)
 Clear all the data. [詳解]
 
virtual void clearStaticAttributes ()
 Static Attributes をすべてdefaultにもどす(display/noDisplayは対象外) [詳解]
 
mgVBOElementback () const
 
mgVBOElementfront () const
 
iterator begin_element ()
 
iterator end_element ()
 
const_iterator begin_element () const
 
const_iterator end_element () const
 
int elementNumber () const
 
void pop_back_element ()
 
void push_back_element (mgVBOElement *elm)
 
unsigned getDName () const
 
MGAttribedGelgel () const
 
virtual GLuint getSelectionName () const
 
virtual bool is_made (MGCL::VIEWMODE viewMode=MGCL::DONTCARE)
 
bool is_InBegin ()
 
virtual void Begin (GLenum type, ELEMENT_TARGET target=WIRE)
 
virtual mgVBOLeafEnd (GLenum polygonMode=GL_FILL)
 
void setDirty (bool is_dirty=true, mgVBO::ELEMENT_TARGET target=BOTH) const
 
void setDrawType (mgGLSL::DrawType drawType)
 
void setTexture (mgTexture *texture)
 
void Color (const MGColor &colr)
 頂点ごとの色を指定する [詳解]
 
void Color3fv (const float colr[3])
 
void Color3dv (const double colr[3])
 
void Color4fv (const float colr[4])
 
void Color4ubv (const unsigned char rgba[4])
 
void Normal (const MGVector &norml)
 頂点ごとのnormalを指定する [詳解]
 
void Normal (float x, float y, float z)
 
void Normal3d (double x, double y, double z)
 
void Normal3fv (const float norml[3])
 
void Normal3dv (const double norml[3])
 
virtual void Vertex (const MGPosition &v)
 頂点の座標値を指定する [詳解]
 
virtual void Vertex (float x, float y, float z=0.0f)
 
virtual void Vertex3d (double x, double y, double z=0.0)
 
virtual void Vertex2fv (const float v[2])
 
virtual void Vertex3fv (const float v[3])
 
virtual void Vertex2dv (const double v[2])
 
virtual void Vertex3dv (const double v[3])
 
void TexCoord (const MGPosition &v)
 頂点ごとのTextureの座標値を指定する [詳解]
 
void TexCoord (float x, float y)
 
void TexCoord2d (double x, double y)
 
void TexCoord2fv (const float v[2])
 
void TexCoord2dv (const double v[2])
 
void setStaticAttribColor (const MGColor &color)
 Static attributeを設定する。 [詳解]
 
void setStaticAttribColor (const float color[4])
 
void setStaticAttribColor (float r, float g, float b)
 
void setStaticAttribLineWidth (GLfloat size)
 
void setStaticAttribPointSize (GLfloat size)
 size<=0. はundefinedを示す [詳解]
 
void setLineStipple (short int factor, GLushort pattern=0)
 size<=0. はundefinedを示す [詳解]
 
void LineWidth (GLfloat size)
 
void disableLinePattern ()
 Line patternをdisableにして実線とする [詳解]
 
void drawGel (const MGAttribedGel &gel)
 gelのmgVBOPointerを作成しmgVBOElementとして追加する。 [詳解]
 
void drawVBOLeaf (const mgVBOLeaf &leaf, ELEMENT_TARGET target=SHADING)
 gelのmgVBOLeafPointerを作成しmgVBOElementとして追加する。 [詳解]
 
void deleteGel (const MGAttribedGel &gel)
 gelのmgVBOPointerをメンバーから外す [詳解]
 
void drawArrow (const MGPosition pos[4])
 
void drawBox (const MGBox &box)
 Draw an object of class MGBox, by wireframe. [詳解]
 
void drawPointSeq (const MGBPointSeq &bp, bool draw_points=true)
 
void drawPointSeq (const MGSPointSeq &sp, bool draw_points=true)
 
void draw3DVertex (const MGObject &obj)
 
void draw3DVertex_in_star (const MGComplex &obj)
 
void draw3DVertex_in_star (const MGCellBase &obj)
 
void drawWire_in_star (const MGComplex &obj)
 
void drawWire_in_star (const MGCellBase &obj)
 
double drawCurvaGraph (const MGCurve &curve, double scale, int density, bool use_radius, bool getLength=false)
 
void drawPoint (double x, double y, double z, double size=-1.)
 
void drawPoint (const MGPosition &pos, double size=-1.)
 
void drawPointInverseColor (double x, double y, double z, double size=-1.)
 
void drawPointInverseColor (const MGPosition &pos, double size=-1.)
 
void drawPointWithColor (double x, double y, double z, double outerSize, double innerSize, const MGColor *colorInner=0, const MGColor *colorOuter=0)
 
void drawPointWithColor (const MGPosition &pos, double outerSize, double innerSize, const MGColor *colorInner=0, const MGColor *colorOuter=0)
 
void drawPoints (const MGColor &boundary_color, const MGColor &inner_color, const std::vector< MGPosition > &ipos, double size=-1.)
 
void drawPolyline (const MGBPointSeq &line, bool closed=false)
 
void drawPolyline (const std::vector< MGPosition > &line, bool closed=false)
 
void drawStraight (const MGPosition &end, const MGPosition &start)
 Draw a line from start to end. [詳解]
 
void drawObjInParameterSpace (const MGObject &obj)
 
void drawRectangle (const MGBox &box)
 Draw the rectangle of a box. [詳解]
 
void drawSurfaceCurvature (const mgTL2Triangles &tld, MGCL::SURFACE_CURVATURE_KIND kind, double lower, double upper)
 OpenGL display for the tessellation lines drawn in world view. [詳解]
 
void drawSurfaceCurvature (const std::vector< mgTL2Triangles > &tldvec, MGCL::SURFACE_CURVATURE_KIND kind, double lower, double upper)
 
void drawShade (const mgTL2Triangles &tris, ELEMENT_TARGET target=SHADING, GLenum polygonMode=GL_FILL)
 OpenGL shading display of a tesselated data tris. [詳解]
 
void drawShade (const std::vector< mgTL2Triangles > &trisVector, ELEMENT_TARGET target=SHADING, GLenum polygonMode=GL_FILL)
 OpenGL shading display of a tesselated data tris. [詳解]
 
void drawSTL (const MGStl &stl, ELEMENT_TARGET target=SHADING, GLenum polygonMode=GL_FILL)
 MGStlオブジェクトを描画する [詳解]
 
void setDrawParam (const MGDrawParam &dpara)
 
GLfloat getPointSize () const
 
GLfloat getLineWidth () const
 
const MGColorstaticColor () const
 
MGColorstaticColor ()
 
void setLightMode (int mode)
 Set light mode. mode=-1:undefined, =0:disabled, =1:enabled. [詳解]
 
int getLightMode ()
 
- 基底クラス mgVBOElement に属する継承公開メンバ関数
 mgVBOElement ()
 
virtual ~mgVBOElement ()
 
virtual mgVBOvboPointer ()
 When this is a mgVBOPointer, return the vbo pointer referenced. [詳解]
 
virtual const mgVBOLeafleafPointer ()
 When this is a mgVBOLeaf, return the mgVBOLeaf pointer. [詳解]
 
virtual void set_display ()
 set_display/set_no_display controls if this mgVBO be displayed or not. [詳解]
 
virtual void set_no_display ()
 
virtual bool getNoDisplayMode () const
 
bool is_no_display () const
 
bool is_display () const
 

その他の継承メンバ

- 基底クラス mgVBOElement に属する継承静的公開メンバ関数
static void setDrawParam (const MGDrawParam &dpara)
 
static MGDrawParamgetDrawParam ()
 
static void setHilightColor (const MGColor &hcolor)
 
static const MGColorgetHilightColor ()
 
static void setDefaultPointSize (GLfloat psize)
 
static GLfloat getDefaultPointSize ()
 
- 基底クラス mgVBO に属する継承限定公開メンバ関数
void execStaticColorAttrib ()
 
virtual void execStaticGLAttrib ()
 
virtual void execModelTypeAttrib ()
 
void setDlName (unsigned name)
 
void setGel (const MGAttribedGel *gel)
 
void setElementTarget (ELEMENT_TARGET target)
 Set Elements target. [詳解]
 
- 基底クラス mgVBO に属する継承限定公開変数類
unsigned m_dname
 
MGAttribedGelm_gel
 name to register in MGDNameControl. [詳解]
 
MGPvector< mgVBOElement > * m_target_elements
 When m_gel=0, this mgVBO is not for an MGAttribedGel but a temporary or non gel's VBO. [詳解]
 
bool m_elementsDirty:1
 
MGPvector< mgVBOElementm_elements
 =true if dirty and need to remake. [詳解]
 
bool m_elementsShadeDirty:1
 
MGPvector< mgVBOElementm_elementsShade
 =true if dirty and need to remake. [詳解]
 
MGColor m_colorStatic
 
GLfloat m_lineWidthStatic
 The color of the following Begin()(mgVBOLeaf generated) is set to this color. [詳解]
 
GLfloat m_pointSizeStatic
 
short int m_stippleFactor
 
GLushort m_LineStipplePattern
 
int m_lightMode
 m_LineStipplePatternindicates the pattern. [詳解]
 
mgGLSL::CoordinateType m_coordinateType
 <0: undefined, =0:Light is disabled, >0:Light is enabled. [詳解]
 
std::auto_ptr< mgVBOLeafBuilder > m_builder
 
- 基底クラス mgVBOElement に属する継承限定公開変数類
bool m_no_display:1
 

詳解

MGSnapPositions is a class to store array(vector) of MGPosition's.

型定義メンバ詳解

typedef std::pair<const MGObject*, int> MGSnapPositions::obj_num

列挙型メンバ詳解

列挙値
DELETE_POINT 
nopos 
endpos 
knotpos 
vertexpos 
nearpos 
centerpos 
ON_SURFACE 

構築子と解体子

MGSnapPositions::MGSnapPositions ( snap_kind  kind = nopos)

Void constructor.

MGSnapPositions::MGSnapPositions ( const MGSnapPositions sp)

Copy constructor.

virtual MGSnapPositions::~MGSnapPositions ( )
virtual

Virtual Destructor.

関数詳解

void MGSnapPositions::append_position_data ( std::vector< MGPosition > &  points) const

append this positions in m_positions into points.

const MGPosition& MGSnapPositions::back ( ) const
inline
MGPosition& MGSnapPositions::back ( )
inline
iterator MGSnapPositions::begin ( )
inline
const_iterator MGSnapPositions::begin ( ) const
inline
void MGSnapPositions::clear ( )
bool MGSnapPositions::empty ( ) const
inline
iterator MGSnapPositions::end ( )
inline
const_iterator MGSnapPositions::end ( ) const
inline
void MGSnapPositions::extract ( const MGCurve crv)

Extract position data.

引数
crvthe curve to extract.
void MGSnapPositions::extract ( const MGSurface srf)
引数
srfthe surface to extract.
void MGSnapPositions::extract ( const MGPoint point)
引数
pointthe curve to extract.
void MGSnapPositions::extract ( const MGFace face)
引数
facethe curve to extract.
void MGSnapPositions::extract ( const MGShell shell)
引数
shellthe surface to extract.
void MGSnapPositions::extract ( const std::list< const MGGel * > &  gel_list)
引数
gel_listthe list to extract.
void MGSnapPositions::extract ( const MGGel gel)
引数
gelthe gel to extract.
void MGSnapPositions::extract ( const MGPickObjects pobjs)
引数
pobjsarray of pick objects to extract.
const MGPosition& MGSnapPositions::front ( ) const
inline
MGPosition& MGSnapPositions::front ( )
inline
void MGSnapPositions::get_pick_data ( const std::set< unsigned > &  selected,
MGPosition point,
const MGObject *&  obj,
double &  t 
) const
引数
point,<selecteddata of pick_to_select_buf.point data will be output.
objpoint's object will be rturned.
tWhen obj is an MGCurve and this snap kind is nearpos, end, or knot, the point's parameter value of the curve will be returned.
snap_kind MGSnapPositions::get_snap_kind ( ) const
inline

Get and set the snap_kind.

virtual void MGSnapPositions::make_display_list ( MGCL::VIEWMODE  vmode = MGCL::DONTCARE)
virtual

mgVBOの既定の処理は次の通り: (1) initializeVBO (2) m_gelの描画データ作成のみをおこなう。 すでに作成済みであっても強制的に再作成を行う。 m_gel=0のときはなにもしない。

mgVBOを再実装しています。

const MGObject* MGSnapPositions::object ( int  posID) const

Get the object of the position posID of m_positions.

MGSnapPositions& MGSnapPositions::operator= ( const MGSnapPositions sp)

Assignment.

const MGPosition& MGSnapPositions::operator[] ( int  i) const
inline
MGPosition& MGSnapPositions::operator[] ( int  i)
inline
const std::vector<MGPosition>& MGSnapPositions::points ( ) const
inline

Get the point data array.

std::vector<MGPosition>& MGSnapPositions::points ( )
inline
void MGSnapPositions::pop_back ( )
inline
void MGSnapPositions::push_back ( const MGPosition pos)
inline
void MGSnapPositions::selectionDraw ( MGCL::VIEWMODE  viewMode = MGCL::DONTCARE)
virtual

描画関数selectionDraw()は、Object選択のための表示処理をする。 通常のdrawとの相違:///Colorとしてm_bufferIDを用い、size処理以外の attributesの処理(normal, texture, color)をしない。

mgVBOを再実装しています。

void MGSnapPositions::set_snap_kind ( snap_kind  kind)
inline
size_t MGSnapPositions::size ( )
inline

このクラス詳解は次のファイルから抽出されました: