|
MGCL V10
V10
MGCL V10
|
OpenGL 4 用描画のためのクラス, in other words, display list. [詳解]
公開型 | |
| enum | ELEMENT_TARGET { WIRE =0, SHADING =1, BOTH } |
| typedef MGPvector< mgVBOElement > | container_type |
| typedef container_type::iterator | iterator |
| typedef container_type::const_iterator | const_iterator |
公開メンバ関数 | |
| mgVBO () | |
| 非MGAttribedGel用のconstructor. [詳解] | |
| mgVBO (const MGAttribedGel &gel) | |
| MGAttribedGel用のconstructor. [詳解] | |
| mgVBO (const mgVBO &vbo) | |
| MGAttribedGel用のconstructor. [詳解] | |
| mgVBO & | operator= (const mgVBO &vbo) |
| Assignment. [詳解] | |
| virtual | ~mgVBO () |
| void | initializeVBO (MGCL::VIEWMODE viewMode=MGCL::DONTCARE) |
| bool | buildVBOHierarchy (mgVBO &parent, std::vector< mgVBO * > &vbos) |
| virtual void | make_display_list (MGCL::VIEWMODE vmode=MGCL::DONTCARE) |
| virtual void | draw (MGCL::VIEWMODE viewMode=MGCL::DONTCARE) |
| virtual void | redraw (MGCL::VIEWMODE viewMode=MGCL::DONTCARE) |
| virtual void | selectionDraw (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は対象外) [詳解] | |
| mgVBOElement * | back () const |
| mgVBOElement * | front () 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 |
| MGAttribedGel * | gel () 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 mgVBOLeaf * | End (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 MGColor & | staticColor () const |
| MGColor & | staticColor () |
| void | setLightMode (int mode) |
| Set light mode. mode=-1:undefined, =0:disabled, =1:enabled. [詳解] | |
| int | getLightMode () |
基底クラス mgVBOElement に属する継承公開メンバ関数 | |
| mgVBOElement () | |
| virtual | ~mgVBOElement () |
| virtual mgVBO * | vboPointer () |
| When this is a mgVBOPointer, return the vbo pointer referenced. [詳解] | |
| virtual const mgVBOLeaf * | leafPointer () |
| 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 |
限定公開メンバ関数 | |
| 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. [詳解] | |
限定公開変数類 | |
| unsigned | m_dname |
| MGAttribedGel * | m_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< mgVBOElement > | m_elements |
| =true if dirty and need to remake. [詳解] | |
| bool | m_elementsShadeDirty:1 |
| MGPvector< mgVBOElement > | m_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 |
その他の継承メンバ | |
基底クラス mgVBOElement に属する継承静的公開メンバ関数 | |
| static void | setDrawParam (const MGDrawParam &dpara) |
| static MGDrawParam & | getDrawParam () |
| static void | setHilightColor (const MGColor &hcolor) |
| static const MGColor & | getHilightColor () |
| static void | setDefaultPointSize (GLfloat psize) |
| static GLfloat | getDefaultPointSize () |
OpenGL 4 用描画のためのクラス, in other words, display list.
基本的な描画のためのツールとOpenGL4を使用した描画機構を提供する。
******利用上の手順****** (1) MGAttribedGel用のmgVBOは、mgVBO(const MGAttribedGel&)のconstructorを利用して構築し、 必要に応じてdrawXXXまたはBegin-BndによりmgVBOに追加のmgVBOLeafを作成しm_gelの描画データを作成する。 非MGAttribedGelのmgVBOはdrawXXX, begin()-end()を利用して描画データ作成処理(make_display_list())を行う。 作成が終了したらsetDirty(false)により、作成完了を宣言する。 mgVBOはsetDirty(false)により描画データ作成完了宣言されていない場合にdraw()が呼ばれたとき、 必ずmake_dipslay_list()を呼び出す。 (2) draw()により描画処理をする。 MGAttribedGel用のmgVBOに対してはmake_display_list()をせず、いきなりdraw()を呼び出してもよい。 setDirty(false)が発信されていない場合、mgVBOはmake_display_list()を発信し、描画データ 作成処理を行ったのち、drawを行う。
draw()/make_display_list()を呼ぶ前には種類の異なる複数の図形の作成を行っても よい(drawXXX, begin()-end())が、draw()/make_display_list()までに作成した図形は draw()/make_display_list()によりひとまとめの扱いとなる。 描画関数draw()はメンバーデータの各mgVBOElementに対してdraw()を発信する。
Begin()-Bnd()で囲まれた場合、必ずひとつのmgVBOLeafが作成される。ひとつであることは 保障される。すべてのdrawXXXは、一つまたは一つ以上のmgVBOLeafをdraw()のために 作成する(make_display_list)だけで実際の描画は行わない。
mgVBOはmgVBOLeafとmgVBO自身(VBOPointer)をelementとして保持する。 mgVBOをelementとするのはMGGroupまたはMGShellのメンバーデータの表示情報を 保持するため。これ以外のMGObjectはmgVBOLeaf(一般には複数)をelementとして保持する
| typedef MGPvector<mgVBOElement> mgVBO::container_type |
| mgVBO::mgVBO | ( | ) |
非MGAttribedGel用のconstructor.
| mgVBO::mgVBO | ( | const MGAttribedGel & | gel | ) |
MGAttribedGel用のconstructor.
| mgVBO::mgVBO | ( | const mgVBO & | vbo | ) |
MGAttribedGel用のconstructor.
|
virtual |
|
inline |
|
virtual |
typeのmgVBOLeafをひとつ(Begin-Endでひとつ)作成して追加する。 targetはBegin()-End()で作成されるmgVBOLeafをどのelementに入れるかを示す。 target=WIRE:Wire(highlight用のelement(m_elements) target=SHADING:Shading用のelement(m_elementsShade). typeは次のものを可とする(GL_xxxxのxxxxを示す) POINTS,LINES,LINE_STRIP,LINE_LOOP,TRIANGLE_FAN,TRIANGLE_STRIP,QUAD_STRIP. Begin()–End()でひとつのmgVBOLeafとされることが保証される。 ここで作成されるmgVBOLeafのstaticAttributesは現在このmgVBOに設定されている 属性とされる。
|
inline |
|
inline |
Build VBO hierarchy. Let n=vbos.size(), then vbos[i] includes vbos[i+1] as mgVBOPointer for i=0,...,n-2. vbos[0]=&parent, and vbos[n-1] = this mgVBO. Function's return value is true if found, false if not.
| parent | Parent mgVBO that may include this vbo as its child or the descendant. |
| vbos | VBO hierarchy is output. |
|
virtual |
Clear all the data.
|
virtual |
Static Attributes をすべてdefaultにもどす(display/noDisplayは対象外)
| void mgVBO::Color | ( | const MGColor & | colr | ) |
頂点ごとの色を指定する
| void mgVBO::Color3dv | ( | const double | colr[3] | ) |
| void mgVBO::Color3fv | ( | const float | colr[3] | ) |
| void mgVBO::Color4fv | ( | const float | colr[4] | ) |
| void mgVBO::Color4ubv | ( | const unsigned char | rgba[4] | ) |
| void mgVBO::deleteGel | ( | const MGAttribedGel & | gel | ) |
gelのmgVBOPointerをメンバーから外す
| void mgVBO::disableLinePattern | ( | ) |
Line patternをdisableにして実線とする
|
virtual |
描画関数draw()は、is_made()であれば、作成し、表示処理をする。 is_made()(描画データ作成済み)であれば、すでに作成されたmgVBOElementの描画を行う。
mgVBOElementを実装しています。
| void mgVBO::draw3DVertex | ( | const MGObject & | obj | ) |
| void mgVBO::draw3DVertex_in_star | ( | const MGComplex & | obj | ) |
| void mgVBO::draw3DVertex_in_star | ( | const MGCellBase & | obj | ) |
| void mgVBO::drawArrow | ( | const MGPosition | pos[4] | ) |
| double mgVBO::drawCurvaGraph | ( | const MGCurve & | curve, |
| double | scale, | ||
| int | density, | ||
| bool | use_radius, | ||
| bool | getLength = false |
||
| ) |
Draw curvature variation graph so-called Hige. Function's return value is the maximum length of the graph.
| curve | The target curve. |
| scale | Scale of the graph. |
| density | Dinsity of the graph. |
| use_radius | Indicates if curvature is used(=false) or curvature radius(=true). |
| getLength | When getLength=true, drawCurvaGraph does not draw the graw. Instead, drawCurvaGraph computes the maximum length of the graph, only returns the value as the function's return value. |
| void mgVBO::drawGel | ( | const MGAttribedGel & | gel | ) |
gelのmgVBOPointerを作成しmgVBOElementとして追加する。
以下のdrawXXXはすべてひとつまたは一つ以上のmgVBOLeafをdraw()のために 作成するだけで実際の描画は行わない。
| void mgVBO::drawObjInParameterSpace | ( | const MGObject & | obj | ) |
| void mgVBO::drawPoint | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | size = -1. |
||
| ) |
Draw a point using openGL functions. Drawing is done twice for inner and outer. size is the outer point size. The inner point size is outer size-2. If size<=0., mgVBOElement::getDefaultPointSize() is used. The outer point color is the VBO's color, and the inner is white.
| void mgVBO::drawPoint | ( | const MGPosition & | pos, |
| double | size = -1. |
||
| ) |
| void mgVBO::drawPointInverseColor | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | size = -1. |
||
| ) |
| void mgVBO::drawPointInverseColor | ( | const MGPosition & | pos, |
| double | size = -1. |
||
| ) |
| void mgVBO::drawPoints | ( | const MGColor & | boundary_color, |
| const MGColor & | inner_color, | ||
| const std::vector< MGPosition > & | ipos, | ||
| double | size = -1. |
||
| ) |
draw points sequence ipos with 2 colors, inner and outer. The outer point size is obtained from the VBO's StaticAttribSize. The inner point size is outer size-2.
| void mgVBO::drawPointSeq | ( | const MGBPointSeq & | bp, |
| bool | draw_points = true |
||
| ) |
Draw a control points, dotted lines shall be drawn between point[i-1] and point[i], for i = 1, .., length()-1.
| bp | Target points. |
| draw_points | True if points be drawn. |
| void mgVBO::drawPointSeq | ( | const MGSPointSeq & | sp, |
| bool | draw_points = true |
||
| ) |
| sp | Target points. |
| draw_points | True if points be drawn. |
| void mgVBO::drawPointWithColor | ( | double | x, |
| double | y, | ||
| double | z, | ||
| double | outerSize, | ||
| double | innerSize, | ||
| const MGColor * | colorInner = 0, |
||
| const MGColor * | colorOuter = 0 |
||
| ) |
Draw a point with color. When innerSize<=0., only outer point is drawn. The outer point color is the VBO's color if not input, and the inner is white if not input.
| void mgVBO::drawPointWithColor | ( | const MGPosition & | pos, |
| double | outerSize, | ||
| double | innerSize, | ||
| const MGColor * | colorInner = 0, |
||
| const MGColor * | colorOuter = 0 |
||
| ) |
Draw a point with color. When innerSize<=0., only outer point is drawn. The outer point color is the VBO's color if not input, and the inner is white if not input.
| void mgVBO::drawPolyline | ( | const MGBPointSeq & | line, |
| bool | closed = false |
||
| ) |
Draw a polyline using openGL functions. When clodes=true, 1st and last points will be connected.
| void mgVBO::drawPolyline | ( | const std::vector< MGPosition > & | line, |
| bool | closed = false |
||
| ) |
Draw a polyline using openGL functions. When cloded=true, 1st and last points will be connected.
| void mgVBO::drawRectangle | ( | const MGBox & | box | ) |
Draw the rectangle of a box.
| void mgVBO::drawShade | ( | const mgTL2Triangles & | tris, |
| ELEMENT_TARGET | target = SHADING, |
||
| GLenum | polygonMode = GL_FILL |
||
| ) |
OpenGL shading display of a tesselated data tris.
| tris | target triangulated data to draw. |
| target | When target=WIRE, built elements are |
| polygonMode | stored as wire mode display, else as shading mode display |
| void mgVBO::drawShade | ( | const std::vector< mgTL2Triangles > & | trisVector, |
| ELEMENT_TARGET | target = SHADING, |
||
| GLenum | polygonMode = GL_FILL |
||
| ) |
OpenGL shading display of a tesselated data tris.
| trisVector | target triangulated data to draw. |
| target | When target=WIRE, built elements are |
| polygonMode | stored as wire mode display, else as shading mode display |
| void mgVBO::drawSTL | ( | const MGStl & | stl, |
| ELEMENT_TARGET | target = SHADING, |
||
| GLenum | polygonMode = GL_FILL |
||
| ) |
MGStlオブジェクトを描画する
| stl | 描画するMGStlオブジェクト |
| target | When target=WIRE, built elements are stored as wire mode display, else as shading mode display |
| polygonMode | Polygon mode to draw, GLPOINT, GL_LINE, or GLFILL. |
| void mgVBO::drawStraight | ( | const MGPosition & | end, |
| const MGPosition & | start | ||
| ) |
Draw a line from start to end.
| void mgVBO::drawSurfaceCurvature | ( | const mgTL2Triangles & | tld, |
| MGCL::SURFACE_CURVATURE_KIND | kind, | ||
| double | lower, | ||
| double | upper | ||
| ) |
OpenGL display for the tessellation lines drawn in world view.
OpenGL display for the tessellation lines drawn in parameter view. Renders curvatures mapping that comes into colorful image. A point whose curvature is within [lower, upper], the color varies.
| void mgVBO::drawSurfaceCurvature | ( | const std::vector< mgTL2Triangles > & | tldvec, |
| MGCL::SURFACE_CURVATURE_KIND | kind, | ||
| double | lower, | ||
| double | upper | ||
| ) |
Renders curvatures mapping that comes into colorful image. A point whose curvature is within [lower, upper], the color varies.
| tldvec | target triangulated data to draw. |
| kind | Curvature kind, see MGCL.h. |
| lower | Minimum value of the curvatures. |
| upper | Maximum value of the curvatures of the kind. |
| void mgVBO::drawVBOLeaf | ( | const mgVBOLeaf & | leaf, |
| ELEMENT_TARGET | target = SHADING |
||
| ) |
gelのmgVBOLeafPointerを作成しmgVBOElementとして追加する。
| leaf | leaf to add as mgVBOElement. |
| target | When target=WIRE, built elements are stored as wire mode display, else as shading mode display |
| void mgVBO::drawWire_in_star | ( | const MGComplex & | obj | ) |
Draw 3D curve in the topology's star cell world coordinates. The object is converted to curve(s) and is drawn.
| void mgVBO::drawWire_in_star | ( | const MGCellBase & | obj | ) |
|
inline |
|
virtual |
Begin()で始めたVBOをひとつのmgVBOLeafとして作成、追加する。 polygonModeはBegin()のtypeがGL_QUAD_STRIP, GL_TRIANGLES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN の際にのみ有効で、そのPolygonMode(GL_POINT, GL_LINE, GL_FILL)を指定する。 作成されたmgVBOElement*が返されるがこのmgVBOElementはmgVBOが所有している。 nullが返却されたとき、作成に失敗。
|
inline |
|
inline |
|
protectedvirtual |
execModelTypeAttribは固有のuniform値をセットするために Overrideする場合があるので、virtualはつけておいてください。
VBObyAnchorPtで再実装されています。
|
inlineprotected |
|
protectedvirtual |
execStaticGLAttribは固有のuniform値をセットするために Overrideする場合があるので、virtualはつけておいてください。
|
inline |
|
inline |
|
inlinevirtual |
Obtain display list name. 0(null) はこのmgVBOElementはmgVBOLeafであり、名前をもたないことを示す。 名前はmgVBOだけが持つ
mgVBOElementを実装しています。
|
inline |
| GLfloat mgVBO::getLineWidth | ( | ) | const |
| GLfloat mgVBO::getPointSize | ( | ) | const |
|
virtual |
Selectionに設定する名前を求める。=0のとき、名前の設定処理をしない。 0(null) はこのmgVBOElementはmgVBOLeafであり、名前をもたないことを示す。 名前はmgVBOだけが持つ
mgVBOElementを実装しています。
| void mgVBO::highlight | ( | ) |
highlight属性で表示する
| void mgVBO::initializeVBO | ( | MGCL::VIEWMODE | viewMode = MGCL::DONTCARE | ) |
VBO dataを初期化する。 (1) display modeを表示にする (2) viewModeに従い、clearElements()をする (3) clearStaticAttributes()発信 (4) gel用のvboであれば、drawAttrib()発信
| bool mgVBO::is_InBegin | ( | ) |
現在Begin()されているかどうかを調べる。Begin()され、End()の前であれば trueを返す
|
virtual |
このmgVBOElementがnull(いまだdraw/make_display_list()処理されていない)かを判定 mgVBOはm_gelに対するmake_display_list()処理がなされていないときfalseが返される
mgVBOElementを実装しています。
|
inline |
|
virtual |
mgVBOの既定の処理は次の通り: (1) initializeVBO (2) m_gelの描画データ作成のみをおこなう。 すでに作成済みであっても強制的に再作成を行う。 m_gel=0のときはなにもしない。
mgVBOElementを実装しています。
MGConstructionPlane, MGSnapPositions, mgSysGLで再実装されています。
| void mgVBO::Normal | ( | const MGVector & | norml | ) |
頂点ごとのnormalを指定する
| void mgVBO::Normal | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
| void mgVBO::Normal3d | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
| void mgVBO::Normal3dv | ( | const double | norml[3] | ) |
| void mgVBO::Normal3fv | ( | const float | norml[3] | ) |
|
inline |
|
inline |
|
virtual |
draw()はmgVBOLeafが作成済み(not null)であれば作成処理を行わないが、 redraw()は強制的に再作成を行い描画処理をおこなう。
mgVBOElementを実装しています。
|
virtual |
描画関数selectionDraw()は、Object選択のための表示処理をする。 通常のdrawとの相違:///Colorとしてm_bufferIDを用い、size処理以外の attributesの処理(normal, texture, color)をしない。
mgVBOElementを実装しています。
MGSnapPositionsで再実装されています。
| void mgVBO::setDirty | ( | bool | is_dirty = true, |
| mgVBO::ELEMENT_TARGET | target = BOTH |
||
| ) | const |
Set dirty flag(s) of m_elements or m_elementsShade. is_dirty is true if dirty and need to remake.
|
inlineprotected |
|
inline |
Set the draw param. This is applied to all the make_display_list ofmgVBO after setDrawParam().
| void mgVBO::setDrawType | ( | mgGLSL::DrawType | drawType | ) |
Function IDをセットする. setFunctionID()はBegin()-End()の間でのみ有効。
|
protected |
Set Elements target.
|
protected |
|
inline |
Set light mode. mode=-1:undefined, =0:disabled, =1:enabled.
| void mgVBO::setLineStipple | ( | short int | factor, |
| GLushort | pattern = 0 |
||
| ) |
size<=0. はundefinedを示す
Line stipple属性をセットする。 When factor=0 is input, line pattern is disabled. 実線となる When factor<0, the stipple attribute is undefined. This means the attribute is defined by the environment. When factor<=0, pattern is unnecessary.
| void mgVBO::setStaticAttribColor | ( | const MGColor & | color | ) |
Static attributeを設定する。
begin()-end()の間であればそのmgVBOLeafに対してだけ適用され、 begin()-end()の外であればその後に作成される(setStaticAttribXXXをうちに持たない) begin()-end()のmgVBOLeafすべてに適用される。
| void mgVBO::setStaticAttribColor | ( | const float | color[4] | ) |
| void mgVBO::setStaticAttribColor | ( | float | r, |
| float | g, | ||
| float | b | ||
| ) |
| void mgVBO::setStaticAttribLineWidth | ( | GLfloat | size | ) |
| void mgVBO::setStaticAttribPointSize | ( | GLfloat | size | ) |
size<=0. はundefinedを示す
| void mgVBO::setTexture | ( | mgTexture * | texture | ) |
Textureをset/getする。 textureは参照するのみ setTexture()はBegin()-End()の間でのみ有効。
|
inline |
|
inline |
| void mgVBO::TexCoord | ( | const MGPosition & | v | ) |
頂点ごとのTextureの座標値を指定する
| void mgVBO::TexCoord | ( | float | x, |
| float | y | ||
| ) |
| void mgVBO::TexCoord2d | ( | double | x, |
| double | y | ||
| ) |
| void mgVBO::TexCoord2dv | ( | const double | v[2] | ) |
| void mgVBO::TexCoord2fv | ( | const float | v[2] | ) |
|
virtual |
頂点の座標値を指定する
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
virtual |
mgVBOByScreenで再実装されています。
|
protected |
|
protected |
is stored in m_elements. When m_elementsShade.size()=0 and m_gel->manifold_dimension()>=2, this means m_gel's shading data is not made yet.
|
protected |
<0: undefined, =0:Light is disabled, >0:Light is enabled.
CoorinateType
|
protected |
|
protected |
=true if dirty and need to remake.
VBO data for drawWire or highlight. Shading data
|
mutableprotected |
|
protected |
=true if dirty and need to remake.
VBO data for shading. Ths highlight data
|
mutableprotected |
is stored in m_elementsShade if exist. When m_elements.size()=0, this means this VBO's display data is not made yet. m_gel's display list will be made to draw elements by calling m_gel->make_display_list(). When m_elements.size()!=0, the display lists are already made and m_elements includes the elements.
|
protected |
name to register in MGDNameControl.
MGAttribedGel of this mgVBO.
|
protected |
m_LineStipplePatternindicates the pattern.
light modeはm_elementsShadeに対してのみ有効。m_elementsに対しては常にlightはオフ
|
protected |
Line stipple factor. If m_stippleFactor=0, line Stipple is disabled. m_stippleFactor<0, line stipple is undefined.
|
protected |
The color of the following Begin()(mgVBOLeaf generated) is set to this color.
Color specified by setStaticAttribColor().
|
protected |
|
protected |
|
protected |
When m_gel=0, this mgVBO is not for an MGAttribedGel but a temporary or non gel's VBO.