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

Defines parameters to draw MGObject, maily to approximate by lines and facets. [詳解]

公開メンバ関数

 MGDrawParam (double curve_tolerance=-1., double surface_tolerance=-1., double maximum_edge_length=-1., double span_length_wire=20, int line_desity_wire_face=1)
 
 MGDrawParam (const MGObject &obj, double span_length_wire=20)
 Construct from a object(box) data and the span length to draw object. [詳解]
 
 MGDrawParam (const MGContext &contx, double span_length_wire=20)
 Constructor. [詳解]
 
 MGDrawParam (const mgTLInputParam &tlpara)
 Conversion constructor. [詳解]
 
double span_length_wire () const
 
int line_desity_wire_face () const
 
double curve_tolerance_tess () const
 
double surface_tolerance_tess () const
 
double maximum_edge_length_tess () const
 
void set_line_density (int line_density=1)
 
void set_span_length (double span_length)
 
void set_maximum_edge_length_tess (double maximum_edge_length)
 

フレンド

MG_DLL_DECLR friend std::ostream & operator<< (std::ostream &out, const MGDrawParam &para)
 
MG_DLL_DECLR friend MGOfstreamoperator<< (MGOfstream &buf, const MGDrawParam &para)
 
MG_DLL_DECLR friend MGIfstreamoperator>> (MGIfstream &buf, MGDrawParam &para)
 

詳解

Defines parameters to draw MGObject, maily to approximate by lines and facets.

  1. To approximate the objects to draw in wire mode. m_span_length_wire and m_line_desity_wire_face are used for the wire mode.
  2. To approoximate the objects(faces or surfaces) to draw in shding mode. m_curve_tolerance, m_surface_tolerance, and m_maximum_edge_length are used for the shading mode.

(1) m_span_length_wire: Used for the approximation of a curve by a polyline. m_span_length_wire is the maximum length of the one line segment of the polyline. (2) m_line_desity_wire_face: Used for the approximation of a surface by polylines. All of the curves(boundary or inner lines) are approximated by m_span_length_wire. And m_line_desity_wire_face indicates how many wires be drawn for the inner lines of the wire representation of the face. (3) m_curve_tolerance: The maximum deviation from a curve allowed for the tessellaiton of a surface. The length of the one line segment of this approximation is limitted by m_maximum_edge_length. (4) m_surface_tolerance: The maximum deviation allowed of a traiangle from surfaces forn the tessellation. (5) m_maximum_edge_length: The maximum length of a triangle of the tessellation.

The minimum parameter to construct MGDrawParam object is m_line_desity_wire_face. All of the other parameters can be derived from objects to draw and m_line_desity_wire_face.

構築子と解体子

MGDrawParam::MGDrawParam ( double  curve_tolerance = -1.,
double  surface_tolerance = -1.,
double  maximum_edge_length = -1.,
double  span_length_wire = 20,
int  line_desity_wire_face = 1 
)
引数
curve_toleranceMaximum deviation allowed to approximate curves.
surface_toleranceMaximum deviation allowed to approximate surfaces.
maximum_edge_lengthMaximum edge length for the tessellation.
span_length_wirelength of a line segment to approximate curves.
line_desity_wire_faceIndicates how many wires be drawn for the inner lines of the wire representation of the face.
MGDrawParam::MGDrawParam ( const MGObject obj,
double  span_length_wire = 20 
)

Construct from a object(box) data and the span length to draw object.

引数
objTarget object to get box.
span_length_wirespan length.
MGDrawParam::MGDrawParam ( const MGContext contx,
double  span_length_wire = 20 
)

Constructor.

引数
contxContext to get from.
span_length_wirespan length.
MGDrawParam::MGDrawParam ( const mgTLInputParam tlpara)

Conversion constructor.

関数詳解

double MGDrawParam::curve_tolerance_tess ( ) const
inline
int MGDrawParam::line_desity_wire_face ( ) const
inline
double MGDrawParam::maximum_edge_length_tess ( ) const
inline
void MGDrawParam::set_line_density ( int  line_density = 1)
inline
void MGDrawParam::set_maximum_edge_length_tess ( double  maximum_edge_length)
inline
void MGDrawParam::set_span_length ( double  span_length)
inline
double MGDrawParam::span_length_wire ( ) const
inline
double MGDrawParam::surface_tolerance_tess ( ) const
inline

フレンドと関連関数の詳解

MG_DLL_DECLR friend std::ostream& operator<< ( std::ostream &  out,
const MGDrawParam para 
)
friend
MG_DLL_DECLR friend MGOfstream& operator<< ( MGOfstream buf,
const MGDrawParam para 
)
friend
MG_DLL_DECLR friend MGIfstream& operator>> ( MGIfstream buf,
MGDrawParam para 
)
friend

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