6 #if !defined(AFX_SNAPATTRIB_H__3704A1F4_AAA3_4021_98F4_087C5A16006B__INCLUDED_)
7 #define AFX_SNAPATTRIB_H__3704A1F4_AAA3_4021_98F4_087C5A16006B__INCLUDED_
48 bool bEnd=
false,
bool bKnot=
false,
bool bNear=
false,
bool bVertex=
false,
49 bool bCenter=
false,
bool bGrid=
false,
bool bOrtho=
false
53 const std::bitset<32>& bits
63 m_dSnapAperture[0] = Aperture[0];
64 m_dSnapAperture[1] = Aperture[1];
67 m_dSnapAperture[0]=float(x);m_dSnapAperture[1]=float(y);};
69 bool getEnd()
const {
return m_bitset[BIT_END];};
70 void setEnd(
bool bEnd) {m_bitset[BIT_END] = bEnd;};
72 bool getKnot()
const {
return m_bitset[BIT_KNOT];};
73 void setKnot(
bool bKnot) {m_bitset[BIT_KNOT] = bKnot;};
75 bool getNear()
const {
return m_bitset[BIT_NEAR];};
76 void setNear(
bool bNear) {m_bitset[BIT_NEAR] = bNear;};
78 bool getVertex()
const {
return m_bitset[BIT_VERTEX];};
79 void setVertex(
bool bVertex) {m_bitset[BIT_VERTEX] = bVertex;};
81 bool getCenter()
const {
return m_bitset[BIT_CENTER];};
82 void setCenter(
bool bCenter) {m_bitset[BIT_CENTER] = bCenter;};
84 bool getGrid()
const {
return m_bitset[BIT_GRID];};
85 void setGrid(
bool bGrid) {m_bitset[BIT_GRID] = bGrid;};
87 bool getOrtho()
const{
return m_bitset[BIT_ORTHO];}
88 void setOrtho(
bool bOrtho){ m_bitset[BIT_ORTHO] = bOrtho;}
93 bool any()
const{
return m_bitset.any();}
96 bool none()
const{
return m_bitset.none();}
99 int count()
const{
return int(m_bitset.count());}
106 std::bitset<32> m_bitset;
107 float m_dSnapAperture[2];
110 #endif // !defined(AFX_SNAPATTRIB_H__3704A1F4_AAA3_4021_98F4_087C5A16006B__INCLUDED_)
void setGrid(bool bGrid)
Definition: SnapAttrib.h:85
void setCenter(bool bCenter)
Definition: SnapAttrib.h:82
bool getVertex() const
Definition: SnapAttrib.h:78
void clear_attrib()
clear all the attrib to false;
Definition: SnapAttrib.h:102
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
void setVertex(bool bVertex)
Definition: SnapAttrib.h:79
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
void setEnd(bool bEnd)
Definition: SnapAttrib.h:70
void setSnapAperture(double x, double y)
Definition: SnapAttrib.h:66
void setSnapAperture(const float Aperture[2])
Definition: SnapAttrib.h:62
bool getCenter() const
Definition: SnapAttrib.h:81
void setKnot(bool bKnot)
Definition: SnapAttrib.h:73
Defines Snap attributes.
Definition: SnapAttrib.h:26
void setNear(bool bNear)
Definition: SnapAttrib.h:76
bool any() const
Test if any of the attributes are set on. If on, return true.
Definition: SnapAttrib.h:93
bool getNear() const
Definition: SnapAttrib.h:75
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
bool getKnot() const
Definition: SnapAttrib.h:72
bool getEnd() const
Definition: SnapAttrib.h:69
const float * getSnapAperture() const
virtual ~MGSnapAttrib();
Definition: SnapAttrib.h:61
bool getGrid() const
Definition: SnapAttrib.h:84
bool getOrtho() const
Definition: SnapAttrib.h:87
bool none() const
Test if none of the attributes is set on. If none is on, return true.
Definition: SnapAttrib.h:96
void setOrtho(bool bOrtho)
Definition: SnapAttrib.h:88
int count() const
Get the number of attributes that are on.
Definition: SnapAttrib.h:99