MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
PickObject.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
8 
9 #ifndef _MGPickObject_HH_
10 #define _MGPickObject_HH_
11 
12 #include "mg/MGCL.h"
13 #include "mg/GelPosition.h"
14 #include "mg/Position.h"
15 #include <vector>
16 
17 class MGGel;
18 class MGGroup;
19 class MGObject;
20 class MGColor;
21 
26 
39 class MG_DLL_DECLR MGPickObject:public MGGelPosition{
40 
41 public:
42 
44 
46 
48 explicit MGPickObject(MGGroup* group, MGObject* obj=0)
49 :MGGelPosition(group,obj){;};
50 
52 MGPickObject(const MGGelPosition& gelp2):MGGelPosition(gelp2){;};
53 
56  m_parameter=obj2.m_parameter;
57 }
58 
60 virtual ~MGPickObject(){;};
61 
63 
65 virtual MGPickObject& operator=(const MGPickObject& pobj);
66 
67 bool operator<(const MGPickObject& po2)const;
68 bool operator>(const MGPickObject& po2)const{return po2<(*this);};
69 bool operator<=(const MGPickObject& po2)const{return !((*this)>po2);};
70 bool operator>=(const MGPickObject& po2)const{return !(po2>(*this));};
71 
73 
75 virtual MGPickObject* clone()const;
76 
78 virtual void hilight_using_display_list(
79  double span_length,
80  int line_density
81 )const;
82 
84 MGPosition& parameter(){return m_parameter;};
85 const MGPosition& parameter()const{return m_parameter;};
86 
88 void set_parameter(const MGPosition& param){m_parameter=param;};
89 
90 private:
91  MGPosition m_parameter;
92 };
94  // end of MGObjectRelated group
96 #endif
MGPickObject()
Definition: PickObject.h:45
MGPosition & parameter()
Get the parameter value of the object at the picked position.
Definition: PickObject.h:84
virtual ~MGPickObject()
Definition: PickObject.h:60
virtual MGGelPosition * clone() const
Generate a newed clone object.
bool operator<=(const MGPickObject &po2) const
Definition: PickObject.h:69
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
bool operator>(const MGPickObject &po2) const
Definition: PickObject.h:68
MGPickObject(const MGGelPosition &gelp2)
constructor.
Definition: PickObject.h:52
Represent a positional data.
Definition: Position.h:28
MGPickObject(const MGPickObject &obj2)
constructor.
Definition: PickObject.h:55
MGGelPosition is a class to locate where a gel is in a group hierarchy.
Definition: GelPosition.h:39
virtual MGGelPosition & operator=(const MGGelPosition &GelPosition2)
Assignment.
bool operator<(const MGGelPosition &gp2) const
const MGPosition & parameter() const
Definition: PickObject.h:85
MGPickObject is a class to locate where an object is in a group hierarchy.
Definition: PickObject.h:39
MGGroup is a class which constains MGGel elements.
Definition: Group.h:35
MGPickObject(MGGroup *group, MGObject *obj=0)
Constructor of no hierarched group(m_Ghierarcy.size()==0).
Definition: PickObject.h:48
void set_parameter(const MGPosition &param)
Set the object parameter value.
Definition: PickObject.h:88
bool operator>=(const MGPickObject &po2) const
Definition: PickObject.h:70