MGCL V10
V10
MGCL V10
|
MGPosition_list provides a list of Positions. [詳解]
公開型 | |
typedef std::list< MGPosition > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
公開メンバ関数 | |
MGPosition_list () | |
Void constructor(Constructor of length 0). [詳解] | |
MGPosition_list (const MGPosition &P) | |
Constructor of length 1. [詳解] | |
MGPosition_list (const MGPosition_list &list, int start1, int start2) | |
~MGPosition_list () | |
bool | append (const MGPosition &pos) |
void | push_back (const MGPosition &pos) |
bool | append (const MGCurve &crv1, const MGCurve &crv2, const MGPosition &p) |
void | append (const MGCurve &crv1, const MGCurve &crv2, const MGPosition_list &list) |
bool | append (const MGFSurface &srf, const MGPosition &uv) |
void | append (const MGFSurface &srf, const MGPosition_list &list) |
bool | append (const MGCurve &crv, const MGFSurface &srf, const MGPosition &tuv) |
bool | append (const MGFSurface &srf1, const MGFSurface &srf2, const MGPosition &uvuv) |
void | append (const MGFSurface &srf1, const MGFSurface &srf2, const MGPosition_list &list) |
Add parameter pair uvuv of surface srf1 and sur2 to the end of list. [詳解] | |
iterator | begin () |
Get the pointer of the first element of the m_Plist. [詳解] | |
const_iterator | begin () const |
void | clear () |
Clear all the elements in m_Plist. [詳解] | |
iterator | end () |
Get the pointer of the next of the last element of the m_Plist. [詳解] | |
const_iterator | end () const |
int | entries () const |
Returns the number of items that are in the list. [詳解] | |
int | size () const |
iterator | erase (iterator i) |
const MGPosition & | first () const |
const MGPosition & | front () const |
MGPosition & | first () |
MGPosition & | front () |
bool | in (const MGBox &box, const_iterator &id, int n=0) const |
bool | in (const MGBox &box, iterator &id, int n=0) |
void | insertAt (iterator i, const MGPosition &pos) |
bool | isEmpty () const |
bool | empty () const |
const MGPosition & | last () const |
const MGPosition & | back () const |
MGPosition & | last () |
MGPosition & | back () |
void | pop_back () |
Erase the last element of m_Plist if not null. [詳解] | |
void | pop_front () |
Erase the first element of m_Plist if not null. [詳解] | |
void | prepend (const MGPosition &pos) |
Adds the parameter to the beginning of the list. [詳解] | |
void | push_front (const MGPosition &pos) |
bool | prepend (const MGFSurface &srf1, const MGFSurface &srf2, const MGPosition &uvuv) |
int | remove (double error, const MGPosition &P, int n=0) |
int | remove (const MGFSurface &srf, const MGPosition &uv) |
int | remove (const MGFSurface &srf1, const MGFSurface &srf2, const MGPosition &uvuv) |
int | remove_uvuv (const MGFSurface &srf1, const MGFSurface &srf2) |
MGPosition | removeAt (iterator i) |
MGPosition | removeFirst () |
MGPosition | removeLast () |
int | removeOn (const MGFSurface &srf1, const MGFSurface &srf2, const MGSSisect &ssi) |
void | reverse_order () |
reverse the ordering of the elements in the list. [詳解] | |
void | sort_uv_space (int id) |
フレンド | |
MG_DLL_DECLR friend std::ostream & | operator<< (std::ostream &, const MGPosition_list &) |
Debug Function. [詳解] | |
MGPosition_list provides a list of Positions.
MGPosition_list is used to store curve or surface parameter as two objects intersection data.
typedef container_type::const_iterator MGPosition_list::const_iterator |
typedef std::list<MGPosition> MGPosition_list::container_type |
typedef container_type::iterator MGPosition_list::iterator |
|
inline |
Void constructor(Constructor of length 0).
|
inline |
Constructor of length 1.
MGPosition_list::MGPosition_list | ( | const MGPosition_list & | list, |
int | start1, | ||
int | start2 | ||
) |
Construct MGPosition_list by replacing each element P of list by Q, where, Q=MGPosition(P.sdim(),P,start1,start2).
list | Original MGPosition_list |
start1 | Start position to store of elements Q of new MGPosition_list. |
start2 | Start position to retrieve of elements P of list. |
|
inline |
Copy Constructor. MGPosition_list(const MGPosition_list& list);
bool MGPosition_list::append | ( | const MGPosition & | pos | ) |
Assignment. MGPosition_list& MGPosition_list::operator= (const MGPosition_list&); Adds the parameter to the end of the list. Function's return value is true if appended, false if not.
bool MGPosition_list::append | ( | const MGCurve & | crv1, |
const MGCurve & | crv2, | ||
const MGPosition & | p | ||
) |
Add parameter pair p of crv1 and 2 to the end of list if p is not included in the list already. Function's return value is true if appended, false if not.
void MGPosition_list::append | ( | const MGCurve & | crv1, |
const MGCurve & | crv2, | ||
const MGPosition_list & | list | ||
) |
Add parameter all the data in the list to the end of list if the member p is not included in the list already.
bool MGPosition_list::append | ( | const MGFSurface & | srf, |
const MGPosition & | uv | ||
) |
Add parameter uv of surface to the end of list if uv is not included in the list already. Function's return value is true if appended, false if not.
void MGPosition_list::append | ( | const MGFSurface & | srf, |
const MGPosition_list & | list | ||
) |
Add parameter all the uv's of list to the end of this list if the uv is not included in this list already.
bool MGPosition_list::append | ( | const MGCurve & | crv, |
const MGFSurface & | srf, | ||
const MGPosition & | tuv | ||
) |
Add parameter pair tuv of crv and surface to the end of list if tuv is not included in the list already.
|
inline |
Add parameter pair uvuv of surface srf1 and sur2 to the end of list if uvuv is not included in the list already. Function's return value is true if appended, false if not.
void MGPosition_list::append | ( | const MGFSurface & | srf1, |
const MGFSurface & | srf2, | ||
const MGPosition_list & | list | ||
) |
Add parameter pair uvuv of surface srf1 and sur2 to the end of list.
|
inline |
|
inline |
|
inline |
Get the pointer of the first element of the m_Plist.
|
inline |
|
inline |
Clear all the elements in m_Plist.
|
inline |
|
inline |
Get the pointer of the next of the last element of the m_Plist.
|
inline |
|
inline |
Returns the number of items that are in the list.
Erase the element of iterator i. Returned is the iterator located after the element i.
|
inline |
Returns(but does not remove) first element in the list. If list is empty, behavior is undefined.
|
inline |
|
inline |
|
inline |
bool MGPosition_list::in | ( | const MGBox & | box, |
const_iterator & | id, | ||
int | n = 0 |
||
) | const |
Test if one of the points in the list is included in the box. If so, return id of the point. The id is of the first point found in the list. If no points was not included in the list, end() wil be returned in id. Function's return value is true if a point is in the box, and false if no points are in the box. n is the number of space dimension of points in this list to check. If n>0 is specified, the first n coordinates of the position data in the list are checked if included in the box. If n==0 is specified, all the coordinate data are checked.
|
inline |
Inserts position at the index i. This index must be between zero and the number of items in the list, or behavior is undefined.
|
inline |
Return true (1) if there are no items in the list, false(0) otherwise.
|
inline |
Return(but does not remove) last element in the list. If list is empty, behavior is undefined.
|
inline |
|
inline |
Erase the last element of m_Plist if not null.
|
inline |
Erase the first element of m_Plist if not null.
|
inline |
Adds the parameter to the beginning of the list.
|
inline |
Add parameter pair uvuv of surface srf1 and sur2 to the beginning of list if uvuv is not included in the list already.
|
inline |
|
inline |
int MGPosition_list::remove | ( | double | error, |
const MGPosition & | P, | ||
int | n = 0 |
||
) |
Remove position in the list that is the same point as P. When distace of the two point is within error, they are regarded as same. Function's return value is num of points deleted.
error | square of error allowed to regard same. |
P | Position to remove. |
n | Number of space dimension to check, If n==0, all the coordinates are checked. |
int MGPosition_list::remove | ( | const MGFSurface & | srf, |
const MGPosition & | uv | ||
) |
Remove parameter pair uv of surface srf1 from the list if uv is included in the list.
int MGPosition_list::remove | ( | const MGFSurface & | srf1, |
const MGFSurface & | srf2, | ||
const MGPosition & | uvuv | ||
) |
Remove parameter pair uvuv of surface srf1 and sur2 from the list if uvuv is included in the list. uvuv's space dimension is 4. And uvuv(0) and uvuv(1) are srf1's parameter (u,v), uvuv(2) and uvuv(3) are srf2's parameter (u,v). Function's return value is true if removal was done, and false if no same point was found and removal was not performed.
int MGPosition_list::remove_uvuv | ( | const MGFSurface & | srf1, |
const MGFSurface & | srf2 | ||
) |
Remove same elements in this list(parameter pair uvuv of surface srf1 and sur2) if elements are within the tolerance. Space dimension of the elements(uvuv) is 4. And uvuv(0) and uvuv(1) are srf1's parameter (u,v), uvuv(2) and uvuv(3) are srf2's parameter (u,v). Function's return value is number of removed elements.
MGPosition MGPosition_list::removeAt | ( | iterator | i | ) |
Remove the position and return the position. If i is not valid, behavior is undefined.
MGPosition MGPosition_list::removeFirst | ( | ) |
Remove the first position in the list and return the position. If i is not valid, behavior is undefined.
MGPosition MGPosition_list::removeLast | ( | ) |
Remove the last position in the list and return the position. If i is not valid, behavior is undefined.
int MGPosition_list::removeOn | ( | const MGFSurface & | srf1, |
const MGFSurface & | srf2, | ||
const MGSSisect & | ssi | ||
) |
Remove uvuv that is on the ssi. Function's return value is the number of points deleted.
void MGPosition_list::reverse_order | ( | ) |
reverse the ordering of the elements in the list.
|
inline |
void MGPosition_list::sort_uv_space | ( | int | id | ) |
Sort the positions in the list according to the surface parameter space ordering. Positions (uvuv(id),uvuv(id+1)) in the list is a parameter position of a face.
|
friend |
Debug Function.